diff --git a/EllieBot.sln b/EllieBot.sln index 0d4b7ec..47179ff 100644 --- a/EllieBot.sln +++ b/EllieBot.sln @@ -11,9 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Dockerfile = Dockerfile ellie-menu.ps1 = ellie-menu.ps1 LICENSE = LICENSE - migrate.ps1 = migrate.ps1 README.md = README.md - remove-migrations.ps1 = remove-migrations.ps1 EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EllieBot", "src\EllieBot\EllieBot.csproj", "{4D9001F7-B3E8-48FE-97AA-CFD36DA65A64}" @@ -30,7 +28,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ellie.Marmalade", "src\Elli EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EllieBot.Voice", "src\EllieBot.Voice\EllieBot.Voice.csproj", "{1D93CE3C-80B4-49C7-A9A2-99988920AAEC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EllieBot.GrpcApiBase", "src\EllieBot.GrpcApiBase\EllieBot.GrpcApiBase.csproj", "{3B71F0BF-AE6C-480C-AB88-FCE23EDC7D91}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EllieBot.GrpcApiBase", "src\EllieBot.GrpcApiBase\EllieBot.GrpcApiBase.csproj", "{3B71F0BF-AE6C-480C-AB88-FCE23EDC7D91}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/migrate.ps1 b/migrate.ps1 deleted file mode 100644 index 8a930a3..0000000 --- a/migrate.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -if ($args.Length -eq 0) { - Write-Host "Please provide a migration name." -ForegroundColor Red -} -else { - $migrationName = $args[0] - dotnet ef migrations add $migrationName -o Migrations/Mysql -c SqliteContext -p src/EllieBot/EllieBot.csproj - dotnet ef migrations add $migrationName -o Migrations/PostgreSql -c PostgreSqlContext -p src/EllieBot/EllieBot.csproj -} \ No newline at end of file diff --git a/src/EllieBot/Db/EllieContext.cs b/src/EllieBot/Db/EllieContext.cs index c12c0e6..347e1a7 100644 --- a/src/EllieBot/Db/EllieContext.cs +++ b/src/EllieBot/Db/EllieContext.cs @@ -62,6 +62,7 @@ public abstract class EllieContext : DbContext public DbSet TodosArchive { get; set; } public DbSet HoneyPotChannels { get; set; } + // public DbSet GuildColors { get; set; } @@ -73,7 +74,16 @@ public abstract class EllieContext : DbContext protected override void OnModelCreating(ModelBuilder modelBuilder) { - #region Flag Translate + #region UserBetStats + + modelBuilder.Entity() + .HasIndex(x => new { x.UserId, x.Game }) + .IsUnique(); + + + #endregion + + #region Flag Translate modelBuilder.Entity() .HasIndex(x => new { x.GuildId, x.ChannelId }) @@ -85,12 +95,12 @@ public abstract class EllieContext : DbContext modelBuilder.Entity() .HasAlternateKey(x => x.Position); - + modelBuilder.Entity() .HasIndex(x => x.OwnerId); #endregion - + #region QUOTES var quoteEntity = modelBuilder.Entity(); @@ -307,10 +317,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); @@ -384,10 +394,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); @@ -433,9 +443,9 @@ public abstract class EllieContext : DbContext .OnDelete(DeleteBehavior.SetNull); ci.HasIndex(x => new - { - x.Name - }) + { + x.Name + }) .IsUnique(); #endregion @@ -554,10 +564,10 @@ public abstract class EllieContext : DbContext .IsUnique(false); rr2.HasIndex(x => new - { - x.MessageId, - x.Emote - }) + { + x.MessageId, + x.Emote + }) .IsUnique(); }); @@ -632,11 +642,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(); }); @@ -661,10 +671,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 @@ -709,10 +719,10 @@ public abstract class EllieContext : DbContext modelBuilder .Entity(gs => gs.HasIndex(x => new - { - x.GuildId, - x.GreetType - }) + { + x.GuildId, + x.GreetType + }) .IsUnique()); modelBuilder.Entity(gs => @@ -720,7 +730,7 @@ public abstract class EllieContext : DbContext gs .Property(x => x.IsEnabled) .HasDefaultValue(false); - + gs .Property(x => x.AutoDeleteTimer) .HasDefaultValue(0); diff --git a/src/EllieBot/Migrations/PostgreSql/20241105024753_betstats.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20241105024753_betstats.Designer.cs new file mode 100644 index 0000000..685e80e --- /dev/null +++ b/src/EllieBot/Migrations/PostgreSql/20241105024753_betstats.Designer.cs @@ -0,0 +1,3902 @@ +// +using System; +using EllieBot.Db; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace EllieBot.Migrations.PostgreSql +{ + [DbContext(typeof(PostgreSqlContext))] + [Migration("20241105024753_betstats")] + partial class betstats + { + /// + 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("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.HasIndex("Username") + .HasDatabaseName("ix_discorduser_username"); + + b.ToTable("discorduser", (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.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.FlagTranslateChannel", b => + { + b.Property("Id") + .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_flagtranslatechannel"); + + b.HasIndex("GuildId", "ChannelId") + .IsUnique() + .HasDatabaseName("ix_flagtranslatechannel_guildid_channelid"); + + b.ToTable("flagtranslatechannel", (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.NCPixel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Color") + .HasColumnType("bigint") + .HasColumnName("color"); + + b.Property("OwnerId") + .HasColumnType("numeric(20,0)") + .HasColumnName("ownerid"); + + b.Property("Position") + .HasColumnType("integer") + .HasColumnName("position"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_ncpixel"); + + b.HasAlternateKey("Position") + .HasName("ak_ncpixel_position"); + + b.HasIndex("OwnerId") + .HasDatabaseName("ix_ncpixel_ownerid"); + + b.ToTable("ncpixel", (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("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + 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.HasAlternateKey("GuildId", "Count") + .HasName("ak_warningpunishment_guildid_count"); + + 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") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .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") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .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.Services.UserBetStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Game") + .HasColumnType("integer") + .HasColumnName("game"); + + b.Property("LoseCount") + .HasColumnType("bigint") + .HasColumnName("losecount"); + + b.Property("MaxBet") + .HasColumnType("bigint") + .HasColumnName("maxbet"); + + b.Property("MaxWin") + .HasColumnType("bigint") + .HasColumnName("maxwin"); + + b.Property("PaidOut") + .HasColumnType("numeric") + .HasColumnName("paidout"); + + b.Property("TotalBet") + .HasColumnType("numeric") + .HasColumnName("totalbet"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.Property("WinCount") + .HasColumnType("bigint") + .HasColumnName("wincount"); + + b.HasKey("Id") + .HasName("pk_userbetstats"); + + b.HasIndex("UserId", "Game") + .IsUnique() + .HasDatabaseName("ix_userbetstats_userid_game"); + + b.ToTable("userbetstats", (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.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("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/20241105024753_betstats.cs b/src/EllieBot/Migrations/PostgreSql/20241105024753_betstats.cs new file mode 100644 index 0000000..91a9dde --- /dev/null +++ b/src/EllieBot/Migrations/PostgreSql/20241105024753_betstats.cs @@ -0,0 +1,48 @@ +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace EllieBot.Migrations.PostgreSql +{ + /// + public partial class betstats : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "userbetstats", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + userid = table.Column(type: "numeric(20,0)", nullable: false), + game = table.Column(type: "integer", nullable: false), + wincount = table.Column(type: "bigint", nullable: false), + losecount = table.Column(type: "bigint", nullable: false), + totalbet = table.Column(type: "numeric", nullable: false), + paidout = table.Column(type: "numeric", nullable: false), + maxwin = table.Column(type: "bigint", nullable: false), + maxbet = table.Column(type: "bigint", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_userbetstats", x => x.id); + }); + + migrationBuilder.CreateIndex( + name: "ix_userbetstats_userid_game", + table: "userbetstats", + columns: new[] { "userid", "game" }, + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "userbetstats"); + } + } +} diff --git a/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs b/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs index fc81310..8752f30 100644 --- a/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs +++ b/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs @@ -1,9 +1,9 @@ // using System; +using EllieBot.Db; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable @@ -23,3825 +23,3876 @@ 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("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.HasIndex("Username") - .HasDatabaseName("ix_discorduser_username"); + b.HasIndex("Username") + .HasDatabaseName("ix_discorduser_username"); - 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.FlagTranslateChannel", b => - { - b.Property("Id") - .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_flagtranslatechannel"); - - b.HasIndex("GuildId", "ChannelId") - .IsUnique() - .HasDatabaseName("ix_flagtranslatechannel_guildid_channelid"); - - b.ToTable("flagtranslatechannel", (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.NCPixel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Color") - .HasColumnType("bigint") - .HasColumnName("color"); - - b.Property("OwnerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("ownerid"); - - b.Property("Position") - .HasColumnType("integer") - .HasColumnName("position"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("Text") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_ncpixel"); - - b.HasAlternateKey("Position") - .HasName("ak_ncpixel_position"); - - b.HasIndex("OwnerId") - .HasDatabaseName("ix_ncpixel_ownerid"); - - b.ToTable("ncpixel", (string)null); - }); + b.ToTable("discorduser", (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); - }); - - 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("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - 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.HasAlternateKey("GuildId", "Count") - .HasName("ak_warningpunishment_guildid_count"); - - 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") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .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") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .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"); - }); + b.ToTable("expressions", (string)null); + }); 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.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - b.Navigation("XpSettings"); - }); + 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.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - b.Navigation("GuildConfig"); - }); + 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.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); - }); + { + b.Property("Id") + .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.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); - }); + { + b.Property("Id") + .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.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); - }); + { + b.Property("Id") + .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.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); - }); + { + b.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.FlagTranslateChannel", b => + { + b.Property("Id") + .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_flagtranslatechannel"); + + b.HasIndex("GuildId", "ChannelId") + .IsUnique() + .HasDatabaseName("ix_flagtranslatechannel_guildid_channelid"); + + b.ToTable("flagtranslatechannel", (string)null); + }); 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.Property("Id") + .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.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - b.Navigation("GuildConfig"); - }); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - 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.Property("ChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("channelid"); - 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.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Navigation("GuildConfig"); - }); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); - 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.HasKey("Id") + .HasName("pk_gcchannelid"); - b.Navigation("LogSetting"); - }); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); - 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.ToTable("gcchannelid", (string)null); + }); - 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.GamblingStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - 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"); - }); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - 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.Property("Bet") + .HasColumnType("numeric") + .HasColumnName("bet"); - 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.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - 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.Property("Feature") + .HasColumnType("text") + .HasColumnName("feature"); - 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.Property("PaidOut") + .HasColumnType("numeric") + .HasColumnName("paidout"); - 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.HasKey("Id") + .HasName("pk_gamblingstats"); - b.Navigation("StreamRoleSettings"); - }); + b.HasIndex("Feature") + .IsUnique() + .HasDatabaseName("ix_gamblingstats_feature"); - 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.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"); - }); + b.ToTable("gamblingstats", (string)null); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); + { + 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.Navigation("AntiAltSetting"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - b.Navigation("AntiRaidSetting"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Navigation("AntiSpamSetting"); + b.Property("AutoAssignRoleIds") + .HasColumnType("text") + .HasColumnName("autoassignroleids"); - b.Navigation("CommandAliases"); + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("boolean") + .HasColumnName("autodeleteselfassignedrolemessages"); - b.Navigation("CommandCooldowns"); + b.Property("CleverbotEnabled") + .HasColumnType("boolean") + .HasColumnName("cleverbotenabled"); - b.Navigation("DelMsgOnCmdChannels"); + b.Property("DateAdded") + .HasColumnType("timestamp without time zone") + .HasColumnName("dateadded"); - b.Navigation("FeedSubs"); + b.Property("DeleteMessageOnCommand") + .HasColumnType("boolean") + .HasColumnName("deletemessageoncommand"); - b.Navigation("FilterInvitesChannelIds"); + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("boolean") + .HasColumnName("deletestreamonlinemessage"); - b.Navigation("FilterLinksChannelIds"); + b.Property("DisableGlobalExpressions") + .HasColumnType("boolean") + .HasColumnName("disableglobalexpressions"); - b.Navigation("FilterWordsChannelIds"); + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("boolean") + .HasColumnName("exclusiveselfassignedroles"); - b.Navigation("FilteredWords"); + b.Property("FilterInvites") + .HasColumnType("boolean") + .HasColumnName("filterinvites"); - b.Navigation("FollowedStreams"); + b.Property("FilterLinks") + .HasColumnType("boolean") + .HasColumnName("filterlinks"); - b.Navigation("GenerateCurrencyChannelIds"); + b.Property("FilterWords") + .HasColumnType("boolean") + .HasColumnName("filterwords"); - b.Navigation("MutedUsers"); + b.Property("GameVoiceChannel") + .HasColumnType("numeric(20,0)") + .HasColumnName("gamevoicechannel"); - b.Navigation("Permissions"); + b.Property("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); - b.Navigation("SelfAssignableRoleGroupNames"); + b.Property("Locale") + .HasColumnType("text") + .HasColumnName("locale"); - b.Navigation("ShopEntries"); + b.Property("MuteRoleName") + .HasColumnType("text") + .HasColumnName("muterolename"); - b.Navigation("SlowmodeIgnoredRoles"); + b.Property("NotifyStreamOffline") + .HasColumnType("boolean") + .HasColumnName("notifystreamoffline"); - b.Navigation("SlowmodeIgnoredUsers"); + b.Property("PermissionRole") + .HasColumnType("text") + .HasColumnName("permissionrole"); - b.Navigation("StreamRole"); + b.Property("Prefix") + .HasColumnType("text") + .HasColumnName("prefix"); - b.Navigation("UnbanTimer"); + b.Property("StickyRoles") + .HasColumnType("boolean") + .HasColumnName("stickyroles"); - b.Navigation("UnmuteTimers"); + b.Property("TimeZoneId") + .HasColumnType("text") + .HasColumnName("timezoneid"); - b.Navigation("UnroleTimer"); + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); - b.Navigation("VcRoleInfos"); + b.Property("VerbosePermissions") + .HasColumnType("boolean") + .HasColumnName("verbosepermissions"); - b.Navigation("XpSettings"); - }); + 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.Navigation("LogIgnores"); - }); + { + 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.Navigation("Songs"); - }); + { + 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.NCPixel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Color") + .HasColumnType("bigint") + .HasColumnName("color"); + + b.Property("OwnerId") + .HasColumnType("numeric(20,0)") + .HasColumnName("ownerid"); + + b.Property("Position") + .HasColumnType("integer") + .HasColumnName("position"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_ncpixel"); + + b.HasAlternateKey("Position") + .HasName("ak_ncpixel_position"); + + b.HasIndex("OwnerId") + .HasDatabaseName("ix_ncpixel_ownerid"); + + b.ToTable("ncpixel", (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.Navigation("Items"); - }); + { + 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.Navigation("Blacklist"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - b.Navigation("Whitelist"); - }); + 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.Navigation("Items"); - }); + { + 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("GuildId") + .HasColumnType("numeric(20,0)") + .HasColumnName("guildid"); + + 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.HasAlternateKey("GuildId", "Count") + .HasName("ak_warningpunishment_guildid_count"); + + 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.Navigation("CurrencyRewards"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); - b.Navigation("ExclusionList"); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Navigation("RoleRewards"); - }); + 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") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .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") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .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.Services.UserBetStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Game") + .HasColumnType("integer") + .HasColumnName("game"); + + b.Property("LoseCount") + .HasColumnType("bigint") + .HasColumnName("losecount"); + + b.Property("MaxBet") + .HasColumnType("bigint") + .HasColumnName("maxbet"); + + b.Property("MaxWin") + .HasColumnType("bigint") + .HasColumnName("maxwin"); + + b.Property("PaidOut") + .HasColumnType("numeric") + .HasColumnName("paidout"); + + b.Property("TotalBet") + .HasColumnType("numeric") + .HasColumnName("totalbet"); + + b.Property("UserId") + .HasColumnType("numeric(20,0)") + .HasColumnName("userid"); + + b.Property("WinCount") + .HasColumnType("bigint") + .HasColumnName("wincount"); + + b.HasKey("Id") + .HasName("pk_userbetstats"); + + b.HasIndex("UserId", "Game") + .IsUnique() + .HasDatabaseName("ix_userbetstats_userid_game"); + + b.ToTable("userbetstats", (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.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("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/20241105024653_betstats.Designer.cs b/src/EllieBot/Migrations/Sqlite/20241105024653_betstats.Designer.cs new file mode 100644 index 0000000..3151283 --- /dev/null +++ b/src/EllieBot/Migrations/Sqlite/20241105024653_betstats.Designer.cs @@ -0,0 +1,3011 @@ +// +using System; +using EllieBot.Db; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace EllieBot.Migrations +{ + [DbContext(typeof(SqliteContext))] + [Migration("20241105024653_betstats")] + partial class betstats + { + /// + 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("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.HasIndex("Username"); + + b.ToTable("DiscordUser"); + }); + + 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.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.FlagTranslateChannel", 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", "ChannelId") + .IsUnique(); + + b.ToTable("FlagTranslateChannel"); + }); + + 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.NCPixel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Color") + .HasColumnType("INTEGER"); + + b.Property("OwnerId") + .HasColumnType("INTEGER"); + + b.Property("Position") + .HasColumnType("INTEGER"); + + b.Property("Price") + .HasColumnType("INTEGER"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasAlternateKey("Position"); + + b.HasIndex("OwnerId"); + + b.ToTable("NCPixel"); + }); + + 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("GuildId") + .HasColumnType("INTEGER"); + + b.Property("Punishment") + .HasColumnType("INTEGER"); + + b.Property("RoleId") + .HasColumnType("INTEGER"); + + b.Property("Time") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasAlternateKey("GuildId", "Count"); + + 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") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("GreetType") + .HasColumnType("INTEGER"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("IsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(false); + + b.Property("MessageText") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("GuildId", "GreetType") + .IsUnique(); + + b.ToTable("GreetSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.UserBetStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Game") + .HasColumnType("INTEGER"); + + b.Property("LoseCount") + .HasColumnType("INTEGER"); + + b.Property("MaxBet") + .HasColumnType("INTEGER"); + + b.Property("MaxWin") + .HasColumnType("INTEGER"); + + b.Property("PaidOut") + .HasColumnType("TEXT"); + + b.Property("TotalBet") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.Property("WinCount") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "Game") + .IsUnique(); + + b.ToTable("UserBetStats"); + }); + + 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.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("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/20241105024653_betstats.cs b/src/EllieBot/Migrations/Sqlite/20241105024653_betstats.cs new file mode 100644 index 0000000..609c3f3 --- /dev/null +++ b/src/EllieBot/Migrations/Sqlite/20241105024653_betstats.cs @@ -0,0 +1,47 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations +{ + /// + public partial class betstats : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "UserBetStats", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + UserId = table.Column(type: "INTEGER", nullable: false), + Game = table.Column(type: "INTEGER", nullable: false), + WinCount = table.Column(type: "INTEGER", nullable: false), + LoseCount = table.Column(type: "INTEGER", nullable: false), + TotalBet = table.Column(type: "TEXT", nullable: false), + PaidOut = table.Column(type: "TEXT", nullable: false), + MaxWin = table.Column(type: "INTEGER", nullable: false), + MaxBet = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UserBetStats", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_UserBetStats_UserId_Game", + table: "UserBetStats", + columns: new[] { "UserId", "Game" }, + unique: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "UserBetStats"); + } + } +} diff --git a/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs b/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs index 190e8d9..a6f8cd9 100644 --- a/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs +++ b/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs @@ -1,9 +1,9 @@ // using System; +using EllieBot.Db; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; #nullable disable @@ -18,2952 +18,2990 @@ namespace EllieBot.Migrations 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("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.HasIndex("Username"); + b.HasIndex("Username"); - 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.FlagTranslateChannel", 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", "ChannelId") - .IsUnique(); - - b.ToTable("FlagTranslateChannel"); - }); - - 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.NCPixel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Color") - .HasColumnType("INTEGER"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Position") - .HasColumnType("INTEGER"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("Text") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("Position"); - - b.HasIndex("OwnerId"); - - b.ToTable("NCPixel"); - }); + b.ToTable("DiscordUser"); + }); 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"); - }); - - 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("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildId", "Count"); - - 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") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("GreetType") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("IsEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - 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"); - }); + b.ToTable("Expressions"); + }); modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Navigation("XpSettings"); - }); + 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.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Navigation("GuildConfig"); - }); + 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.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + 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.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + 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.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + 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.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + 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.FlagTranslateChannel", 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", "ChannelId") + .IsUnique(); + + b.ToTable("FlagTranslateChannel"); + }); modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + { + 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.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Navigation("GuildConfig"); - }); + b.Property("ChannelId") + .HasColumnType("INTEGER"); - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); + b.Property("DateAdded") + .HasColumnType("TEXT"); - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.Property("GuildConfigId") + .HasColumnType("INTEGER"); - b.Navigation("GuildConfig"); - }); + b.HasKey("Id"); - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.HasIndex("GuildConfigId"); - b.Navigation("LogSetting"); - }); + b.ToTable("GCChannelId"); + }); - 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.GamblingStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + b.Property("Bet") + .HasColumnType("TEXT"); - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); + b.Property("DateAdded") + .HasColumnType("TEXT"); - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + b.Property("Feature") + .HasColumnType("TEXT"); - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade); - }); + b.Property("PaidOut") + .HasColumnType("TEXT"); - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + b.HasKey("Id"); - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); + b.HasIndex("Feature") + .IsUnique(); - 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.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"); - }); + b.ToTable("GamblingStats"); + }); modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); + { + 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.Navigation("AntiAltSetting"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Navigation("AntiRaidSetting"); + b.Property("AutoAssignRoleIds") + .HasColumnType("TEXT"); - b.Navigation("AntiSpamSetting"); + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("INTEGER"); - b.Navigation("CommandAliases"); + b.Property("CleverbotEnabled") + .HasColumnType("INTEGER"); - b.Navigation("CommandCooldowns"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Navigation("DelMsgOnCmdChannels"); + b.Property("DeleteMessageOnCommand") + .HasColumnType("INTEGER"); - b.Navigation("FeedSubs"); + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("INTEGER"); - b.Navigation("FilterInvitesChannelIds"); + b.Property("DisableGlobalExpressions") + .HasColumnType("INTEGER"); - b.Navigation("FilterLinksChannelIds"); + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("INTEGER"); - b.Navigation("FilterWordsChannelIds"); + b.Property("FilterInvites") + .HasColumnType("INTEGER"); - b.Navigation("FilteredWords"); + b.Property("FilterLinks") + .HasColumnType("INTEGER"); - b.Navigation("FollowedStreams"); + b.Property("FilterWords") + .HasColumnType("INTEGER"); - b.Navigation("GenerateCurrencyChannelIds"); + b.Property("GameVoiceChannel") + .HasColumnType("INTEGER"); - b.Navigation("MutedUsers"); + b.Property("GuildId") + .HasColumnType("INTEGER"); - b.Navigation("Permissions"); + b.Property("Locale") + .HasColumnType("TEXT"); - b.Navigation("SelfAssignableRoleGroupNames"); + b.Property("MuteRoleName") + .HasColumnType("TEXT"); - b.Navigation("ShopEntries"); + b.Property("NotifyStreamOffline") + .HasColumnType("INTEGER"); - b.Navigation("SlowmodeIgnoredRoles"); + b.Property("PermissionRole") + .HasColumnType("TEXT"); - b.Navigation("SlowmodeIgnoredUsers"); + b.Property("Prefix") + .HasColumnType("TEXT"); - b.Navigation("StreamRole"); + b.Property("StickyRoles") + .HasColumnType("INTEGER"); - b.Navigation("UnbanTimer"); + b.Property("TimeZoneId") + .HasColumnType("TEXT"); - b.Navigation("UnmuteTimers"); + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(true); - b.Navigation("UnroleTimer"); + b.Property("VerbosePermissions") + .HasColumnType("INTEGER"); - b.Navigation("VcRoleInfos"); + b.Property("WarnExpireAction") + .HasColumnType("INTEGER"); - b.Navigation("XpSettings"); - }); + 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.Navigation("LogIgnores"); - }); + { + 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.Navigation("Songs"); - }); + { + 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.NCPixel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Color") + .HasColumnType("INTEGER"); + + b.Property("OwnerId") + .HasColumnType("INTEGER"); + + b.Property("Position") + .HasColumnType("INTEGER"); + + b.Property("Price") + .HasColumnType("INTEGER"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasAlternateKey("Position"); + + b.HasIndex("OwnerId"); + + b.ToTable("NCPixel"); + }); + + 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.Navigation("Items"); - }); + { + 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.Navigation("Blacklist"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Navigation("Whitelist"); - }); + 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.Navigation("Items"); - }); + { + 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("GuildId") + .HasColumnType("INTEGER"); + + b.Property("Punishment") + .HasColumnType("INTEGER"); + + b.Property("RoleId") + .HasColumnType("INTEGER"); + + b.Property("Time") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasAlternateKey("GuildId", "Count"); + + 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.Navigation("CurrencyRewards"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); - b.Navigation("ExclusionList"); + b.Property("DateAdded") + .HasColumnType("TEXT"); - b.Navigation("RoleRewards"); - }); + 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") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0); + + b.Property("ChannelId") + .HasColumnType("INTEGER"); + + b.Property("GreetType") + .HasColumnType("INTEGER"); + + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("IsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(false); + + b.Property("MessageText") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("GuildId", "GreetType") + .IsUnique(); + + b.ToTable("GreetSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.UserBetStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Game") + .HasColumnType("INTEGER"); + + b.Property("LoseCount") + .HasColumnType("INTEGER"); + + b.Property("MaxBet") + .HasColumnType("INTEGER"); + + b.Property("MaxWin") + .HasColumnType("INTEGER"); + + b.Property("PaidOut") + .HasColumnType("TEXT"); + + b.Property("TotalBet") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.Property("WinCount") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "Game") + .IsUnique(); + + b.ToTable("UserBetStats"); + }); + + 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.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("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/Gambling/AnimalRacing/AnimalRacingCommands.cs b/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs index 1f23cf6..eae65d7 100644 --- a/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs +++ b/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs @@ -113,14 +113,14 @@ public partial class Gambling private async Task Ar_OnStateUpdate(AnimalRace race) { - var text = $@"|🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🔚| + 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; diff --git a/src/EllieBot/Modules/Gambling/Gambling.cs b/src/EllieBot/Modules/Gambling/Gambling.cs index 933eddd..165a487 100644 --- a/src/EllieBot/Modules/Gambling/Gambling.cs +++ b/src/EllieBot/Modules/Gambling/Gambling.cs @@ -71,7 +71,65 @@ public partial class Gambling : GamblingModule } [Cmd] + [Priority(3)] public async Task BetStats() + => await BetStats(ctx.User, null); + + [Cmd] + [Priority(2)] + public async Task BetStats(GamblingGame game) + => await BetStats(ctx.User, game); + + [Cmd] + [Priority(1)] + public async Task BetStats([Leftover] IUser user) + => await BetStats(user, null); + + [Cmd] + [Priority(0)] + public async Task BetStats(IUser user, GamblingGame? game) + { + var stats = await _gamblingTxTracker.GetUserStatsAsync(user.Id, game); + + if (stats.Count == 0) + stats = new() + { + new() + { + TotalBet = 1 + } + }; + + var eb = _sender.CreateEmbed() + .WithOkColor() + .WithAuthor(user) + .AddField("Total Won", N(stats.Sum(x => x.PaidOut)), true) + .AddField("Biggest Win", N(stats.Max(x => x.MaxWin)), true) + .AddField("Biggest Bet", N(stats.Max(x => x.MaxBet)), true) + .AddField("# Bets", stats.Sum(x => x.WinCount + x.LoseCount), true) + .AddField("Payout", + (stats.Sum(x => x.PaidOut) / stats.Sum(x => x.TotalBet)).ToString("P2", Culture), + true); + if (game == null) + { + var favGame = stats.MaxBy(x => x.WinCount + x.LoseCount); + eb.AddField("Favorite Game", + favGame.Game + "\n" + Format.Italics((favGame.WinCount + favGame.LoseCount) + " plays"), + true); + } + else + { + eb.WithDescription(game.ToString()) + .AddField("# Wins", stats.Sum(x => x.WinCount), true); + } + + await Response() + .Embed(eb) + .SendAsync(); + } + + [Cmd] + public async Task GamblingStats() { var stats = await _gamblingTxTracker.GetAllAsync(); @@ -167,57 +225,8 @@ public partial class Gambling : GamblingModule return; } - if (Config.Timely.RequirePassword) + if (Config.Timely.HasButton) { - // var password = _service.GeneratePassword(); - // - // var img = new Image(100, 40); - // - // var font = _fonts.NotoSans.CreateFont(30); - // var outlinePen = new SolidPen(Color.Black, 1f); - // var strikeoutRun = new RichTextRun - // { - // Start = 0, - // End = password.GetGraphemeCount(), - // Font = font, - // StrikeoutPen = new SolidPen(Color.White, 3), - // TextDecorations = TextDecorations.Strikeout - // }; - // // draw password on the image - // img.Mutate(x => - // { - // x.DrawText(new RichTextOptions(font) - // { - // HorizontalAlignment = HorizontalAlignment.Center, - // VerticalAlignment = VerticalAlignment.Center, - // FallbackFontFamilies = _fonts.FallBackFonts, - // Origin = new(50, 20), - // TextRuns = [strikeoutRun] - // }, - // password, - // Brushes.Solid(Color.White), - // outlinePen); - // }); - // using var stream = await img.ToStreamAsync(); - // var captcha = await Response() - // .Embed(_sender.CreateEmbed() - // .WithOkColor() - // .WithImageUrl("attachment://timely.png")) - // .File(stream, "timely.png") - // .SendAsync(); - // try - // { - // var userInput = await GetUserInputAsync(ctx.User.Id, ctx.Channel.Id); - // if (userInput?.ToLowerInvariant() != password?.ToLowerInvariant()) - // { - // return; - // } - // } - // finally - // { - // _ = captcha.DeleteAsync(); - // } - var interaction = CreateTimelyInteraction(); var msg = await Response().Pending(strs.timely_button).Interaction(interaction).SendAsync(); await msg.DeleteAsync(); @@ -249,6 +258,19 @@ public partial class Gambling : GamblingModule var val = Config.Timely.Amount; + + var guildUsers = await (Config.BoostBonus + .GuildIds + ?? new()) + .Select(x => ((IGuild)_client.GetGuild(x))?.GetUserAsync(ctx.User.Id)) + .WhenAll(); + + var boostGuildUser = guildUsers.FirstOrDefault(x => x?.PremiumSince is not null); + var booster = boostGuildUser is not null; + + if (booster) + val += Config.BoostBonus.BaseTimelyBonus; + var patron = await _ps.GetPatronAsync(ctx.User.Id); var percentBonus = (_ps.PercentBonus(patron) / 100f); @@ -259,7 +281,16 @@ public partial class Gambling : GamblingModule await _cs.AddAsync(ctx.User.Id, val, new("timely", "claim")); - await Response().Confirm(strs.timely(N(val), period)).Interaction(inter).SendAsync(); + if (booster) + { + var msg = GetText(strs.timely(N(val), period)) + + "\n\n" + + $"*+{N(Config.BoostBonus.BaseTimelyBonus)} bonus for boosting {boostGuildUser.Guild}!*"; + + await Response().Confirm(msg).Interaction(inter).SendAsync(); + } + else + await Response().Confirm(strs.timely(N(val), period)).Interaction(inter).SendAsync(); } [Cmd] @@ -370,8 +401,9 @@ public partial class Gambling : GamblingModule } var embed = _sender.CreateEmbed() - .WithTitle(GetText(strs.transactions(((SocketGuild)ctx.Guild)?.GetUser(userId)?.ToString() - ?? $"{userId}"))) + .WithTitle(GetText(strs.transactions( + ((SocketGuild)ctx.Guild)?.GetUser(userId)?.ToString() + ?? $"{userId}"))) .WithOkColor(); var sb = new StringBuilder(); @@ -627,7 +659,9 @@ public partial class Gambling : GamblingModule } else { - await Response().Error(strs.take_fail(N(amount), Format.Bold(user.ToString()), CurrencySign)).SendAsync(); + await Response() + .Error(strs.take_fail(N(amount), Format.Bold(user.ToString()), CurrencySign)) + .SendAsync(); } } @@ -648,7 +682,9 @@ public partial class Gambling : GamblingModule } else { - await Response().Error(strs.take_fail(N(amount), Format.Code(usrId.ToString()), CurrencySign)).SendAsync(); + await Response() + .Error(strs.take_fail(N(amount), Format.Code(usrId.ToString()), CurrencySign)) + .SendAsync(); } } diff --git a/src/EllieBot/Modules/Gambling/GamblingConfig.cs b/src/EllieBot/Modules/Gambling/GamblingConfig.cs index 5cef563..dd0b955 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; } = 9; + public int Version { get; set; } = 10; [Comment("""Currency settings""")] public CurrencyConfig Currency { get; set; } @@ -67,6 +67,11 @@ public sealed partial class GamblingConfig : ICloneable [Comment("""Slot config""")] public SlotsConfig Slots { get; set; } + [Comment(""" + Bonus config for server boosts + """)] + public BoostBonusConfig BoostBonus { get; set; } + public GamblingConfig() { BetRoll = new(); @@ -79,6 +84,7 @@ public sealed partial class GamblingConfig : ICloneable Slots = new(); LuckyLadder = new(); BotCuts = new(); + BoostBonus = new(); } } @@ -104,7 +110,7 @@ public partial class TimelyConfig 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; + public long Amount { get; set; } = 0; [Comment(""" How often (in hours) can users claim currency with .timely command @@ -115,7 +121,7 @@ public partial class TimelyConfig [Comment(""" Whether the users are required to type a password when they do timely. """)] - public bool RequirePassword { get; set; } = true; + public bool HasButton { get; set; } = true; } [Cloneable] @@ -413,4 +419,18 @@ public sealed partial class BotCutConfig Default 0.1 (10%). """)] public decimal ShopSaleCut { get; set; } = 0.1m; +} + +[Cloneable] +public sealed partial class BoostBonusConfig +{ + [Comment("Users will receive a bonus if they boost any of these servers")] + public List GuildIds { get; set; } = + [ + 117523346618318850 + ]; + + [Comment("This bonus will be added before any other multiplier is applied to the .timely command")] + + public long BaseTimelyBonus { get; set; } = 50; } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/GamblingConfigService.cs b/src/EllieBot/Modules/Gambling/GamblingConfigService.cs index 0789d67..9a82fdd 100644 --- a/src/EllieBot/Modules/Gambling/GamblingConfigService.cs +++ b/src/EllieBot/Modules/Gambling/GamblingConfigService.cs @@ -144,8 +144,8 @@ public sealed class GamblingConfigService : ConfigServiceBase ConfigPrinters.ToString, val => val >= 0); - AddParsedProp("timely.pass", - gs => gs.Timely.RequirePassword, + AddParsedProp("timely.btn", + gs => gs.Timely.HasButton, bool.TryParse, ConfigPrinters.ToString); @@ -189,11 +189,11 @@ public sealed class GamblingConfigService : ConfigServiceBase }); } - if (data.Version < 9) + if (data.Version < 10) { ModifyConfig(c => { - c.Version = 9; + c.Version = 10; }); } } diff --git a/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs b/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs index 85fa703..564881f 100644 --- a/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs +++ b/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs @@ -37,7 +37,7 @@ public sealed class NewGamblingService : IGamblingService, IEService var won = (long)result.Won; if (won > 0) { - await _cs.AddAsync(userId, won, new("lula", "win")); + await _cs.AddAsync(userId, won, new("lula", result.Multiplier >= 1 ? "win" : "lose")); } return result; @@ -155,7 +155,7 @@ public sealed class NewGamblingService : IGamblingService, IEService var won = (long)result.Won; if (won > 0) { - await _cs.AddAsync(userId, won, new("slot", "won")); + await _cs.AddAsync(userId, won, new("slot", "win")); } return result; diff --git a/src/EllieBot/_common/Currency/ITxTracker.cs b/src/EllieBot/_common/Currency/ITxTracker.cs index d7cad66..6324901 100644 --- a/src/EllieBot/_common/Currency/ITxTracker.cs +++ b/src/EllieBot/_common/Currency/ITxTracker.cs @@ -4,6 +4,6 @@ namespace EllieBot.Services; public interface ITxTracker { - Task TrackAdd(long amount, TxData? txData); - Task TrackRemove(long amount, TxData? txData); + Task TrackAdd(ulong userId, long amount, TxData? txData); + Task TrackRemove(ulong userId, long amount, TxData? txData); } \ No newline at end of file diff --git a/src/EllieBot/_common/Services/Currency/CurrencyService.cs b/src/EllieBot/_common/Services/Currency/CurrencyService.cs index a6428e1..974febd 100644 --- a/src/EllieBot/_common/Services/Currency/CurrencyService.cs +++ b/src/EllieBot/_common/Services/Currency/CurrencyService.cs @@ -77,7 +77,7 @@ public sealed class CurrencyService : ICurrencyService, IEService { var wallet = await GetWalletAsync(userId); await wallet.Add(amount, txData); - await _txTracker.TrackAdd(amount, txData); + await _txTracker.TrackAdd(userId, amount, txData); } public async Task AddAsync( @@ -97,7 +97,7 @@ public sealed class CurrencyService : ICurrencyService, IEService var wallet = await GetWalletAsync(userId); var result = await wallet.Take(amount, txData); if (result) - await _txTracker.TrackRemove(amount, txData); + await _txTracker.TrackRemove(userId, amount, txData); return result; } diff --git a/src/EllieBot/_common/Services/Currency/GamblingTxTracker.cs b/src/EllieBot/_common/Services/Currency/GamblingTxTracker.cs index 5751281..028f7ec 100644 --- a/src/EllieBot/_common/Services/Currency/GamblingTxTracker.cs +++ b/src/EllieBot/_common/Services/Currency/GamblingTxTracker.cs @@ -1,8 +1,10 @@ using LinqToDB; +using LinqToDB.Data; using LinqToDB.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; using EllieBot.Services.Currency; using EllieBot.Db.Models; +using System.Collections.Concurrent; namespace EllieBot.Services; @@ -10,15 +12,11 @@ public sealed class GamblingTxTracker : ITxTracker, IEService, IReadyExecutor { private static readonly IReadOnlySet _gamblingTypes = new HashSet(new[] { - "lula", - "betroll", - "betflip", - "blackjack", - "betdraw", - "slot", + "lula", "betroll", "betflip", "blackjack", "betdraw", "slot", }); - private ConcurrentDictionary _stats = new(); + private NonBlocking.ConcurrentDictionary globalStats = new(); + private ConcurrentBag userStats = new(); private readonly DbService _db; @@ -28,83 +26,283 @@ public sealed class GamblingTxTracker : ITxTracker, IEService, IReadyExecutor } public async Task OnReadyAsync() + => await Task.WhenAll(RunUserStatsCollector(), RunBetStatsCollector()); + + public async Task RunBetStatsCollector() { using var timer = new PeriodicTimer(TimeSpan.FromHours(1)); while (await timer.WaitForNextTickAsync()) { await using var ctx = _db.GetDbContext(); - await using var trans = await ctx.Database.BeginTransactionAsync(); try { - var keys = _stats.Keys; + // update betstats + var keys = globalStats.Keys; foreach (var key in keys) { - if (_stats.TryRemove(key, out var stat)) + if (globalStats.TryRemove(key, out var stat)) { await ctx.GetTable() - .InsertOrUpdateAsync(() => new() - { - Feature = key, - Bet = stat.Bet, - PaidOut = stat.PaidOut, - DateAdded = DateTime.UtcNow - }, old => new() - { - Bet = old.Bet + stat.Bet, - PaidOut = old.PaidOut + stat.PaidOut, - }, () => new() - { - Feature = key - }); + .InsertOrUpdateAsync(() => new() + { + Feature = key, + Bet = stat.Bet, + PaidOut = stat.PaidOut, + DateAdded = DateTime.UtcNow + }, + old => new() + { + Bet = old.Bet + stat.Bet, + PaidOut = old.PaidOut + stat.PaidOut, + }, + () => new() + { + Feature = key + }); } } } catch (Exception ex) { - Log.Error(ex, "An error occurred in gambling tx tracker"); - } - finally - { - await trans.CommitAsync(); + Log.Error(ex, "An error occurred in betstats gambling tx tracker"); } } } - public Task TrackAdd(long amount, TxData? txData) + private async Task RunUserStatsCollector() + { + var timer = new PeriodicTimer(TimeSpan.FromSeconds(5)); + while (await timer.WaitForNextTickAsync()) + { + try + { + if (userStats.Count == 0) + continue; + + var users = new List(userStats.Count + 5); + + while (userStats.TryTake(out var s)) + users.Add(s); + + if (users.Count == 0) + continue; + + foreach (var (k, x) in users.GroupBy(x => (x.UserId, x.Game)) + .ToDictionary(x => x.Key, + x => x.Aggregate((a, b) => new() + { + WinCount = a.WinCount + b.WinCount, + LoseCount = a.LoseCount + b.LoseCount, + TotalBet = a.TotalBet + b.TotalBet, + PaidOut = a.PaidOut + b.PaidOut, + MaxBet = Math.Max(a.MaxBet, b.MaxBet), + MaxWin = Math.Max(a.MaxWin, b.MaxWin), + }))) + { + // bulk upsert in the future + await using var uow = _db.GetDbContext(); + await uow.GetTable() + .InsertOrUpdateAsync(() => new() + { + UserId = k.UserId, + Game = k.Game, + WinCount = x.WinCount, + LoseCount = Math.Max(0, x.LoseCount), + TotalBet = x.TotalBet, + PaidOut = x.PaidOut, + MaxBet = x.MaxBet, + MaxWin = x.MaxWin + }, + o => new() + { + WinCount = o.WinCount + x.WinCount, + LoseCount = Math.Max(0, o.LoseCount + x.LoseCount), + TotalBet = o.TotalBet + x.TotalBet, + PaidOut = o.PaidOut + x.PaidOut, + MaxBet = Math.Max(o.MaxBet, x.MaxBet), + MaxWin = Math.Max(o.MaxWin, x.MaxWin), + }, + () => new() + { + UserId = k.UserId, + Game = k.Game + }); + } + } + catch (Exception ex) + { + Log.Error(ex, "An error occurred in UserBetStats gambling tx tracker"); + } + } + } + + public Task TrackAdd(ulong userId, long amount, TxData? txData) { if (txData is null) return Task.CompletedTask; - + if (_gamblingTypes.Contains(txData.Type)) { - _stats.AddOrUpdate(txData.Type, + globalStats.AddOrUpdate(txData.Type, _ => (0, amount), (_, old) => (old.Bet, old.PaidOut + amount)); } + var mType = GetGameType(txData.Type); + + if (mType is not { } type) + return Task.CompletedTask; + + if (txData.Type == "lula") + { + if (txData.Extra == "lose") + { + userStats.Add(new() + { + UserId = userId, + Game = type, + WinCount = 0, + LoseCount = 0, + TotalBet = 0, + PaidOut = amount, + MaxBet = 0, + MaxWin = amount, + }); + return Task.CompletedTask; + } + } + else if (txData.Type == "animalrace") + { + if (txData.Extra == "refund") + { + userStats.Add(new() + { + UserId = userId, + Game = type, + WinCount = 0, + LoseCount = -1, + TotalBet = -amount, + PaidOut = 0, + MaxBet = 0, + MaxWin = 0, + }); + + return Task.CompletedTask; + } + } + + userStats.Add(new UserBetStats() + { + UserId = userId, + Game = type, + WinCount = 1, + LoseCount = -1, + TotalBet = 0, + PaidOut = amount, + MaxBet = 0, + MaxWin = amount, + }); + return Task.CompletedTask; } - public Task TrackRemove(long amount, TxData? txData) + public Task TrackRemove(ulong userId, long amount, TxData? txData) { if (txData is null) return Task.CompletedTask; - + if (_gamblingTypes.Contains(txData.Type)) { - _stats.AddOrUpdate(txData.Type, + globalStats.AddOrUpdate(txData.Type, _ => (amount, 0), (_, old) => (old.Bet + amount, old.PaidOut)); } + var mType = GetGameType(txData.Type); + + if (mType is not { } type) + return Task.CompletedTask; + + userStats.Add(new UserBetStats() + { + UserId = userId, + Game = type, + WinCount = 0, + LoseCount = 1, + TotalBet = amount, + PaidOut = 0, + MaxBet = amount, + MaxWin = 0 + }); + return Task.CompletedTask; } + private static GamblingGame? GetGameType(string game) + => game switch + { + "lula" => GamblingGame.Lula, + "betroll" => GamblingGame.Betroll, + "betflip" => GamblingGame.Betflip, + "blackjack" => GamblingGame.Blackjack, + "betdraw" => GamblingGame.Betdraw, + "slot" => GamblingGame.Slots, + "animalrace" => GamblingGame.Race, + _ => null + }; + public async Task> GetAllAsync() { await using var ctx = _db.GetDbContext(); return await ctx.Set() - .ToListAsyncEF(); + .ToListAsyncEF(); } + + public async Task> GetUserStatsAsync(ulong userId, GamblingGame? game = null) + { + await using var ctx = _db.GetDbContext(); + + + if (game is null) + return await ctx + .GetTable() + .Where(x => x.UserId == userId) + .ToListAsync(); + + return await ctx + .GetTable() + .Where(x => x.UserId == userId && x.Game == game) + .ToListAsync(); + } +} + +public sealed class UserBetStats +{ + public int Id { get; set; } + public ulong UserId { get; set; } + public GamblingGame Game { get; set; } + public long WinCount { get; set; } + public long LoseCount { get; set; } + public decimal TotalBet { get; set; } + public decimal PaidOut { get; set; } + public long MaxWin { get; set; } + public long MaxBet { get; set; } +} + +public enum GamblingGame +{ + Betflip = 0, + Bf = 0, + Betroll = 1, + Br = 1, + Betdraw = 2, + Bd = 2, + Slots = 3, + Slot = 3, + Blackjack = 4, + Bj = 4, + Lula = 5, + Race = 6, + AnimalRace = 6 } \ No newline at end of file diff --git a/src/EllieBot/data/aliases.yml b/src/EllieBot/data/aliases.yml index 82576db..31e8715 100644 --- a/src/EllieBot/data/aliases.yml +++ b/src/EllieBot/data/aliases.yml @@ -848,6 +848,10 @@ eventstart: - eventstart betstats: - betstats + - bs +gamblestats: + - gamblestats + - gs bettest: - bettest slot: diff --git a/src/EllieBot/data/gambling.yml b/src/EllieBot/data/gambling.yml index ddae85e..3455517 100644 --- a/src/EllieBot/data/gambling.yml +++ b/src/EllieBot/data/gambling.yml @@ -1,5 +1,5 @@ # DO NOT CHANGE -version: 9 +version: 10 # Currency settings currency: # What is the emoji/character which represents the currency @@ -57,7 +57,7 @@ timely: # setting to 0 or less will disable this feature cooldown: 12 # Whether the users are required to type a password when they do timely. - requirePassword: true + hasButton: true # How much will each user's owned currency decay over time. decay: # Percentage of user's current currency which will be deducted every 24h. @@ -273,3 +273,10 @@ voteReward: 100 slots: # Hex value of the color which the numbers on the slot image will have. currencyFontColor: ff0000 +# Bonus config for server boosts +boostBonus: + # Users will receive a bonus if they boost any of these servers + guildIds: + - 117523346618318850 + # This bonus will be added before any other multiplier is applied to the .timely command + baseTimelyBonus: 50 diff --git a/src/EllieBot/migrate.ps1 b/src/EllieBot/migrate.ps1 new file mode 100644 index 0000000..62f9b69 --- /dev/null +++ b/src/EllieBot/migrate.ps1 @@ -0,0 +1,8 @@ +if ($args.Length -eq 0) { + Write-Host "Please provide a migration name." -ForegroundColor Red +} +else { + $migrationName = $args[0] + dotnet ef migrations add $migrationName -c SqliteContext -p EllieBot.csproj + dotnet ef migrations add $migrationName -c PostgreSqlContext -p EllieBot.csproj +} \ No newline at end of file diff --git a/remove-migrations.ps1 b/src/EllieBot/remove-migrations.ps1 similarity index 100% rename from remove-migrations.ps1 rename to src/EllieBot/remove-migrations.ps1