diff --git a/.gitignore b/.gitignore index 8c045b8..8330cb8 100644 --- a/.gitignore +++ b/.gitignore @@ -20,8 +20,9 @@ src/EllieBot/credentials.json src/EllieBot/old_credentials.json src/EllieBot/credentials.json.bak src/EllieBot/data/EllieBot.db -ellie-menu.ps1 -package.sh +build.ps1 +build.sh +test.ps1 # Created by https://www.gitignore.io/api/visualstudio,visualstudiocode,windows,linux,macos diff --git a/CHANGELOG.md b/CHANGELOG.md index e565936..e842b1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,316 +2,43 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o -## [5.1.20] - 13.11.2024 +## Unreleased ### Added -- Added `.rakeback` command, get a % of house edge back as claimable currency -- Added `.snipe` command to quickly get a copy of a posted message as an embed - - You can reply to a message to snipe that message - - Or just type .snipe and the bot will snipe the last message in the channel with content or image -- Added `.betstatsreset` / `.bsreset` command to reset your stats for a fee -- Added `.gamblestatsreset` / `.gsreset` owner-only command to reset bot stats for all games -- Added `.waifuclaims` command which lists all of your claimed waifus -- Added and changed `%bot.time%` and `%bot.date%` placeholders. They use timestamp tags now - -### Changed - -- `.divorce` no longer has a cooldown -- `.betroll` has a 2% better payout -- `.slot` payout balanced out (less volatile), reduced jackpot win but increased other wins, - - now has a new symbol, wheat - - worse around 1% in total (now shares the top spot with .bf) - -## [5.1.19] - 05.11.2024 - -### Added - -- Added `.betstats` - - See your own stats with .betstats - - Target someone else: .betstats @mai_lanfiel - - You can also specify a game .betstats lula - - Or both! .betstats mai_lanfiel br -- `.timely` can now have a server boost bonus - - Configure server ids and reward amount in data/gambling.yml - - anyone who boosts one of the sepcified servers gets the amount as base timely bonus - -### Changed - -- `.plant/pick` password font size will be slightly bigger -- `.race` will now have 82-94% payout rate based on the number of players playing (1-12, x0.01 per player). -- Any player over 12 won't increase payout - -### Fixed - -- `.xplb` and `.xpglb` now have proper ranks after page 1 -- Fixed boost bonus on shards different than the specified servers' shard - -## [5.1.18] - 04.11.2024 - -### Added - -- Added `.translateflags` / `.trfl` command. - - Enable on a per-channel basis. - - Reacting on any message in that channel with a flag emoji will post the translation of that message in the - language of that country - - 5 second cooldown per user - - The message can only be translated once per language (counter resets every 24h) -- `.timely` now has a button. Togglable via `.conf gambling` it's called pass because previously it was a captcha, but captchas are too annoying - -## Changed - -- [public bot] Patreon reward bonus for flowers reduced. Timely bonuses stay the same -- discriminators removed from the databases. All users who had ???? as discriminator have been renamed to ??username. - - all new unknown users will have ??Unknown as their name -- Flower currency generation will now have a strikeout to try combat the pickbots. This is the weakest but easiest protection to implement. There may be more options in the future - -## Fixed - -- nunchi join game message is now ok color instead of error color - -## [5.1.17] - 29.10.2024 - -### Fixed - -- fix: Bot will now not accept .aar Role if that Role is higher than or equal to bot's role. Previously bot would just - fail silently, now there is a proper error message. - -## [5.1.16] - 28.10.2024 - -## Added - -- Added .ncanvas and related commands. - - You can set pixel colors (and text) on a 500x350 canvas, pepega version of r/place - - You use currency to set pixels. - - Commands: - - see the entire canvas: `.nc` - - zoom: `.ncz ` or `.ncz x y` - - set pixel: `.ncsp ` - - get pixel: `.ncp ` - - Owners can use .ncsetimg to set a starting image, use `.h .setimg` for instructions - - Owners can reset the whole canvas via `.ncreset` - -## [5.1.15] - 21.10.2024 - -## Added - -- Added -c option for `.xpglb` - -## Change - -- Leaderboards will now show 10 users per page -- A lot of internal changes and improvements - -## Fixed - -- Fixed a big issue which caused several features to not get loaded on bot restart -- Alias collision fix `.qse` is now quotesearch, `.qs` will stay `.queuesearch` -- Fixed some migrations which would prevent users from updating from ancient versions -- Waifulb will no longer show #0000 discrims -- More `.greet` command fixes -- Author name will now be counted as content in embeds. Embeds can now only have author fields and still be valid -- Grpc api fixes, and additions - -## [5.1.14] - 03.10.2024 - -## Changed - -- Improved `.xplb -c`, it will now correctly only show users who are still in the server with no count limit - -## Fixed - -- Fixed marmalade load error on startup - -## [5.1.13] - 03.10.2024 - -### Fixed - -- Grpc api server will no longer start unless enabled in creds -- Seq comment in creds fixed - -## [5.1.12] - 03.10.2024 - -### Added - -- Added support for `seq` for logging. If you fill in seq url and apiKey in creds.yml, bot will sends logs to it - -### Fixed - -- Fixed the Check for updates service not using the right URL and spitting an error in the console. -- Fixed another bug in `.greet` / `.bye` system, which caused it to show wrong message on a wrong server occasionally - -## [5.1.11] - 03.10.2024 - -### Added - -- Added `%user.displayname%` placeholder. It will show users nickname, if there is one, otherwise it will show the - username. - - Nickname won't be shown in bye messages. -- Added initial version of grpc api. Beta - -### Fixed - -- Fixed a bug which caused `.bye` and `.greet` messages to be randomly disabled -- Fixed `.lb -c` breaking sometimes, and fixed pagination - -### Changed - -- Youtube now always uses `yt-dlp`. Dropped support for `youtube-dl` - - If you've previously renamed your yt-dlp file to youtube-dl, please rename it back. -- ytProvider in data/searches.yml now also controls where you're getting your song streams from. - - (Invidious support added for .q) - -## [5.1.10] - 24.09.2024 - -### Fixed - -- Fixed claimed waifu decay in `games.yml` - -### Changed - -- Added some logs for greet service in case there are unforeseen issues, for easier debugging - -## [5.1.9] - 21.09.2024 - -### Fixed - -- Fixed `.greettest`, and other `.*test` commands if you didn't have them enabled. -- Fixed `.greetdmtest` sending messages twice. -- Fixed a serious bug which caused greet messages to be jumbled up, and wrong ones to be sent for the wrong events. - - There is no database issue, all greet messages are safe, the cache was caching any setting every 3 seconds with no - regard for the type of the event - - This also caused `.greetdm` messages to not be sent if `.greet` is enabled - - This bug was introduced in 5.1.8. PLEASE UPDATE if you are on 5.1.8 -- Selfhosters only: Fixed marmalade dependency loading - - Note: Make sure to not publish any other DLLs besides the ones you are sure you will need, as there can be version - conflicts which didn't happen before. - -## [5.1.8] - 20.09.2024 - -### Added - -- Added `.leaveunkeptservers` which will make the bot leave all servers on all shards whose owners didn't run `.keep` command. - - This is a dangerous and irreversible command, don't use it. Meant for use on the public bot. -- `.adpl` now supports custom statuses (you no longer need to specify Playing, Watching, etc...) - -### Changed - -- `.quote` commands cleaned up and improved - - All quote commands now start with `.q` and follow the same naming pattern as Expression commands - - `.liqu` renamed to `.qli` - - `.quotesearch` / `.qse` is now paginated for easier searching -- `.whosplaying` is now paginated -- `.img` is now paginated -- `.setgame` renamed to`.setactivity` and now supports custom text activity. You don't have to specify playing, listening etc before the activity -- Clarified and added some embed / placeholder links to command help where needed -- dev: A lot of code cleanup and internal improvements - -### Fixed - -- Fixed `.xpcurrew` breaking xp gain if user gains 0 xp from being in a voice channel -- Fixed a bug in `.gatari` command -- Fixed some waifu related strings -- Fixed `.quoteshow` and `.quoteid` commands -- Fixed some placeholders not working in `.greetdm` -- Fixed postgres support -- Fixed and clarified some command strings/parameter descriptions - -### Removed - -- Removed mysql support as it didn't work for a while, and requires some special handling/maintenance - - Sqlite and Postgres support stays - -## [5.1.7] - 09.08.2024 - -### Fixed - -- Fixed some command groups incorrectly showing up as modules - -## [5.1.6] - 08.08.2024 - -### Added - -- `.serverlist` is now paginated - -### Changed - -- `.listservers` renamed to `.serverlist` - -### Fixed - -- `.afk` messages can no longer ping, and the response is moved to DMs to avoid abuse -- Possible fix for `.remind` timestamp - -### Removed - -- Removed old bloat / semi broken / dumb commands - - `.memelist` / `.memegen` (too inconvenient to use) - - `.activity` (useless owner-only command) - - `.rafflecur` (Just use raffle and then award manually instead) - - `.rollduel` (we had this command?) -- You can no longer bet on `.connect4` -- `.economy` Removed. - - Was buggy and didn't really show the real state of the economy. - - It might come back improved in the future -- `.mal` Removed. Useless information / semi broken - -## [5.1.5] - 01.08.2024 - -### Added - -- Added: Added a `.afk ?` command which sets an afk message which will trigger whenever someone pings you - - Message will when you type a message in any channel that the bot sees, or after 8 hours, whichever comes first - - The specified message will be prefixed with "The user is afk: " - - The afk message will disappear 30 seconds after being triggered - -### Changed - -- Bot now shows a message when .prune fails due to already running error -- Updated some bet descriptions to include 'all' 'half' usage instructions -- Updated some command strings -- dev: Vastly simplified marmalade creation using dotnet templates, docs updated -- Slight refactor of .wiki, time, .catfact, .wikia, .define, .bible and .quran commands, no significant change in functionality - -### Fixed - -- .coins will no longer show double minus sign for negative changes -- You can once again disable cleverbot responses using fake 'cleverbot:response' module name in permission commands - -### Removed - -- Removed .rip command +- Added: Added a `'afk ?` command which sets an afk message which will trigger whenever someone pings you + - Message will when you type a message in any channel that the bot sees, or after 8 hours, whichever comes first + - The specified message will be prefixed with "The user is afk: " + - The afk message will disappear 30 seconds after being triggered ## [5.1.4] - 15.07.2024 ### Added -- Added `.coins` command which lists top 10 cryptos ordered by marketcap -- Added Clubs rank in the leaderboard to `.clubinfo` +- Added `'coins` command which lists top 10 cryptos ordered by marketcap +- Added Clubs rank in the leaderboard to `'clubinfo` - Bot owners can now check other people's bank balance (Not server owners, only bot owner, the person who is hosting the bot) -- You can now send multiple waifu gifts at once to waifus. For example `.waifugift 3xRose @user` will give that user 3 roses - - The format is `x`, no spaces -- Added `.boosttest` command -- Added support for any openai compatible api for the chatterbot feature change: - - Changed games.yml to allow input of the apiUrl (needs to be openai compatible) and modelName as a string. +- You can now send multiple waifu gifts at once to waifus. For example `'waifugift 3xRose @user` will give that user 3 roses + - The format is `x`, no spaces +- Added `'boosttest` command ### Changed -- Updated command strings to clarify `.say` and `.send` usages +- Updated command strings to clarify `'say` and `'send` usages ### Fixed -- Fixed `.waifugift` help string +- Fixed `'waifugift` help string ### Removed -- Removed selfhost button from `.donate` command, no idea why it was there in the first place +- Removed selfhost button from `'donate` command, no idea why it was there in the first place ## [5.1.3] - 08.07.2024 ### Added -- Added `.quran` command, which will show the provided ayah in english and arabic, including recitation by Alafasy +- Added `'quran` command, which will show the provided ayah in english and arabic, including recitation by Alafasy ### Changed @@ -319,7 +46,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da ### Fixed -- Fixed `.stickeradd` it now properly supports 300x300 image uploads. +- Fixed `'stickeradd` it now properly supports 300x300 image uploads. - Bot should now trim the invalid characters from chatterbot usernames to avoid openai errors - Fixed prompt triggering chatterbot responses twice - Honeypot commands now actually works @@ -334,15 +61,15 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da ### Added -- Added `.honeypot` command, which automatically softbans (ban and immediate unban) any user who posts in that channel. - - Useful to auto softban bots who spam every channel upon joining - - Users who run commands or expressions won't be softbanned. - - Users who have ban member permissions are also excluded. +- Added `'honeypot` command, which automatically softbans (ban and immediate unban) any user who posts in that channel. + - Useful to auto softban bots who spam every channel upon joining + - Users who run commands or expressions won't be softbanned. + - Users who have ban member permissions are also excluded. ### Fixed -- Fixed `.betdraw` not respecting maxbet -- Fixed `.xpshop` pagination for real this time? +- Fixed `'betdraw` not respecting maxbet +- Fixed `'xpshop` pagination for real this time? ## [5.1.0] - 28.06.2024 @@ -351,6 +78,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da - Added support for `gpt-4o` in `data/games.yml` - Added EllieAiToken to `creds.yml` + ### Changed - Remind will now show a timestamp tag for durations @@ -363,8 +91,8 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da - Fixed xp bg buy button not working, and possibly some other buttons too - Fixed shopbuy %user% placeholders and updated help text -- All .feed overloads should now work" -- `.xpexclude` should will now work with forums too. If you exclude a forum you won't be able to gain xp in any of the threads. +- All 'feed overloads should now work" +- `'xpexclude` should will now work with forums too. If you exclude a forum you won't be able to gain xp in any of the threads. - Fixed remind not showing correct time ### Removed @@ -376,14 +104,12 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da ### Added -- Added `.setserverbanner` and `.setservericon` commands -- Added overloads section to `.h command` which will show you all versions of command usage with param names -- You can now check commands for submodules, for example `.cmds SelfAssignedRoles` will show brief help for each of the - commands in that submodule -- Added dropdown menus for .mdls and .cmds (both module and group versions) which will give you the option to see more - detailed help for each specific module, group or command respectively +- Added `'setserverbanner` and `'setservericon` commands +- Added overloads section to `'h command` which will show you all versions of command usage with param names +- You can now check commands for submodules, for example `'cmds SelfAssignedRoles` will show brief help for each of the commands in that submodule +- Added dropdown menus for 'mdls and 'cmds (both module and group versions) which will give you the option to see more detailed help for each specific module, group or command respectively - Self-Hosters only: - - Added a dangerous cleanup command that you don't have to know about + - Added a dangerous cleanup command that you don't have to know about ### Changed @@ -391,7 +117,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except da ### Fixed -- `.verbose` will now be respected for expression errors -- Using `.pick` will now correctly show the name of the user who picked the currency -- Fixed `.h` not working on some commands -- `.langset` and `.langsetd` should no longer allow unsupported languages and nonsense to be typed in +- `'verbose` will now be respected for expression errors +- Using `'pick` will now correctly show the name of the user who picked the currency +- Fixed `'h` not working on some commands +- `'langset` and `'langsetd` should no longer allow unsupported languages and nonsense to be typed in \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 889584a..dcdedcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,16 @@ -# Use the .NET 8.0 SDK as the base image for the build stage -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /source -# Copy the .csproj files for each project COPY src/Ellie.Marmalade/*.csproj src/Ellie.Marmalade/ COPY src/EllieBot/*.csproj src/EllieBot/ COPY src/EllieBot.Coordinator/*.csproj src/EllieBot.Coordinator/ COPY src/EllieBot.Generators/*.csproj src/EllieBot.Generators/ COPY src/EllieBot.Voice/*.csproj src/EllieBot.Voice/ - -# Restore the dependencies for the EllieBot project +COPY NuGet.Config ./ RUN dotnet restore src/EllieBot/ -# Copy the rest of the source code COPY . . - -# Set the working directory to the EllieBot project WORKDIR /source/src/EllieBot - -# Build and publish the EllieBot project, then clean up unnecessary files RUN set -xe; \ dotnet --version; \ dotnet publish -c Release -o /app --no-restore; \ @@ -27,33 +19,28 @@ RUN set -xe; \ find /app -type f -exec chmod -x {} \; ;\ chmod +x /app/EllieBot -# Use the .NET 8.0 runtime as the base image for the final stage -FROM mcr.microsoft.com/dotnet/runtime:8.0 +# final stage/image +FROM mcr.microsoft.com/dotnet/runtime:6.0 WORKDIR /app -# Create a new user, install dependencies, and set up sudoers file RUN set -xe; \ useradd -m ellie; \ apt-get update; \ apt-get install -y --no-install-recommends libopus0 libsodium23 libsqlite3-0 curl ffmpeg python3 sudo; \ + update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1; \ echo 'Defaults>ellie env_keep+="ASPNETCORE_* DOTNET_* EllieBot_* shard_id total_shards TZ"' > /etc/sudoers.d/ellie; \ curl -Lo /usr/local/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp; \ chmod a+rx /usr/local/bin/yt-dlp; \ apt-get autoremove -y; \ apt-get autoclean -y -# Copy the built application and the entrypoint script from the build stage COPY --from=build /app ./ COPY docker-entrypoint.sh /usr/local/sbin -# Set environment variables ENV shard_id=0 ENV total_shards=1 ENV EllieBot__creds=/app/data/creds.yml -# Define the data directory as a volume VOLUME [" /app/data "] - -# Set the entrypoint and default command ENTRYPOINT [ "/usr/local/sbin/docker-entrypoint.sh" ] CMD dotnet EllieBot.dll "$shard_id" "$total_shards" diff --git a/EllieBot.sln b/EllieBot.sln index 47179ff..f34ad17 100644 --- a/EllieBot.sln +++ b/EllieBot.sln @@ -9,9 +9,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject CHANGELOG.md = CHANGELOG.md Dockerfile = Dockerfile - ellie-menu.ps1 = ellie-menu.ps1 LICENSE = LICENSE + migrate.ps1 = migrate.ps1 README.md = README.md + remove-migrations.ps1 = remove-migrations.ps1 + TODO.md = TODO.md EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EllieBot", "src\EllieBot\EllieBot.csproj", "{4D9001F7-B3E8-48FE-97AA-CFD36DA65A64}" @@ -28,8 +30,6 @@ 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("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EllieBot.GrpcApiBase", "src\EllieBot.GrpcApiBase\EllieBot.GrpcApiBase.csproj", "{3B71F0BF-AE6C-480C-AB88-FCE23EDC7D91}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -64,10 +64,6 @@ Global {1D93CE3C-80B4-49C7-A9A2-99988920AAEC}.Debug|Any CPU.Build.0 = Debug|Any CPU {1D93CE3C-80B4-49C7-A9A2-99988920AAEC}.Release|Any CPU.ActiveCfg = Release|Any CPU {1D93CE3C-80B4-49C7-A9A2-99988920AAEC}.Release|Any CPU.Build.0 = Release|Any CPU - {3B71F0BF-AE6C-480C-AB88-FCE23EDC7D91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3B71F0BF-AE6C-480C-AB88-FCE23EDC7D91}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3B71F0BF-AE6C-480C-AB88-FCE23EDC7D91}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3B71F0BF-AE6C-480C-AB88-FCE23EDC7D91}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -80,7 +76,6 @@ Global {F1A77F56-71B0-430E-AE46-94CDD7D43874} = {B28FB883-9688-41EB-BF5A-945F4A4EB628} {76AC715D-12FF-4CBE-9585-A861139A2D0C} = {B28FB883-9688-41EB-BF5A-945F4A4EB628} {1D93CE3C-80B4-49C7-A9A2-99988920AAEC} = {B28FB883-9688-41EB-BF5A-945F4A4EB628} - {3B71F0BF-AE6C-480C-AB88-FCE23EDC7D91} = {B28FB883-9688-41EB-BF5A-945F4A4EB628} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {79F61C2C-CDBB-4361-A234-91A0B334CFE4} diff --git a/migrate.ps1 b/migrate.ps1 new file mode 100644 index 0000000..a5d5685 --- /dev/null +++ b/migrate.ps1 @@ -0,0 +1,9 @@ +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 + dotnet ef migrations add $migrationName -o Migrations/Sqlite -c MysqlContext -p src/EllieBot/EllieBot.csproj +} \ No newline at end of file diff --git a/src/EllieBot/remove-migrations.ps1 b/remove-migrations.ps1 similarity index 59% rename from src/EllieBot/remove-migrations.ps1 rename to remove-migrations.ps1 index 56fc594..5445dbb 100644 --- a/src/EllieBot/remove-migrations.ps1 +++ b/remove-migrations.ps1 @@ -1,2 +1,3 @@ dotnet ef migrations remove -c SqliteContext -f -p src/EllieBot/EllieBot.csproj -dotnet ef migrations remove -c PostgreSqlContext -f -p src/EllieBot/EllieBot.csproj \ No newline at end of file +dotnet ef migrations remove -c PostgreSqlContext -f -p src/EllieBot/EllieBot.csproj +dotnet ef migrations remove -c MysqlContext -f -p src/EllieBot/EllieBot.csproj \ No newline at end of file diff --git a/src/Ellie.Marmalade/Context/AnyContext.cs b/src/Ellie.Marmalade/Context/AnyContext.cs index 5af3930..4f7207c 100644 --- a/src/Ellie.Marmalade/Context/AnyContext.cs +++ b/src/Ellie.Marmalade/Context/AnyContext.cs @@ -1,4 +1,5 @@ using Discord; +using EllieBot; namespace EllieBot.Marmalade; diff --git a/src/EllieBot.Generators/EllieBot.Generators.csproj b/src/EllieBot.Generators/EllieBot.Generators.csproj index 4e94449..1dbbc1d 100644 --- a/src/EllieBot.Generators/EllieBot.Generators.csproj +++ b/src/EllieBot.Generators/EllieBot.Generators.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/EllieBot.Generators/GrpcApiPermGenerator.cs b/src/EllieBot.Generators/GrpcApiPermGenerator.cs deleted file mode 100644 index 34d66bc..0000000 --- a/src/EllieBot.Generators/GrpcApiPermGenerator.cs +++ /dev/null @@ -1,184 +0,0 @@ -#nullable enable -using System.CodeDom.Compiler; -using System.Collections.Immutable; -using System.Diagnostics; -using System.Text; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.CodeAnalysis.Text; -using Newtonsoft.Json; - -namespace EllieBot.Generators -{ - public readonly record struct MethodPermData - { - public readonly ImmutableArray<(string Name, string Value)> MethodPerms; - public readonly ImmutableArray NoAuthRequired; - - public MethodPermData(ImmutableArray<(string Name, string Value)> methodPerms, - ImmutableArray noAuthRequired) - { - MethodPerms = methodPerms; - NoAuthRequired = noAuthRequired; - } - } - - - [Generator] - public class GrpcApiPermGenerator : IIncrementalGenerator - { - public const string GRPC_API_PERM_ATTRIBUTE = - """ - namespace EllieBot.GrpcApi; - - [System.AttributeUsage(System.AttributeTargets.Method)] - public class GrpcApiPermAttribute : System.Attribute - { - public GuildPerm Value { get; } - public GrpcApiPermAttribute(GuildPerm value) => Value = value; - } - """; - - public const string GRPC_NO_AUTH_REQUIRED_ATTRIBUTE = - """ - namespace EllieBot.GrpcApi; - - [System.AttributeUsage(System.AttributeTargets.Method)] - public class GrpcNoAuthRequiredAttribute : System.Attribute - { - } - """; - - public void Initialize(IncrementalGeneratorInitializationContext context) - { - context.RegisterPostInitializationOutput(ctx => ctx.AddSource("GrpcApiPermAttribute.cs", - SourceText.From(GRPC_API_PERM_ATTRIBUTE, Encoding.UTF8))); - - context.RegisterPostInitializationOutput(ctx => ctx.AddSource("GrpcNoAuthRequiredAttribute.cs", - SourceText.From(GRPC_NO_AUTH_REQUIRED_ATTRIBUTE, Encoding.UTF8))); - - var perms = context.SyntaxProvider - .ForAttributeWithMetadataName( - "EllieBot.GrpcApi.GrpcApiPermAttribute", - predicate: static (s, _) => s is MethodDeclarationSyntax, - transform: static (ctx, _) => GetMethodSemanticTargets(ctx.SemanticModel, ctx.TargetNode)) - .Where(static m => m is not null) - .Select(static (x, _) => x!.Value) - .Collect(); - - - var all = context.SyntaxProvider - .ForAttributeWithMetadataName( - "EllieBot.GrpcApi.GrpcNoAuthRequiredAttribute", - predicate: static (s, _) => s is MethodDeclarationSyntax, - transform: static (ctx, _) => GetNoAuthMethodName(ctx.SemanticModel, ctx.TargetNode)) - .Collect() - .Combine(perms) - .Select((x, _) => new MethodPermData(x.Right, x.Left)); - - context.RegisterSourceOutput(all, - static (spc, source) => Execute(source, spc)); - } - - private static string GetNoAuthMethodName(SemanticModel model, SyntaxNode node) - => ((MethodDeclarationSyntax)node).Identifier.Text; - - private static (string Name, string Value)? GetMethodSemanticTargets(SemanticModel model, SyntaxNode node) - { - var method = (MethodDeclarationSyntax)node; - - var name = method.Identifier.Text; - var attr = method.AttributeLists - .SelectMany(x => x.Attributes) - .FirstOrDefault(); - - if (attr is null) - return null; - - return (name, attr.ArgumentList?.Arguments[0].ToString() ?? "__missing_perm__"); - } - - private static void Execute(MethodPermData data, SourceProductionContext ctx) - { - using (var stringWriter = new StringWriter()) - using (var sw = new IndentedTextWriter(stringWriter)) - { - sw.WriteLine("using System.Collections.Frozen;"); - sw.WriteLine(); - sw.WriteLine("namespace EllieBot.GrpcApi;"); - sw.WriteLine(); - - sw.WriteLine("public partial class GrpcApiPermsInterceptor"); - sw.WriteLine("{"); - - sw.Indent++; - - sw.WriteLine( - "private static FrozenDictionary _perms = new Dictionary()"); - sw.WriteLine("{"); - - sw.Indent++; - foreach (var field in data.MethodPerms) - { - sw.WriteLine("{{ \"{0}\", {1} }},", field.Name, field.Value); - } - - sw.Indent--; - sw.WriteLine("}.ToFrozenDictionary();"); - - sw.WriteLine(); - sw.WriteLine("private static FrozenSet _noAuthRequired = new HashSet()"); - sw.WriteLine("{"); - - sw.Indent++; - foreach (var noauth in data.NoAuthRequired) - { - sw.WriteLine("{{ \"{0}\" }},", noauth); - } - - sw.WriteLine(""); - - sw.Indent--; - sw.WriteLine("}.ToFrozenSet();"); - - sw.Indent--; - sw.WriteLine("}"); - - sw.Flush(); - ctx.AddSource("GrpcApiInterceptor.g.cs", stringWriter.ToString()); - } - } - - private List GetFields(string? dataText) - { - if (string.IsNullOrWhiteSpace(dataText)) - return new(); - - Dictionary data; - try - { - var output = JsonConvert.DeserializeObject>(dataText!); - if (output is null) - return new(); - - data = output; - } - catch - { - Debug.WriteLine("Failed parsing responses file."); - return new(); - } - - var list = new List(); - foreach (var entry in data) - { - list.Add(new( - entry.Key, - entry.Value - )); - } - - return list; - } - } -} \ No newline at end of file diff --git a/src/EllieBot.GrpcApiBase/EllieBot.GrpcApiBase.csproj b/src/EllieBot.GrpcApiBase/EllieBot.GrpcApiBase.csproj deleted file mode 100644 index c941779..0000000 --- a/src/EllieBot.GrpcApiBase/EllieBot.GrpcApiBase.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - net8.0 - enable - enable - - - - - - - - - - - Server - - - - \ No newline at end of file diff --git a/src/EllieBot.GrpcApiBase/protos/canvas.proto b/src/EllieBot.GrpcApiBase/protos/canvas.proto deleted file mode 100644 index e2ea366..0000000 --- a/src/EllieBot.GrpcApiBase/protos/canvas.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "EllieBot.GrpcApi"; - -import "google/protobuf/empty.proto"; - -package ncanvas; - -service GrpcNCanvas { - rpc GetCanvas(google.protobuf.Empty) returns (CanvasReply); - rpc GetPixel(GetPixelRequest) returns (GetPixelReply); - rpc SetPixel(SetPixelRequest) returns (SetPixelReply); -} - -message CanvasReply { - repeated uint32 pixels = 1; - int32 width = 2; - int32 height = 3; -} - -message GetPixelRequest { - int32 x = 1; - int32 y = 2; -} - -message GetPixelReply { - string color = 1; - uint32 packedColor = 2; - int32 positionX = 3; - int32 positionY = 4; - int64 price = 5; - string text = 6; - string position = 7; -} - -message SetPixelRequest { - string position = 1; - string color = 2; - string text = 3; - int64 price = 4; -} - -message SetPixelReply { - string error = 1; - bool success = 2; - optional GetPixelReply pixel = 3; -} \ No newline at end of file diff --git a/src/EllieBot.GrpcApiBase/protos/exprs.proto b/src/EllieBot.GrpcApiBase/protos/exprs.proto deleted file mode 100644 index 056d4a5..0000000 --- a/src/EllieBot.GrpcApiBase/protos/exprs.proto +++ /dev/null @@ -1,89 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "EllieBot.GrpcApi"; - -import "google/protobuf/empty.proto"; - -package exprs; - -service GrpcExprs { - rpc GetExprs(GetExprsRequest) returns (GetExprsReply); - rpc AddExpr(AddExprRequest) returns (AddExprReply); - rpc DeleteExpr(DeleteExprRequest) returns (google.protobuf.Empty); - - rpc GetQuotes(GetQuotesRequest) returns (GetQuotesReply); - rpc AddQuote(AddQuoteRequest) returns (AddQuoteReply); - rpc DeleteQuote(DeleteQuoteRequest) returns (google.protobuf.Empty); -} - -message DeleteExprRequest { - string id = 1; - uint64 guildId = 2; -} - -message GetExprsRequest { - uint64 guildId = 1; - string query = 2; - int32 page = 3; -} - -message GetExprsReply { - repeated ExprDto expressions = 1; - int32 totalCount = 2; -} - -message ExprDto { - string id = 1; - string trigger = 2; - string response = 3; - - bool ca = 4; - bool ad = 5; - bool dm = 6; - bool at = 7; -} - -message AddExprRequest { - uint64 guildId = 1; - ExprDto expr = 2; -} - -message AddExprReply { - string id = 1; - bool success = 2; -} - -message GetQuotesRequest { - uint64 guildId = 1; - string query = 2; - int32 page = 3; -} - -message GetQuotesReply { - repeated QuoteDto quotes = 1; - int32 totalCount = 2; -} - -message QuoteDto { - string id = 1; - string trigger = 2; - string response = 3; - - uint64 authorId = 4; - string authorName = 5; -} - -message AddQuoteRequest { - uint64 guildId = 1; - QuoteDto quote = 2; -} - -message AddQuoteReply { - string id = 1; - bool success = 2; -} - -message DeleteQuoteRequest { - string id = 1; - uint64 guildId = 2; -} \ No newline at end of file diff --git a/src/EllieBot.GrpcApiBase/protos/fin.proto b/src/EllieBot.GrpcApiBase/protos/fin.proto deleted file mode 100644 index 03c15be..0000000 --- a/src/EllieBot.GrpcApiBase/protos/fin.proto +++ /dev/null @@ -1,60 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "EllieBot.GrpcApi"; - -import "google/protobuf/timestamp.proto"; - -package fin; - -service GrpcFin { - rpc GetTransactions(GetTransactionsRequest) returns (GetTransactionsReply); - rpc GetHoldings(GetHoldingsRequest) returns (GetHoldingsReply); - rpc Withdraw(WithdrawRequest) returns (WithdrawReply); - rpc Deposit(DepositRequest) returns (DepositReply); -} - -message GetTransactionsRequest { - int32 page = 1; - uint64 userId = 2; -} - -message GetTransactionsReply { - repeated TransactionReply transactions = 1; - int32 total = 2; -} - -message TransactionReply { - int64 amount = 1; - string note = 2; - string type = 3; - string extra = 4; - google.protobuf.Timestamp timestamp = 5; - string id = 6; -} - -message GetHoldingsRequest { - uint64 userId = 1; -} - -message GetHoldingsReply { - int64 cash = 1; - int64 bank = 2; -} - -message WithdrawRequest { - uint64 userId = 1; - int64 amount = 2; -} - -message WithdrawReply { - bool success = 1; -} - -message DepositRequest { - uint64 userId = 1; - int64 amount = 2; -} - -message DepositReply { - bool success = 1; -} diff --git a/src/EllieBot.GrpcApiBase/protos/greet.proto b/src/EllieBot.GrpcApiBase/protos/greet.proto deleted file mode 100644 index 8f6be8a..0000000 --- a/src/EllieBot.GrpcApiBase/protos/greet.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "EllieBot.GrpcApi"; - -package greet; - -service GrpcGreet { - rpc GetGreetSettings (GetGreetRequest) returns (GrpcGreetSettings); - rpc UpdateGreet (UpdateGreetRequest) returns (UpdateGreetReply); - rpc TestGreet (TestGreetRequest) returns (TestGreetReply); -} - -message GrpcGreetSettings { - string channelId = 1; - string message = 2; - bool isEnabled = 3; - GrpcGreetType type = 4; -} - -message GetGreetRequest { - uint64 guildId = 1; - GrpcGreetType type = 2; -} - -message UpdateGreetRequest { - uint64 guildId = 1; - GrpcGreetSettings settings = 2; -} - -enum GrpcGreetType { - Greet = 0; - GreetDm = 1; - Bye = 2; - Boost = 3; -} - -message UpdateGreetReply { - bool Success = 1; -} - -message TestGreetRequest { - uint64 guildId = 1; - uint64 channelId = 2; - uint64 userId = 3; - GrpcGreetType type = 4; -} - -message TestGreetReply { - bool success = 1; - string error = 2; -} diff --git a/src/EllieBot.GrpcApiBase/protos/other.proto b/src/EllieBot.GrpcApiBase/protos/other.proto deleted file mode 100644 index 64a3170..0000000 --- a/src/EllieBot.GrpcApiBase/protos/other.proto +++ /dev/null @@ -1,144 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "EllieBot.GrpcApi"; - -import "google/protobuf/empty.proto"; - -package other; - -service GrpcOther { - rpc BotOnGuild(BotOnGuildRequest) returns (BotOnGuildReply); - rpc GetTextChannels(GetTextChannelsRequest) returns (GetTextChannelsReply); - rpc GetRoles(GetRolesRequest) returns (GetRolesReply); - - rpc GetCurrencyLb(GetLbRequest) returns (CurrencyLbReply); - rpc GetXpLb(GetLbRequest) returns (XpLbReply); - rpc GetWaifuLb(GetLbRequest) returns (WaifuLbReply); - - rpc GetShardStats(google.protobuf.Empty) returns (stream ShardStatsReply); - rpc GetCommandFeed(google.protobuf.Empty) returns (stream CommandFeedEntry); - rpc GetServerInfo(ServerInfoRequest) returns (GetServerInfoReply); -} - -message CommandFeedEntry { - string command = 1; -} - -message GetRolesRequest { - uint64 guildId = 1; -} - -message GetRolesReply { - repeated RoleReply roles = 1; -} - -message BotOnGuildRequest { - uint64 guildId = 1; -} - -message BotOnGuildReply { - bool success = 1; -} - -message ShardStatsReply { - int32 id = 1; - string status = 2; - - int32 guildCount = 3; - string uptime = 4; - int64 commands = 5; -} - -message GetTextChannelsRequest{ - uint64 guildId = 1; -} - -message GetTextChannelsReply { - repeated TextChannelReply textChannels = 1; -} - -message TextChannelReply { - uint64 id = 1; - string name = 2; -} - -message CurrencyLbReply { - repeated CurrencyLbEntryReply entries = 1; -} - -message CurrencyLbEntryReply { - string user = 1; - uint64 userId = 2; - int64 amount = 3; - string avatar = 4; -} - -message GetLbRequest { - int32 page = 1; - int32 perPage = 2; -} - -message XpLbReply { - repeated XpLbEntryReply entries = 1; -} - -message XpLbEntryReply { - string user = 1; - uint64 userId = 2; - int64 totalXp = 3; - int64 level = 4; -} - -message WaifuLbReply { - repeated WaifuLbEntry entries = 1; -} - -message WaifuLbEntry { - string user = 1; - string claimedBy = 2; - int64 value = 3; - bool isMutual = 4; -} - -message ServerInfoRequest { - uint64 guildId = 1; -} - -message GetServerInfoReply { - uint64 id = 1; - string name = 2; - string iconUrl = 3; - uint64 ownerId = 4; - string ownerName = 5; - repeated RoleReply roles = 6; - repeated EmojiReply emojis = 7; - repeated string features = 8; - int32 textChannels = 9; - int32 voiceChannels = 10; - int32 memberCount = 11; - int64 createdAt = 12; -} - -message RoleReply { - uint64 id = 1; - string name = 2; - string iconUrl = 3; - string color = 4; -} - -message EmojiReply { - string name = 1; - string url = 2; - string code = 3; -} - -message ChannelReply { - uint64 id = 1; - string name = 2; - ChannelType type = 3; -} - -enum ChannelType { - Text = 0; - Voice = 1; -} diff --git a/src/EllieBot.GrpcApiBase/protos/warn.proto b/src/EllieBot.GrpcApiBase/protos/warn.proto deleted file mode 100644 index 9b591a2..0000000 --- a/src/EllieBot.GrpcApiBase/protos/warn.proto +++ /dev/null @@ -1,107 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "EllieBot.GrpcApi"; - -package warn; - -service GrpcWarn { - rpc GetWarnSettings (WarnSettingsRequest) returns (WarnSettingsReply); - - rpc SetWarnExpiry(SetWarnExpiryRequest) returns (SetWarnExpiryReply); - rpc AddWarnp (AddWarnpRequest) returns (AddWarnpReply); - rpc DeleteWarnp (DeleteWarnpRequest) returns (DeleteWarnpReply); - - rpc GetLatestWarnings(GetLatestWarningsRequest) returns (GetLatestWarningsReply); - rpc GetUserWarnings(GetUserWarningsRequest) returns (GetUserWarningsReply); - - rpc ForgiveWarning(ForgiveWarningRequest) returns (ForgiveWarningReply); - rpc DeleteWarning(ForgiveWarningRequest) returns (ForgiveWarningReply); - -} -message WarnSettingsRequest { - uint64 guildId = 1; -} - -message WarnPunishment { - int32 threshold = 1; - string action = 2; - int32 duration = 3; - string role = 4; -} - -message WarnSettingsReply { - repeated WarnPunishment punishments = 1; - int32 expiryDays = 2; - bool deleteOnExpire = 3; -} - -message AddWarnpRequest { - uint64 guildId = 1; - WarnPunishment punishment = 2; -} - -message AddWarnpReply { - bool success = 1; -} - -message DeleteWarnpRequest { - uint64 guildId = 1; - int32 threshold = 2; -} - -message DeleteWarnpReply { - bool success = 1; -} - -message GetUserWarningsRequest { - uint64 guildId = 1; - string user = 2; - int32 page = 3; -} - -message GetUserWarningsReply { - repeated Warning warnings = 1; - int32 totalCount = 2; -} - -message Warning { - string id = 1; - string reason = 2; - int64 timestamp = 3; - int64 weight = 4; - bool forgiven = 5; - string forgivenBy = 6; - string user = 7; - uint64 userId = 8; - string moderator = 9; -} - -message ForgiveWarningRequest { - uint64 guildId = 1; - string warnId = 2; - string modName = 3; -} - -message ForgiveWarningReply { - bool success = 1; -} - -message SetWarnExpiryRequest { - uint64 guildId = 1; - int32 expiryDays = 2; - bool deleteOnExpire = 3; -} - -message SetWarnExpiryReply { - bool success = 1; -} - -message GetLatestWarningsRequest { - uint64 guildId = 1; - int32 page = 2; -} - -message GetLatestWarningsReply { - repeated Warning warnings = 1; - int32 totalCount = 2; -} \ No newline at end of file diff --git a/src/EllieBot.GrpcApiBase/protos/xp.proto b/src/EllieBot.GrpcApiBase/protos/xp.proto deleted file mode 100644 index 72bcba9..0000000 --- a/src/EllieBot.GrpcApiBase/protos/xp.proto +++ /dev/null @@ -1,120 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "EllieBot.GrpcApi"; - -package xp; - -service GrpcXp { - rpc GetXpLb(GetXpLbRequest) returns (GetXpLbReply); - rpc ResetUserXp(ResetUserXpRequest) returns (ResetUserXpReply); - - rpc GetXpSettings(GetXpSettingsRequest) returns (GetXpSettingsReply); - - rpc AddExclusion(AddExclusionRequest) returns (AddExclusionReply); - rpc DeleteExclusion(DeleteExclusionRequest) returns (DeleteExclusionReply); - - rpc AddReward(AddRewardRequest) returns (AddRewardReply); - rpc DeleteReward(DeleteRewardRequest) returns (DeleteRewardReply); - - rpc SetServerExclusion(SetServerExclusionRequest) returns (SetServerExclusionReply); -} - -message SetServerExclusionRequest { - uint64 guildId = 1; - bool serverExcluded = 2; -} - -message SetServerExclusionReply { - bool success = 1; -} - -message GetXpLbRequest { - uint64 guildId = 1; - int32 page = 2; -} - -message GetXpLbReply { - repeated XpLbUserReply users = 1; - int32 total = 2; -} - -message XpLbUserReply { - uint64 userId = 1; - string username = 2; - int64 xp = 3; - int64 level = 4; - int64 levelPercent = 5; - string avatar = 6; -} - -message ResetUserXpRequest { - uint64 guildId = 1; - uint64 userId = 2; -} - -message ResetUserXpReply { - bool success = 1; -} - -message GetXpSettingsReply { - repeated ExclItemReply exclusions = 1; - repeated RewItemReply rewards = 2; - bool serverExcluded = 3; -} - -message GetXpSettingsRequest { - uint64 guildId = 1; -} - -message ExclItemReply { - string type = 1; - uint64 id = 2; - string name = 3; -} - -message RewItemReply { - int32 level = 1; - string type = 2; - string value = 3; -} - -message AddExclusionRequest { - uint64 guildId = 1; - string type = 2; - uint64 id = 3; -} - -message AddExclusionReply { - bool success = 1; -} - -message DeleteExclusionRequest { - uint64 guildId = 1; - string type = 2; - uint64 id = 3; -} - -message DeleteExclusionReply { - bool success = 1; -} - -message AddRewardRequest { - uint64 guildId = 1; - int32 level = 2; - string type = 3; - string value = 4; -} - -message AddRewardReply { - bool success = 1; -} - -message DeleteRewardRequest { - uint64 guildId = 1; - int32 level = 2; - string type = 3; -} - -message DeleteRewardReply { - bool success = 1; -} \ No newline at end of file diff --git a/src/EllieBot.Tests/GroupGreetTests.cs b/src/EllieBot.Tests/GroupGreetTests.cs new file mode 100644 index 0000000..ba2bf37 --- /dev/null +++ b/src/EllieBot.Tests/GroupGreetTests.cs @@ -0,0 +1,76 @@ +using System.Linq; +using System.Threading.Tasks; +using Ellie.Common; +using EllieBot.Services; +using NUnit.Framework; + +namespace EllieBot.Tests +{ + public class GroupGreetTests + { + private GreetGrouper _grouper; + + [SetUp] + public void Setup() + => _grouper = new GreetGrouper(); + + [Test] + public void CreateTest() + { + var created = _grouper.CreateOrAdd(0, 5); + + Assert.True(created); + } + + [Test] + public void CreateClearTest() + { + _grouper.CreateOrAdd(0, 5); + _grouper.ClearGroup(0, 5, out var items); + + Assert.AreEqual(0, items.Count()); + } + + [Test] + public void NotCreatedTest() + { + _grouper.CreateOrAdd(0, 5); + var created = _grouper.CreateOrAdd(0, 4); + + Assert.False(created); + } + + [Test] + public void ClearAddedTest() + { + _grouper.CreateOrAdd(0, 5); + _grouper.CreateOrAdd(0, 4); + _grouper.ClearGroup(0, 5, out var items); + + var list = items.ToList(); + + Assert.AreEqual(1, list.Count, $"Count was {list.Count}"); + Assert.AreEqual(4, list[0]); + } + + [Test] + public async Task ClearManyTest() + { + _grouper.CreateOrAdd(0, 5); + + // add 15 items + await Enumerable.Range(10, 15) + .Select(x => Task.Run(() => _grouper.CreateOrAdd(0, x))).WhenAll(); + + // get 5 at most + _grouper.ClearGroup(0, 5, out var items); + var list = items.ToList(); + Assert.AreEqual(5, list.Count, $"Count was {list.Count}"); + + // try to get 15, but there should be 10 left + _grouper.ClearGroup(0, 15, out items); + list = items.ToList(); + Assert.AreEqual(10, list.Count, $"Count was {list.Count}"); + } + } +} \ No newline at end of file diff --git a/src/EllieBot.VotesApi/Vote.cs b/src/EllieBot.VotesApi/WeatherForecast.cs similarity index 100% rename from src/EllieBot.VotesApi/Vote.cs rename to src/EllieBot.VotesApi/WeatherForecast.cs diff --git a/src/EllieBot/Bot.cs b/src/EllieBot/Bot.cs index a98ebcd..9ab0f92 100644 --- a/src/EllieBot/Bot.cs +++ b/src/EllieBot/Bot.cs @@ -1,6 +1,5 @@ #nullable disable using DryIoc; -using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.DependencyInjection; using EllieBot.Common.Configs; @@ -25,7 +24,7 @@ public sealed class Bot : IBot public bool IsReady { get; private set; } public int ShardId { get; set; } - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly CommandService _commandService; private readonly DbService _db; @@ -42,9 +41,6 @@ public sealed class Bot : IBot _credsProvider = new BotCredsProvider(totalShards, credPath); _creds = _credsProvider.GetCreds(); - LogSetup.SetupLogger(shardId, _creds); - Log.Information("Pid: {ProcessId}", Environment.ProcessId); - _db = new EllieDbService(_credsProvider); var messageCacheSize = @@ -92,18 +88,18 @@ public sealed class Bot : IBot public IReadOnlyList GetCurrentGuildIds() - => Client.Guilds.Select(x => x.Id).ToList().AsReadOnly(); + => Client.Guilds.Select(x => x.Id).ToList(); - private async Task AddServices() + private void AddServices() { - var startingGuildIdList = GetCurrentGuildIds().ToList(); + var startingGuildIdList = GetCurrentGuildIds(); var startTime = Stopwatch.GetTimestamp(); var bot = Client.CurrentUser; - await using (var uow = _db.GetDbContext()) + using (var uow = _db.GetDbContext()) { - AllGuildConfigs = await uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList); uow.EnsureUserCreated(bot.Id, bot.Username, bot.Discriminator, bot.AvatarId); + AllGuildConfigs = uow.Set().GetAllGuildConfigs(startingGuildIdList).ToImmutableArray(); } // var svcs = new StandardKernel(new NinjectSettings() @@ -118,7 +114,7 @@ public sealed class Bot : IBot // svcs.Components.Remove(); // svcs.Components.Add(); - svcs.AddSingleton(_ => _credsProvider.GetCreds()); + svcs.AddSingleton(_ => _credsProvider.GetCreds()); svcs.AddSingleton(_db); svcs.AddSingleton(_credsProvider); svcs.AddSingleton(Client); @@ -165,8 +161,7 @@ public sealed class Bot : IBot LoadTypeReaders(a); } - Log.Information("All services loaded in {ServiceLoadTime:F2}s", - Stopwatch.GetElapsedTime(startTime).TotalSeconds); + Log.Information("All services loaded in {ServiceLoadTime:F2}s", Stopwatch.GetElapsedTime(startTime).TotalSeconds); } private void LoadTypeReaders(Assembly assembly) @@ -270,7 +265,7 @@ public sealed class Bot : IBot Log.Information("Shard {ShardId} loading services...", Client.ShardId); try { - await AddServices(); + AddServices(); } catch (Exception ex) { @@ -278,9 +273,7 @@ public sealed class Bot : IBot Helpers.ReadErrorAndExit(9); } - Log.Information("Shard {ShardId} connected in {Elapsed:F2}s", - Client.ShardId, - Stopwatch.GetElapsedTime(startTime).TotalSeconds); + Log.Information("Shard {ShardId} connected in {Elapsed:F2}s", Client.ShardId, Stopwatch.GetElapsedTime(startTime).TotalSeconds); var commandHandler = Services.GetRequiredService(); // start handling messages received in commandhandler @@ -345,26 +338,26 @@ public sealed class Bot : IBot if (arg.Exception is { InnerException: WebSocketClosedException { CloseCode: 4014 } }) { Log.Error(""" - Login failed. - - *** Please enable privileged intents *** - - Certain Ellie features require Discord's privileged gateway intents. - These include greeting and goodbye messages, as well as creating the Owner message channels for DM forwarding. - - How to enable privileged intents: - 1. Head over to the Discord Developer Portal https://discord.com/developers/applications/ - 2. Select your Application. - 3. Click on `Bot` in the left side navigation panel, and scroll down to the intents section. - 4. Enable all intents. - 5. Restart your bot. - - Read this only if your bot is in 100 or more servers: - - You'll need to apply to use the intents with Discord, but for small selfhosts, all that is required is enabling the intents in the developer portal. - Yes, this is a new thing from Discord, as of October 2020. No, there's nothing we can do about it. Yes, we're aware it worked before. - While waiting for your bot to be accepted, you can change the 'usePrivilegedIntents' inside your creds.yml to 'false', although this will break many of the ellie's features - """); + Login failed. + + *** Please enable privileged intents *** + + Certain Ellie features require Discord's privileged gateway intents. + These include greeting and goodbye messages, as well as creating the Owner message channels for DM forwarding. + + How to enable privileged intents: + 1. Head over to the Discord Developer Portal https://discord.com/developers/applications/ + 2. Select your Application. + 3. Click on `Bot` in the left side navigation panel, and scroll down to the intents section. + 4. Enable all intents. + 5. Restart your bot. + + Read this only if your bot is in 100 or more servers: + + You'll need to apply to use the intents with Discord, but for small selfhosts, all that is required is enabling the intents in the developer portal. + Yes, this is a new thing from Discord, as of October 2020. No, there's nothing we can do about it. Yes, we're aware it worked before. + While waiting for your bot to be accepted, you can change the 'usePrivilegedIntents' inside your creds.yml to 'false', although this will break many of the ellie's features + """); return Task.CompletedTask; } diff --git a/src/EllieBot/Db/EllieContext.cs b/src/EllieBot/Db/EllieContext.cs index b0bc0a8..afc50ca 100644 --- a/src/EllieBot/Db/EllieContext.cs +++ b/src/EllieBot/Db/EllieContext.cs @@ -10,7 +10,6 @@ namespace EllieBot.Db; public abstract class EllieContext : DbContext { public DbSet GuildConfigs { get; set; } - public DbSet GreetSettings { get; set; } public DbSet Quotes { get; set; } public DbSet Reminders { get; set; } @@ -62,7 +61,7 @@ public abstract class EllieContext : DbContext public DbSet TodosArchive { get; set; } public DbSet HoneyPotChannels { get; set; } - + // todo add guild colors // public DbSet GuildColors { get; set; } @@ -74,40 +73,6 @@ public abstract class EllieContext : DbContext protected override void OnModelCreating(ModelBuilder modelBuilder) { - #region Rakeback - - modelBuilder.Entity() - .HasKey(x => x.UserId); - - #endregion - - #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 }) - .IsUnique(); - - #endregion - - #region NCanvas - - modelBuilder.Entity() - .HasAlternateKey(x => x.Position); - - modelBuilder.Entity() - .HasIndex(x => x.OwnerId); - - #endregion - #region QUOTES var quoteEntity = modelBuilder.Entity(); @@ -229,6 +194,11 @@ public abstract class EllieContext : DbContext .WithOne() .OnDelete(DeleteBehavior.Cascade); + modelBuilder.Entity() + .HasMany(x => x.WarnPunishments) + .WithOne() + .OnDelete(DeleteBehavior.Cascade); + modelBuilder.Entity() .HasMany(x => x.SlowmodeIgnoredRoles) .WithOne() @@ -306,18 +276,6 @@ public abstract class EllieContext : DbContext #endregion - #region WarningPunishments - - var warnpunishmentEntity = modelBuilder.Entity(b => - { - b.HasAlternateKey(x => new - { - x.GuildId, - x.Count - }); - }); - - #endregion #region Self Assignable Roles @@ -380,7 +338,6 @@ public abstract class EllieContext : DbContext du.HasIndex(x => x.TotalXp); du.HasIndex(x => x.CurrencyAmount); du.HasIndex(x => x.UserId); - du.HasIndex(x => x.Username); }); #endregion @@ -721,29 +678,6 @@ public abstract class EllieContext : DbContext .OnDelete(DeleteBehavior.Cascade); #endregion - - #region GreetSettings - - modelBuilder - .Entity(gs => gs.HasIndex(x => new - { - x.GuildId, - x.GreetType - }) - .IsUnique()); - - modelBuilder.Entity(gs => - { - gs - .Property(x => x.IsEnabled) - .HasDefaultValue(false); - - gs - .Property(x => x.AutoDeleteTimer) - .HasDefaultValue(0); - }); - - #endregion } #if DEBUG diff --git a/src/EllieBot/Db/EllieDbService.cs b/src/EllieBot/Db/EllieDbService.cs index 6106072..2a3382e 100644 --- a/src/EllieBot/Db/EllieDbService.cs +++ b/src/EllieBot/Db/EllieDbService.cs @@ -4,14 +4,14 @@ using Microsoft.EntityFrameworkCore; namespace EllieBot.Db; -public sealed class EllieDbService : DbService +public sealed class EllieDbService : DbService { private readonly IBotCredsProvider _creds; // these are props because creds can change at runtime private string DbType => _creds.GetCreds().Db.Type.ToLowerInvariant().Trim(); private string ConnString => _creds.GetCreds().Db.ConnectionString; - + public EllieDbService(IBotCredsProvider creds) { LinqToDBForEFTools.Initialize(); @@ -26,13 +26,13 @@ public sealed class EllieDbService : DbService var connString = ConnString; await using var context = CreateRawDbContext(dbType, connString); - + // make sure sqlite db is in wal journal mode if (context is SqliteContext) { await context.Database.ExecuteSqlRawAsync("PRAGMA journal_mode=WAL"); } - + await context.Database.MigrateAsync(); } @@ -44,13 +44,15 @@ public sealed class EllieDbService : DbService case "postgres": case "pgsql": return new PostgreSqlContext(connString); + case "mysql": + return new MysqlContext(connString); case "sqlite": return new SqliteContext(connString); default: throw new NotSupportedException($"The database provide type of '{dbType}' is not supported."); } } - + private EllieContext GetDbContextInternal() { var dbType = DbType; diff --git a/src/EllieBot/Db/Extensions/DiscordUserExtensions.cs b/src/EllieBot/Db/Extensions/DiscordUserExtensions.cs index ab2b46f..bdf3c05 100644 --- a/src/EllieBot/Db/Extensions/DiscordUserExtensions.cs +++ b/src/EllieBot/Db/Extensions/DiscordUserExtensions.cs @@ -25,6 +25,7 @@ public static class DiscordUserExtensions { UserId = userId, Username = username, + Discriminator = discrim, AvatarId = avatarId, TotalXp = 0, CurrencyAmount = 0 @@ -32,6 +33,7 @@ public static class DiscordUserExtensions old => new() { Username = username, + Discriminator = discrim, AvatarId = avatarId }, () => new() @@ -47,7 +49,8 @@ public static class DiscordUserExtensions () => new() { UserId = userId, - Username = "??Unknown", + Username = "Unknown", + Discriminator = "????", AvatarId = string.Empty, TotalXp = 0, CurrencyAmount = 0 @@ -85,6 +88,13 @@ public static class DiscordUserExtensions .Count() + 1; + public static async Task> GetUsersXpLeaderboardFor(this DbSet users, int page, int perPage) + => await users.ToLinqToDBTable() + .OrderByDescending(x => x.TotalXp) + .Skip(page * perPage) + .Take(perPage) + .ToArrayAsyncLinqToDB(); + public static Task> GetTopRichest( this DbSet users, ulong botId, diff --git a/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs b/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs index 86d22be..842fe4e 100644 --- a/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs +++ b/src/EllieBot/Db/Extensions/GuildConfigExtensions.cs @@ -1,5 +1,4 @@ #nullable disable -using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using EllieBot.Db.Models; @@ -33,8 +32,8 @@ public static class GuildConfigExtensions { var conf = ctx.GuildConfigsForId(guildId, set => set.Include(y => y.StreamRole) - .Include(y => y.StreamRole.Whitelist) - .Include(y => y.StreamRole.Blacklist)); + .Include(y => y.StreamRole.Whitelist) + .Include(y => y.StreamRole.Blacklist)); if (conf.StreamRole is null) conf.StreamRole = new(); @@ -43,27 +42,19 @@ public static class GuildConfigExtensions } private static IQueryable IncludeEverything(this DbSet configs) - => configs - .AsSplitQuery() - .Include(gc => gc.CommandCooldowns) - .Include(gc => gc.FollowedStreams) - .Include(gc => gc.StreamRole) - .Include(gc => gc.DelMsgOnCmdChannels) - .Include(gc => gc.XpSettings) - .ThenInclude(x => x.ExclusionList); + => configs.AsQueryable() + .AsSplitQuery() + .Include(gc => gc.CommandCooldowns) + .Include(gc => gc.FollowedStreams) + .Include(gc => gc.StreamRole) + .Include(gc => gc.XpSettings) + .ThenInclude(x => x.ExclusionList) + .Include(gc => gc.DelMsgOnCmdChannels); - public static async Task GetAllGuildConfigs( + public static IEnumerable GetAllGuildConfigs( this DbSet configs, - List availableGuilds) - { - var result = await configs - .IncludeEverything() - .Where(x => availableGuilds.Contains(x.GuildId)) - .AsNoTracking() - .ToArrayAsync(); - - return result; - } + IReadOnlyList availableGuilds) + => configs.IncludeEverything().AsNoTracking().Where(x => availableGuilds.Contains(x.GuildId)).ToList(); /// /// Gets and creates if it doesn't exist a config for a guild. @@ -89,19 +80,20 @@ public static class GuildConfigExtensions if (config is null) { - ctx.Set() - .Add(config = new() - { - GuildId = guildId, - Permissions = Permissionv2.GetDefaultPermlist, - WarningsInitialized = true, - }); + ctx.Set().Add(config = new() + { + GuildId = guildId, + Permissions = Permissionv2.GetDefaultPermlist, + WarningsInitialized = true, + WarnPunishments = DefaultWarnPunishments + }); ctx.SaveChanges(); } if (!config.WarningsInitialized) { config.WarningsInitialized = true; + config.WarnPunishments = DefaultWarnPunishments; } return config; @@ -130,18 +122,18 @@ public static class GuildConfigExtensions public static LogSetting LogSettingsFor(this DbContext ctx, ulong guildId) { var logSetting = ctx.Set() - .AsQueryable() - .Include(x => x.LogIgnores) - .Where(x => x.GuildId == guildId) - .FirstOrDefault(); + .AsQueryable() + .Include(x => x.LogIgnores) + .Where(x => x.GuildId == guildId) + .FirstOrDefault(); if (logSetting is null) { ctx.Set() - .Add(logSetting = new() - { - GuildId = guildId - }); + .Add(logSetting = new() + { + GuildId = guildId + }); ctx.SaveChanges(); } @@ -157,20 +149,18 @@ public static class GuildConfigExtensions public static GuildConfig GcWithPermissionsFor(this DbContext ctx, ulong guildId) { - var config = ctx.Set() - .AsQueryable() - .Where(gc => gc.GuildId == guildId) - .Include(gc => gc.Permissions) - .FirstOrDefault(); + var config = ctx.Set().AsQueryable() + .Where(gc => gc.GuildId == guildId) + .Include(gc => gc.Permissions) + .FirstOrDefault(); if (config is null) // if there is no guildconfig, create new one { - ctx.Set() - .Add(config = new() - { - GuildId = guildId, - Permissions = Permissionv2.GetDefaultPermlist - }); + ctx.Set().Add(config = new() + { + GuildId = guildId, + Permissions = Permissionv2.GetDefaultPermlist + }); ctx.SaveChanges(); } else if (config.Permissions is null || !config.Permissions.Any()) // if no perms, add default ones @@ -187,21 +177,20 @@ public static class GuildConfigExtensions public static IEnumerable GetFollowedStreams(this DbSet configs, List included) => configs.AsQueryable() - .Where(gc => included.Contains(gc.GuildId)) - .Include(gc => gc.FollowedStreams) - .SelectMany(gc => gc.FollowedStreams) - .ToList(); - + .Where(gc => included.Contains(gc.GuildId)) + .Include(gc => gc.FollowedStreams) + .SelectMany(gc => gc.FollowedStreams) + .ToList(); public static XpSettings XpSettingsFor(this DbContext ctx, ulong guildId) { var gc = ctx.GuildConfigsForId(guildId, set => set.Include(x => x.XpSettings) - .ThenInclude(x => x.RoleRewards) - .Include(x => x.XpSettings) - .ThenInclude(x => x.CurrencyRewards) - .Include(x => x.XpSettings) - .ThenInclude(x => x.ExclusionList)); + .ThenInclude(x => x.RoleRewards) + .Include(x => x.XpSettings) + .ThenInclude(x => x.CurrencyRewards) + .Include(x => x.XpSettings) + .ThenInclude(x => x.ExclusionList)); if (gc.XpSettings is null) gc.XpSettings = new(); @@ -211,15 +200,15 @@ public static class GuildConfigExtensions public static IEnumerable GetGeneratingChannels(this DbSet configs) => configs.AsQueryable() - .Include(x => x.GenerateCurrencyChannelIds) - .Where(x => x.GenerateCurrencyChannelIds.Any()) - .SelectMany(x => x.GenerateCurrencyChannelIds) - .Select(x => new GeneratingChannel - { - ChannelId = x.ChannelId, - GuildId = x.GuildConfig.GuildId - }) - .ToArray(); + .Include(x => x.GenerateCurrencyChannelIds) + .Where(x => x.GenerateCurrencyChannelIds.Any()) + .SelectMany(x => x.GenerateCurrencyChannelIds) + .Select(x => new GeneratingChannel + { + ChannelId = x.ChannelId, + GuildId = x.GuildConfig.GuildId + }) + .ToArray(); public class GeneratingChannel { diff --git a/src/EllieBot/Db/Extensions/QuoteExtensions.cs b/src/EllieBot/Db/Extensions/QuoteExtensions.cs new file mode 100644 index 0000000..a213e6d --- /dev/null +++ b/src/EllieBot/Db/Extensions/QuoteExtensions.cs @@ -0,0 +1,53 @@ +#nullable disable +using Microsoft.EntityFrameworkCore; +using EllieBot.Db.Models; + +namespace EllieBot.Db; + +public static class QuoteExtensions +{ + public static IEnumerable GetForGuild(this DbSet quotes, ulong guildId) + => quotes.AsQueryable().Where(x => x.GuildId == guildId); + + public static IReadOnlyCollection GetGroup( + this DbSet quotes, + ulong guildId, + int page, + OrderType order) + { + var q = quotes.AsQueryable().Where(x => x.GuildId == guildId); + if (order == OrderType.Keyword) + q = q.OrderBy(x => x.Keyword); + else + q = q.OrderBy(x => x.Id); + + return q.Skip(15 * page).Take(15).ToArray(); + } + + public static async Task GetRandomQuoteByKeywordAsync( + this DbSet quotes, + ulong guildId, + string keyword) + { + return (await quotes.AsQueryable().Where(q => q.GuildId == guildId && q.Keyword == keyword).ToArrayAsync()) + .RandomOrDefault(); + } + + public static async Task SearchQuoteKeywordTextAsync( + this DbSet quotes, + ulong guildId, + string keyword, + string text) + { + return (await quotes.AsQueryable() + .Where(q => q.GuildId == guildId + && (keyword == null || q.Keyword == keyword) + && (EF.Functions.Like(q.Text.ToUpper(), $"%{text.ToUpper()}%") + || EF.Functions.Like(q.AuthorName, text))) + .ToArrayAsync()) + .RandomOrDefault(); + } + + public static void RemoveAllByKeyword(this DbSet quotes, ulong guildId, string keyword) + => quotes.RemoveRange(quotes.AsQueryable().Where(x => x.GuildId == guildId && x.Keyword.ToUpper() == keyword)); +} \ No newline at end of file diff --git a/src/EllieBot/Db/Extensions/UserXpExtensions.cs b/src/EllieBot/Db/Extensions/UserXpExtensions.cs index b06d98b..ab3e8bb 100644 --- a/src/EllieBot/Db/Extensions/UserXpExtensions.cs +++ b/src/EllieBot/Db/Extensions/UserXpExtensions.cs @@ -26,6 +26,17 @@ public static class UserXpExtensions return usr; } + public static async Task> GetUsersFor( + this DbSet xps, + ulong guildId, + int page) + => await xps.ToLinqToDBTable() + .Where(x => x.GuildId == guildId) + .OrderByDescending(x => x.Xp + x.AwardedXp) + .Skip(page * 9) + .Take(9) + .ToArrayAsyncLinqToDB(); + public static async Task> GetTopUserXps(this DbSet xps, ulong guildId, int count) => await xps.ToLinqToDBTable() .Where(x => x.GuildId == guildId) @@ -44,6 +55,9 @@ public static class UserXpExtensions .CountAsyncLinqToDB() + 1; + public static void ResetGuildUserXp(this DbSet xps, ulong userId, ulong guildId) + => xps.Delete(x => x.UserId == userId && x.GuildId == guildId); + public static void ResetGuildXp(this DbSet xps, ulong guildId) => xps.Delete(x => x.GuildId == guildId); diff --git a/src/EllieBot/Db/LevelStats.cs b/src/EllieBot/Db/LevelStats.cs index 0f3e02c..25a3936 100644 --- a/src/EllieBot/Db/LevelStats.cs +++ b/src/EllieBot/Db/LevelStats.cs @@ -1,4 +1,5 @@ #nullable disable + namespace EllieBot.Db; public readonly struct LevelStats diff --git a/src/EllieBot/Db/Models/DiscordUser.cs b/src/EllieBot/Db/Models/DiscordUser.cs index 3ac3f5c..69eecb6 100644 --- a/src/EllieBot/Db/Models/DiscordUser.cs +++ b/src/EllieBot/Db/Models/DiscordUser.cs @@ -1,12 +1,13 @@ #nullable disable namespace EllieBot.Db.Models; + // FUTURE remove LastLevelUp from here and UserXpStats public class DiscordUser : DbEntity { public ulong UserId { get; set; } public string Username { get; set; } - // public string Discriminator { get; set; } + public string Discriminator { get; set; } public string AvatarId { get; set; } public int? ClubId { get; set; } @@ -26,6 +27,9 @@ public class DiscordUser : DbEntity public override string ToString() { - return Username; + if (string.IsNullOrWhiteSpace(Discriminator) || Discriminator == "0000") + return Username; + + return Username + "#" + Discriminator; } } \ No newline at end of file diff --git a/src/EllieBot/Db/Models/FlagTranslateChannel.cs b/src/EllieBot/Db/Models/FlagTranslateChannel.cs deleted file mode 100644 index 1fe04d7..0000000 --- a/src/EllieBot/Db/Models/FlagTranslateChannel.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable disable -namespace EllieBot.Db.Models; - -public class FlagTranslateChannel : DbEntity -{ - public ulong GuildId { get; set; } - public ulong ChannelId { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/GuildConfig.cs b/src/EllieBot/Db/Models/GuildConfig.cs index c703000..a88d3c0 100644 --- a/src/EllieBot/Db/Models/GuildConfig.cs +++ b/src/EllieBot/Db/Models/GuildConfig.cs @@ -13,23 +13,21 @@ public class GuildConfig : DbEntity public string AutoAssignRoleIds { get; set; } - // //greet stuff - // public int AutoDeleteGreetMessagesTimer { get; set; } = 30; - // public int AutoDeleteByeMessagesTimer { get; set; } = 30; - // - // public ulong GreetMessageChannelId { get; set; } - // public ulong ByeMessageChannelId { get; set; } - // - // public bool SendDmGreetMessage { get; set; } - // public string DmGreetMessageText { get; set; } = "Welcome to the %server% server, %user%!"; - // - // public bool SendChannelGreetMessage { get; set; } - // public string ChannelGreetMessageText { get; set; } = "Welcome to the %server% server, %user%!"; - // - // public bool SendChannelByeMessage { get; set; } - // public string ChannelByeMessageText { get; set; } = "%user% has left!"; - // public bool SendBoostMessage { get; set; } - // pulic int BoostMessageDeleteAfter { get; set; } + //greet stuff + public int AutoDeleteGreetMessagesTimer { get; set; } = 30; + public int AutoDeleteByeMessagesTimer { get; set; } = 30; + + public ulong GreetMessageChannelId { get; set; } + public ulong ByeMessageChannelId { get; set; } + + public bool SendDmGreetMessage { get; set; } + public string DmGreetMessageText { get; set; } = "Welcome to the %server% server, %user%!"; + + public bool SendChannelGreetMessage { get; set; } + public string ChannelGreetMessageText { get; set; } = "Welcome to the %server% server, %user%!"; + + public bool SendChannelByeMessage { get; set; } + public string ChannelByeMessageText { get; set; } = "%user% has left!"; //self assignable roles public bool ExclusiveSelfAssignedRoles { get; set; } @@ -77,6 +75,7 @@ public class GuildConfig : DbEntity public HashSet UnroleTimer { get; set; } = new(); public HashSet VcRoleInfos { get; set; } public HashSet CommandAliases { get; set; } = new(); + public List WarnPunishments { get; set; } = new(); public bool WarningsInitialized { get; set; } public HashSet SlowmodeIgnoredUsers { get; set; } public HashSet SlowmodeIgnoredRoles { get; set; } @@ -99,6 +98,10 @@ public class GuildConfig : DbEntity #region Boost Message + public bool SendBoostMessage { get; set; } + public string BoostMessage { get; set; } = "%user% just boosted this server!"; + public ulong BoostMessageChannelId { get; set; } + public int BoostMessageDeleteAfter { get; set; } public bool StickyRoles { get; set; } #endregion diff --git a/src/EllieBot/Db/Models/NCanvas/NCanvas.cs b/src/EllieBot/Db/Models/NCanvas/NCanvas.cs deleted file mode 100644 index 8de17cb..0000000 --- a/src/EllieBot/Db/Models/NCanvas/NCanvas.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace EllieBot.Db.Models; - -public class NCPixel -{ - [Key] - public int Id { get; set; } - - public required int Position { get; init; } - - public required long Price { get; init; } - - public required ulong OwnerId { get; init; } - public required uint Color { get; init; } - - [MaxLength(256)] - public required string Text { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs b/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs index 1e219eb..b5e5f67 100644 --- a/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs +++ b/src/EllieBot/Db/Models/anti/AntiRaidSetting.cs @@ -1,4 +1,6 @@ #nullable disable +using System.ComponentModel.DataAnnotations.Schema; + namespace EllieBot.Db.Models; diff --git a/src/EllieBot/Db/Models/punish/WarningPunishment.cs b/src/EllieBot/Db/Models/punish/WarningPunishment.cs index 1b4479f..5368938 100644 --- a/src/EllieBot/Db/Models/punish/WarningPunishment.cs +++ b/src/EllieBot/Db/Models/punish/WarningPunishment.cs @@ -3,7 +3,6 @@ namespace EllieBot.Db.Models; public class WarningPunishment : DbEntity { - public ulong GuildId { get; set; } public int Count { get; set; } public PunishmentAction Punishment { get; set; } public int Time { get; set; } diff --git a/src/EllieBot/Db/Models/support/PatronQuota.cs b/src/EllieBot/Db/Models/support/PatronQuota.cs index 5cb1a15..d493807 100644 --- a/src/EllieBot/Db/Models/support/PatronQuota.cs +++ b/src/EllieBot/Db/Models/support/PatronQuota.cs @@ -1,12 +1,8 @@ #nullable disable -using System.ComponentModel.DataAnnotations; - namespace EllieBot.Db.Models; public class PatronUser { - // [Key] - // public int Id { get; set; } public string UniquePlatformUserId { get; set; } public ulong UserId { get; set; } public int AmountCents { get; set; } diff --git a/src/EllieBot/Db/Models/xp/UserXpStats.cs b/src/EllieBot/Db/Models/xp/UserXpStats.cs index f34ab26..d603360 100644 --- a/src/EllieBot/Db/Models/xp/UserXpStats.cs +++ b/src/EllieBot/Db/Models/xp/UserXpStats.cs @@ -8,4 +8,6 @@ public class UserXpStats : DbEntity public long Xp { get; set; } public long AwardedXp { get; set; } public XpNotificationLocation NotifyOnLevelUp { get; set; } -} \ No newline at end of file +} + +public enum XpNotificationLocation { None, Dm, Channel } \ No newline at end of file diff --git a/src/EllieBot/Db/Models/xp/XpNotificationLocation.cs b/src/EllieBot/Db/Models/xp/XpNotificationLocation.cs deleted file mode 100644 index b410fcd..0000000 --- a/src/EllieBot/Db/Models/xp/XpNotificationLocation.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EllieBot.Db.Models; - -public enum XpNotificationLocation -{ - None, - Dm, - Channel -} \ No newline at end of file diff --git a/src/EllieBot/Db/MysqlContext.cs b/src/EllieBot/Db/MysqlContext.cs new file mode 100644 index 0000000..7563640 --- /dev/null +++ b/src/EllieBot/Db/MysqlContext.cs @@ -0,0 +1,38 @@ +using Microsoft.EntityFrameworkCore; +using EllieBot.Db.Models; + +namespace EllieBot.Db; + +public sealed class MysqlContext : EllieContext +{ + private readonly string _connStr; + private readonly string _version; + + protected override string CurrencyTransactionOtherIdDefaultValue + => "NULL"; + + public MysqlContext(string connStr = "Server=localhost", string version = "8.0") + { + _connStr = connStr; + _version = version; + } + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + base.OnConfiguring(optionsBuilder); + optionsBuilder + .UseLowerCaseNamingConvention() + .UseMySql(_connStr, ServerVersion.Parse(_version)); + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + // mysql is case insensitive by default + // we can set binary collation to change that + modelBuilder.Entity() + .Property(x => x.Name) + .UseCollation("utf8mb4_bin"); + } +} \ No newline at end of file diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj index 0dec0f1..1f0a2f0 100644 --- a/src/EllieBot/EllieBot.csproj +++ b/src/EllieBot/EllieBot.csproj @@ -4,7 +4,7 @@ enable true en - 5.1.20 + 5.1.5 $(MSBuildProjectDirectory) @@ -34,12 +34,13 @@ - - - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -68,9 +69,9 @@ - - - + + + @@ -80,7 +81,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -88,8 +89,9 @@ - + + @@ -102,7 +104,6 @@ - @@ -113,6 +114,9 @@ + + Protos\coordinator.proto + true PreserveNewest @@ -126,13 +130,6 @@ Always - - - - _common\CoordinatorProtos\coordinator.proto - - - diff --git a/src/EllieBot/Migrations/MigrationQueries.cs b/src/EllieBot/Migrations/MigrationQueries.cs index f35dbc8..8265ebb 100644 --- a/src/EllieBot/Migrations/MigrationQueries.cs +++ b/src/EllieBot/Migrations/MigrationQueries.cs @@ -1,18 +1,23 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Migrations; +using EllieBot.Db.Models; namespace EllieBot.Migrations; public static class MigrationQueries { - public static void UpdateUsernames(MigrationBuilder migrationBuilder) - { - migrationBuilder.Sql("UPDATE DiscordUser SET Username = '??' || Username WHERE Discriminator = '????';"); - } - public static void MigrateRero(MigrationBuilder migrationBuilder) { - if (migrationBuilder.IsSqlite()) + if (migrationBuilder.IsMySql()) + { + migrationBuilder.Sql( + @"INSERT IGNORE into reactionroles(guildid, channelid, messageid, emote, roleid, `group`, levelreq, dateadded) +select guildid, channelid, messageid, emotename, roleid, exclusive, 0, reactionrolemessage.dateadded +from reactionrole +left join reactionrolemessage on reactionrolemessage.id = reactionrole.reactionrolemessageid +left join guildconfigs on reactionrolemessage.guildconfigid = guildconfigs.id;"); + } + else if (migrationBuilder.IsSqlite()) { migrationBuilder.Sql( @"insert or ignore into reactionroles(guildid, channelid, messageid, emote, roleid, 'group', levelreq, dateadded) @@ -23,8 +28,7 @@ left join guildconfigs on reactionrolemessage.guildconfigid = guildconfigs.id;") } else if (migrationBuilder.IsNpgsql()) { - migrationBuilder.Sql( - @"insert into reactionroles(guildid, channelid, messageid, emote, roleid, ""group"", levelreq, dateadded) + migrationBuilder.Sql(@"insert into reactionroles(guildid, channelid, messageid, emote, roleid, ""group"", levelreq, dateadded) select guildid, channelid, messageid, emotename, roleid, exclusive::int, 0, reactionrolemessage.dateadded from reactionrole left join reactionrolemessage on reactionrolemessage.id = reactionrole.reactionrolemessageid @@ -40,51 +44,11 @@ left join guildconfigs on reactionrolemessage.guildconfigid = guildconfigs.id;") public static void GuildConfigCleanup(MigrationBuilder builder) { builder.Sql($""" - DELETE FROM "DelMsgOnCmdChannel" WHERE "GuildConfigId" is NULL; - DELETE FROM "WarningPunishment" WHERE "GuildConfigId" NOT IN (SELECT "Id" from "GuildConfigs"); DELETE FROM "StreamRoleBlacklistedUser" WHERE "StreamRoleSettingsId" is NULL; - DELETE FROM "Permissions" WHERE "GuildConfigId" NOT IN (SELECT "Id" from "GuildConfigs"); + """); + + builder.Sql($""" + DELETE FROM "DelMsgOnCmdChannel" WHERE "GuildConfigId" is NULL; """); } - - public static void GreetSettingsCopy(MigrationBuilder builder) - { - builder.Sql(""" - INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) - SELECT GuildId, 0, ChannelGreetMessageText, SendChannelGreetMessage, GreetMessageChannelId, AutoDeleteGreetMessagesTimer - FROM GuildConfigs - WHERE SendChannelGreetMessage = TRUE; - - INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) - SELECT GuildId, 1, DmGreetMessageText, SendDmGreetMessage, GreetMessageChannelId, 0 - FROM GuildConfigs - WHERE SendDmGreetMessage = TRUE; - - INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) - SELECT GuildId, 2, ChannelByeMessageText, SendChannelByeMessage, ByeMessageChannelId, AutoDeleteByeMessagesTimer - FROM GuildConfigs - WHERE SendChannelByeMessage = TRUE; - - INSERT INTO GreetSettings (GuildId, GreetType, MessageText, IsEnabled, ChannelId, AutoDeleteTimer) - SELECT GuildId, 3, BoostMessage, SendBoostMessage, BoostMessageChannelId, BoostMessageDeleteAfter - FROM GuildConfigs - WHERE SendBoostMessage = TRUE; - """); - } - - public static void AddGuildIdsToWarningPunishment(MigrationBuilder builder) - { - builder.Sql(""" - DELETE FROM WarningPunishment WHERE GuildConfigId IS NULL OR GuildConfigId NOT IN (SELECT Id FROM GuildConfigs); - UPDATE WarningPunishment - SET GuildId = (SELECT GuildId FROM GuildConfigs WHERE Id = GuildConfigId); - - DELETE FROM WarningPunishment as wp - WHERE (wp.Count, wp.GuildConfigId) in ( - SELECT wp2.Count, wp2.GuildConfigId FROM WarningPunishment as wp2 - GROUP BY wp2.Count, wp2.GuildConfigId - HAVING COUNT(id) > 1 - ); - """); - } } \ No newline at end of file diff --git a/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.Designer.cs b/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.Designer.cs new file mode 100644 index 0000000..458c74a --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.Designer.cs @@ -0,0 +1,3425 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20220409170652_mysql-init")] + partial class mysqlinit + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("LastXpGain") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastxpgain") + .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .HasColumnType("tinyint(1)") + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("EmoteName") + .HasColumnType("longtext") + .HasColumnName("emotename"); + + b.Property("ReactionRoleMessageId") + .HasColumnType("int") + .HasColumnName("reactionrolemessageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionrole"); + + b.HasIndex("ReactionRoleMessageId") + .HasDatabaseName("ix_reactionrole_reactionrolemessageid"); + + b.ToTable("reactionrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Exclusive") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusive"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.HasKey("Id") + .HasName("pk_reactionrolemessage"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_reactionrolemessage_guildconfigid"); + + b.ToTable("reactionrolemessage", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("int") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PatreonUserId") + .HasColumnType("varchar(255)") + .HasColumnName("patreonuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PatreonUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_patreonuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("int") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) + .WithMany("ReactionRoles") + .HasForeignKey("ReactionRoleMessageId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_reactionrole_reactionrolemessage_reactionrolemessageid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("ReactionRoleMessages") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_reactionrolemessage_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("ReactionRoleMessages"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => + { + b.Navigation("ReactionRoles"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.cs b/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.cs new file mode 100644 index 0000000..cdf1904 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220409170652_mysql-init.cs @@ -0,0 +1,2343 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class mysqlinit : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "autocommands", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + commandtext = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + channelid = table.Column(type: "bigint unsigned", nullable: false), + channelname = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + guildid = table.Column(type: "bigint unsigned", nullable: true), + guildname = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + voicechannelid = table.Column(type: "bigint unsigned", nullable: true), + voicechannelname = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + interval = table.Column(type: "int", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_autocommands", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "autotranslatechannels", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: false), + autodelete = table.Column(type: "tinyint(1)", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_autotranslatechannels", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "bantemplates", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + text = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_bantemplates", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "blacklist", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + itemid = table.Column(type: "bigint unsigned", nullable: false), + type = table.Column(type: "int", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_blacklist", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "currencytransactions", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + amount = table.Column(type: "bigint", nullable: false), + note = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + userid = table.Column(type: "bigint unsigned", nullable: false), + type = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + extra = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + otherid = table.Column(type: "bigint unsigned", nullable: true, defaultValueSql: "NULL"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_currencytransactions", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "discordpermoverrides", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + perm = table.Column(type: "bigint unsigned", nullable: false), + guildid = table.Column(type: "bigint unsigned", nullable: true), + command = table.Column(type: "varchar(255)", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_discordpermoverrides", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "expressions", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: true), + response = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + trigger = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + autodeletetrigger = table.Column(type: "tinyint(1)", nullable: false), + dmresponse = table.Column(type: "tinyint(1)", nullable: false), + containsanywhere = table.Column(type: "tinyint(1)", nullable: false), + allowtarget = table.Column(type: "tinyint(1)", nullable: false), + reactions = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_expressions", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "guildconfigs", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + prefix = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + deletemessageoncommand = table.Column(type: "tinyint(1)", nullable: false), + autoassignroleids = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + autodeletegreetmessagestimer = table.Column(type: "int", nullable: false), + autodeletebyemessagestimer = table.Column(type: "int", nullable: false), + greetmessagechannelid = table.Column(type: "bigint unsigned", nullable: false), + byemessagechannelid = table.Column(type: "bigint unsigned", nullable: false), + senddmgreetmessage = table.Column(type: "tinyint(1)", nullable: false), + dmgreetmessagetext = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + sendchannelgreetmessage = table.Column(type: "tinyint(1)", nullable: false), + channelgreetmessagetext = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + sendchannelbyemessage = table.Column(type: "tinyint(1)", nullable: false), + channelbyemessagetext = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + exclusiveselfassignedroles = table.Column(type: "tinyint(1)", nullable: false), + autodeleteselfassignedrolemessages = table.Column(type: "tinyint(1)", nullable: false), + verbosepermissions = table.Column(type: "tinyint(1)", nullable: false), + permissionrole = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + filterinvites = table.Column(type: "tinyint(1)", nullable: false), + filterlinks = table.Column(type: "tinyint(1)", nullable: false), + filterwords = table.Column(type: "tinyint(1)", nullable: false), + muterolename = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + cleverbotenabled = table.Column(type: "tinyint(1)", nullable: false), + locale = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + timezoneid = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + warningsinitialized = table.Column(type: "tinyint(1)", nullable: false), + gamevoicechannel = table.Column(type: "bigint unsigned", nullable: true), + verboseerrors = table.Column(type: "tinyint(1)", nullable: false), + notifystreamoffline = table.Column(type: "tinyint(1)", nullable: false), + warnexpirehours = table.Column(type: "int", nullable: false), + warnexpireaction = table.Column(type: "int", nullable: false), + sendboostmessage = table.Column(type: "tinyint(1)", nullable: false), + boostmessage = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + boostmessagechannelid = table.Column(type: "bigint unsigned", nullable: false), + boostmessagedeleteafter = table.Column(type: "int", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_guildconfigs", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "imageonlychannels", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_imageonlychannels", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "logsettings", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + logotherid = table.Column(type: "bigint unsigned", nullable: true), + messageupdatedid = table.Column(type: "bigint unsigned", nullable: true), + messagedeletedid = table.Column(type: "bigint unsigned", nullable: true), + userjoinedid = table.Column(type: "bigint unsigned", nullable: true), + userleftid = table.Column(type: "bigint unsigned", nullable: true), + userbannedid = table.Column(type: "bigint unsigned", nullable: true), + userunbannedid = table.Column(type: "bigint unsigned", nullable: true), + userupdatedid = table.Column(type: "bigint unsigned", nullable: true), + channelcreatedid = table.Column(type: "bigint unsigned", nullable: true), + channeldestroyedid = table.Column(type: "bigint unsigned", nullable: true), + channelupdatedid = table.Column(type: "bigint unsigned", nullable: true), + usermutedid = table.Column(type: "bigint unsigned", nullable: true), + loguserpresenceid = table.Column(type: "bigint unsigned", nullable: true), + logvoicepresenceid = table.Column(type: "bigint unsigned", nullable: true), + logvoicepresencettsid = table.Column(type: "bigint unsigned", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_logsettings", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "musicplayersettings", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + playerrepeat = table.Column(type: "int", nullable: false), + musicchannelid = table.Column(type: "bigint unsigned", nullable: true), + volume = table.Column(type: "int", nullable: false, defaultValue: 100), + autodisconnect = table.Column(type: "tinyint(1)", nullable: false), + qualitypreset = table.Column(type: "int", nullable: false), + autoplay = table.Column(type: "tinyint(1)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_musicplayersettings", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "musicplaylists", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + name = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + author = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + authorid = table.Column(type: "bigint unsigned", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_musicplaylists", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "nsfwblacklistedtags", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + tag = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_nsfwblacklistedtags", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "plantedcurrency", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + amount = table.Column(type: "bigint", nullable: false), + password = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + guildid = table.Column(type: "bigint unsigned", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: false), + userid = table.Column(type: "bigint unsigned", nullable: false), + messageid = table.Column(type: "bigint unsigned", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_plantedcurrency", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "poll", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: false), + question = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_poll", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "quotes", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + keyword = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + authorname = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + authorid = table.Column(type: "bigint unsigned", nullable: false), + text = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_quotes", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "reminders", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + when = table.Column(type: "datetime(6)", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: false), + serverid = table.Column(type: "bigint unsigned", nullable: false), + userid = table.Column(type: "bigint unsigned", nullable: false), + message = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + isprivate = table.Column(type: "tinyint(1)", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_reminders", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "repeaters", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: false), + lastmessageid = table.Column(type: "bigint unsigned", nullable: true), + message = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + interval = table.Column(type: "time(6)", nullable: false), + starttimeofday = table.Column(type: "time(6)", nullable: true), + noredundant = table.Column(type: "tinyint(1)", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_repeaters", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "rewardedusers", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + patreonuserid = table.Column(type: "varchar(255)", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + amountrewardedthismonth = table.Column(type: "int", nullable: false), + lastreward = table.Column(type: "datetime(6)", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_rewardedusers", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "rotatingstatus", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + status = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + type = table.Column(type: "int", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_rotatingstatus", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "selfassignableroles", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + roleid = table.Column(type: "bigint unsigned", nullable: false), + group = table.Column(type: "int", nullable: false, defaultValue: 0), + levelrequirement = table.Column(type: "int", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_selfassignableroles", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "userxpstats", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + guildid = table.Column(type: "bigint unsigned", nullable: false), + xp = table.Column(type: "int", nullable: false), + awardedxp = table.Column(type: "int", nullable: false), + notifyonlevelup = table.Column(type: "int", nullable: false), + lastlevelup = table.Column(type: "datetime(6)", nullable: false, defaultValueSql: "(UTC_TIMESTAMP)"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_userxpstats", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "warnings", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + userid = table.Column(type: "bigint unsigned", nullable: false), + reason = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + forgiven = table.Column(type: "tinyint(1)", nullable: false), + forgivenby = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + moderator = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + weight = table.Column(type: "bigint", nullable: false, defaultValue: 1L), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_warnings", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "autotranslateusers", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + channelid = table.Column(type: "int", nullable: false), + userid = table.Column(type: "bigint unsigned", nullable: false), + source = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + target = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_autotranslateusers", x => x.id); + table.UniqueConstraint("ak_autotranslateusers_channelid_userid", x => new { x.channelid, x.userid }); + table.ForeignKey( + name: "fk_autotranslateusers_autotranslatechannels_channelid", + column: x => x.channelid, + principalTable: "autotranslatechannels", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "antialtsetting", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildconfigid = table.Column(type: "int", nullable: false), + minage = table.Column(type: "time(6)", nullable: false), + action = table.Column(type: "int", nullable: false), + actiondurationminutes = table.Column(type: "int", nullable: false), + roleid = table.Column(type: "bigint unsigned", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_antialtsetting", x => x.id); + table.ForeignKey( + name: "fk_antialtsetting_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "antiraidsetting", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildconfigid = table.Column(type: "int", nullable: false), + userthreshold = table.Column(type: "int", nullable: false), + seconds = table.Column(type: "int", nullable: false), + action = table.Column(type: "int", nullable: false), + punishduration = table.Column(type: "int", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_antiraidsetting", x => x.id); + table.ForeignKey( + name: "fk_antiraidsetting_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "antispamsetting", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildconfigid = table.Column(type: "int", nullable: false), + action = table.Column(type: "int", nullable: false), + messagethreshold = table.Column(type: "int", nullable: false), + mutetime = table.Column(type: "int", nullable: false), + roleid = table.Column(type: "bigint unsigned", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_antispamsetting", x => x.id); + table.ForeignKey( + name: "fk_antispamsetting_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "commandalias", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + trigger = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + mapping = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_commandalias", x => x.id); + table.ForeignKey( + name: "fk_commandalias_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "commandcooldown", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + seconds = table.Column(type: "int", nullable: false), + commandname = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_commandcooldown", x => x.id); + table.ForeignKey( + name: "fk_commandcooldown_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "delmsgoncmdchannel", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + channelid = table.Column(type: "bigint unsigned", nullable: false), + state = table.Column(type: "tinyint(1)", nullable: false), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_delmsgoncmdchannel", x => x.id); + table.ForeignKey( + name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "feedsub", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildconfigid = table.Column(type: "int", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: false), + url = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_feedsub", x => x.id); + table.UniqueConstraint("ak_feedsub_guildconfigid_url", x => new { x.guildconfigid, x.url }); + table.ForeignKey( + name: "fk_feedsub_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "filterchannelid", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + channelid = table.Column(type: "bigint unsigned", nullable: false), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_filterchannelid", x => x.id); + table.ForeignKey( + name: "fk_filterchannelid_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "filteredword", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + word = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_filteredword", x => x.id); + table.ForeignKey( + name: "fk_filteredword_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "filterlinkschannelid", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + channelid = table.Column(type: "bigint unsigned", nullable: false), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_filterlinkschannelid", x => x.id); + table.ForeignKey( + name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "filterwordschannelid", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + channelid = table.Column(type: "bigint unsigned", nullable: false), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_filterwordschannelid", x => x.id); + table.ForeignKey( + name: "fk_filterwordschannelid_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "followedstream", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: false), + username = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + type = table.Column(type: "int", nullable: false), + message = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_followedstream", x => x.id); + table.ForeignKey( + name: "fk_followedstream_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "gcchannelid", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildconfigid = table.Column(type: "int", nullable: true), + channelid = table.Column(type: "bigint unsigned", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_gcchannelid", x => x.id); + table.ForeignKey( + name: "fk_gcchannelid_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "groupname", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildconfigid = table.Column(type: "int", nullable: false), + number = table.Column(type: "int", nullable: false), + name = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_groupname", x => x.id); + table.ForeignKey( + name: "fk_groupname_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "muteduserid", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_muteduserid", x => x.id); + table.ForeignKey( + name: "fk_muteduserid_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "permissions", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildconfigid = table.Column(type: "int", nullable: true), + index = table.Column(type: "int", nullable: false), + primarytarget = table.Column(type: "int", nullable: false), + primarytargetid = table.Column(type: "bigint unsigned", nullable: false), + secondarytarget = table.Column(type: "int", nullable: false), + secondarytargetname = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + iscustomcommand = table.Column(type: "tinyint(1)", nullable: false), + state = table.Column(type: "tinyint(1)", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_permissions", x => x.id); + table.ForeignKey( + name: "fk_permissions_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "reactionrolemessage", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + index = table.Column(type: "int", nullable: false), + guildconfigid = table.Column(type: "int", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: false), + messageid = table.Column(type: "bigint unsigned", nullable: false), + exclusive = table.Column(type: "tinyint(1)", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_reactionrolemessage", x => x.id); + table.ForeignKey( + name: "fk_reactionrolemessage_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "shopentry", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + index = table.Column(type: "int", nullable: false), + price = table.Column(type: "int", nullable: false), + name = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + authorid = table.Column(type: "bigint unsigned", nullable: false), + type = table.Column(type: "int", nullable: false), + rolename = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + roleid = table.Column(type: "bigint unsigned", nullable: false), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_shopentry", x => x.id); + table.ForeignKey( + name: "fk_shopentry_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "slowmodeignoredrole", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + roleid = table.Column(type: "bigint unsigned", nullable: false), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_slowmodeignoredrole", x => x.id); + table.ForeignKey( + name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "slowmodeignoreduser", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_slowmodeignoreduser", x => x.id); + table.ForeignKey( + name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "streamrolesettings", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildconfigid = table.Column(type: "int", nullable: false), + enabled = table.Column(type: "tinyint(1)", nullable: false), + addroleid = table.Column(type: "bigint unsigned", nullable: false), + fromroleid = table.Column(type: "bigint unsigned", nullable: false), + keyword = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_streamrolesettings", x => x.id); + table.ForeignKey( + name: "fk_streamrolesettings_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "unbantimer", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + unbanat = table.Column(type: "datetime(6)", nullable: false), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_unbantimer", x => x.id); + table.ForeignKey( + name: "fk_unbantimer_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "unmutetimer", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + unmuteat = table.Column(type: "datetime(6)", nullable: false), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_unmutetimer", x => x.id); + table.ForeignKey( + name: "fk_unmutetimer_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "unroletimer", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + roleid = table.Column(type: "bigint unsigned", nullable: false), + unbanat = table.Column(type: "datetime(6)", nullable: false), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_unroletimer", x => x.id); + table.ForeignKey( + name: "fk_unroletimer_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "vcroleinfo", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + voicechannelid = table.Column(type: "bigint unsigned", nullable: false), + roleid = table.Column(type: "bigint unsigned", nullable: false), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_vcroleinfo", x => x.id); + table.ForeignKey( + name: "fk_vcroleinfo_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "warningpunishment", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + count = table.Column(type: "int", nullable: false), + punishment = table.Column(type: "int", nullable: false), + time = table.Column(type: "int", nullable: false), + roleid = table.Column(type: "bigint unsigned", nullable: true), + guildconfigid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_warningpunishment", x => x.id); + table.ForeignKey( + name: "fk_warningpunishment_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "xpsettings", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildconfigid = table.Column(type: "int", nullable: false), + serverexcluded = table.Column(type: "tinyint(1)", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_xpsettings", x => x.id); + table.ForeignKey( + name: "fk_xpsettings_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "ignoredlogchannels", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + logsettingid = table.Column(type: "int", nullable: false), + logitemid = table.Column(type: "bigint unsigned", nullable: false), + itemtype = table.Column(type: "int", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_ignoredlogchannels", x => x.id); + table.ForeignKey( + name: "fk_ignoredlogchannels_logsettings_logsettingid", + column: x => x.logsettingid, + principalTable: "logsettings", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "ignoredvoicepresencechannels", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + logsettingid = table.Column(type: "int", nullable: true), + channelid = table.Column(type: "bigint unsigned", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_ignoredvoicepresencechannels", x => x.id); + table.ForeignKey( + name: "fk_ignoredvoicepresencechannels_logsettings_logsettingid", + column: x => x.logsettingid, + principalTable: "logsettings", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "playlistsong", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + provider = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + providertype = table.Column(type: "int", nullable: false), + title = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + uri = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + query = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + musicplaylistid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_playlistsong", x => x.id); + table.ForeignKey( + name: "fk_playlistsong_musicplaylists_musicplaylistid", + column: x => x.musicplaylistid, + principalTable: "musicplaylists", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "pollanswer", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + index = table.Column(type: "int", nullable: false), + text = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + pollid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_pollanswer", x => x.id); + table.ForeignKey( + name: "fk_pollanswer_poll_pollid", + column: x => x.pollid, + principalTable: "poll", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "pollvote", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + voteindex = table.Column(type: "int", nullable: false), + pollid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_pollvote", x => x.id); + table.ForeignKey( + name: "fk_pollvote_poll_pollid", + column: x => x.pollid, + principalTable: "poll", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "antispamignore", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + channelid = table.Column(type: "bigint unsigned", nullable: false), + antispamsettingid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_antispamignore", x => x.id); + table.ForeignKey( + name: "fk_antispamignore_antispamsetting_antispamsettingid", + column: x => x.antispamsettingid, + principalTable: "antispamsetting", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "reactionrole", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + emotename = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + roleid = table.Column(type: "bigint unsigned", nullable: false), + reactionrolemessageid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_reactionrole", x => x.id); + table.ForeignKey( + name: "fk_reactionrole_reactionrolemessage_reactionrolemessageid", + column: x => x.reactionrolemessageid, + principalTable: "reactionrolemessage", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "shopentryitem", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + text = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + shopentryid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_shopentryitem", x => x.id); + table.ForeignKey( + name: "fk_shopentryitem_shopentry_shopentryid", + column: x => x.shopentryid, + principalTable: "shopentry", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "streamroleblacklisteduser", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + username = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + streamrolesettingsid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_streamroleblacklisteduser", x => x.id); + table.ForeignKey( + name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~", + column: x => x.streamrolesettingsid, + principalTable: "streamrolesettings", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "streamrolewhitelisteduser", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + username = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + streamrolesettingsid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_streamrolewhitelisteduser", x => x.id); + table.ForeignKey( + name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~", + column: x => x.streamrolesettingsid, + principalTable: "streamrolesettings", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "excludeditem", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + itemid = table.Column(type: "bigint unsigned", nullable: false), + itemtype = table.Column(type: "int", nullable: false), + xpsettingsid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_excludeditem", x => x.id); + table.ForeignKey( + name: "fk_excludeditem_xpsettings_xpsettingsid", + column: x => x.xpsettingsid, + principalTable: "xpsettings", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "xpcurrencyreward", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + xpsettingsid = table.Column(type: "int", nullable: false), + level = table.Column(type: "int", nullable: false), + amount = table.Column(type: "int", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_xpcurrencyreward", x => x.id); + table.ForeignKey( + name: "fk_xpcurrencyreward_xpsettings_xpsettingsid", + column: x => x.xpsettingsid, + principalTable: "xpsettings", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "xprolereward", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + xpsettingsid = table.Column(type: "int", nullable: false), + level = table.Column(type: "int", nullable: false), + roleid = table.Column(type: "bigint unsigned", nullable: false), + remove = table.Column(type: "tinyint(1)", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_xprolereward", x => x.id); + table.ForeignKey( + name: "fk_xprolereward_xpsettings_xpsettingsid", + column: x => x.xpsettingsid, + principalTable: "xpsettings", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "clubapplicants", + columns: table => new + { + clubid = table.Column(type: "int", nullable: false), + userid = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_clubapplicants", x => new { x.clubid, x.userid }); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "clubbans", + columns: table => new + { + clubid = table.Column(type: "int", nullable: false), + userid = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_clubbans", x => new { x.clubid, x.userid }); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "clubs", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + name = table.Column(type: "varchar(20)", maxLength: 20, nullable: false, collation: "utf8mb4_bin") + .Annotation("MySql:CharSet", "utf8mb4"), + description = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + imageurl = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + xp = table.Column(type: "int", nullable: false), + ownerid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_clubs", x => x.id); + table.UniqueConstraint("ak_clubs_name", x => x.name); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "discorduser", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + username = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + discriminator = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + avatarid = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + clubid = table.Column(type: "int", nullable: true), + isclubadmin = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), + totalxp = table.Column(type: "int", nullable: false, defaultValue: 0), + lastlevelup = table.Column(type: "datetime(6)", nullable: false, defaultValueSql: "(UTC_TIMESTAMP)"), + lastxpgain = table.Column(type: "datetime(6)", nullable: false, defaultValueSql: "(UTC_TIMESTAMP - INTERVAL 1 year)"), + notifyonlevelup = table.Column(type: "int", nullable: false, defaultValue: 0), + currencyamount = table.Column(type: "bigint", nullable: false, defaultValue: 0L), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_discorduser", x => x.id); + table.UniqueConstraint("ak_discorduser_userid", x => x.userid); + table.ForeignKey( + name: "fk_discorduser_clubs_clubid", + column: x => x.clubid, + principalTable: "clubs", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "waifuinfo", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + waifuid = table.Column(type: "int", nullable: false), + claimerid = table.Column(type: "int", nullable: true), + affinityid = table.Column(type: "int", nullable: true), + price = table.Column(type: "bigint", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_waifuinfo", x => x.id); + table.ForeignKey( + name: "fk_waifuinfo_discorduser_affinityid", + column: x => x.affinityid, + principalTable: "discorduser", + principalColumn: "id"); + table.ForeignKey( + name: "fk_waifuinfo_discorduser_claimerid", + column: x => x.claimerid, + principalTable: "discorduser", + principalColumn: "id"); + table.ForeignKey( + name: "fk_waifuinfo_discorduser_waifuid", + column: x => x.waifuid, + principalTable: "discorduser", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "waifuupdates", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "int", nullable: false), + updatetype = table.Column(type: "int", nullable: false), + oldid = table.Column(type: "int", nullable: true), + newid = table.Column(type: "int", nullable: true), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_waifuupdates", x => x.id); + table.ForeignKey( + name: "fk_waifuupdates_discorduser_newid", + column: x => x.newid, + principalTable: "discorduser", + principalColumn: "id"); + table.ForeignKey( + name: "fk_waifuupdates_discorduser_oldid", + column: x => x.oldid, + principalTable: "discorduser", + principalColumn: "id"); + table.ForeignKey( + name: "fk_waifuupdates_discorduser_userid", + column: x => x.userid, + principalTable: "discorduser", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "waifuitem", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + waifuinfoid = table.Column(type: "int", nullable: true), + itememoji = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + name = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_waifuitem", x => x.id); + table.ForeignKey( + name: "fk_waifuitem_waifuinfo_waifuinfoid", + column: x => x.waifuinfoid, + principalTable: "waifuinfo", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "ix_antialtsetting_guildconfigid", + table: "antialtsetting", + column: "guildconfigid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_antiraidsetting_guildconfigid", + table: "antiraidsetting", + column: "guildconfigid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_antispamignore_antispamsettingid", + table: "antispamignore", + column: "antispamsettingid"); + + migrationBuilder.CreateIndex( + name: "ix_antispamsetting_guildconfigid", + table: "antispamsetting", + column: "guildconfigid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_autotranslatechannels_channelid", + table: "autotranslatechannels", + column: "channelid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_autotranslatechannels_guildid", + table: "autotranslatechannels", + column: "guildid"); + + migrationBuilder.CreateIndex( + name: "ix_bantemplates_guildid", + table: "bantemplates", + column: "guildid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_clubapplicants_userid", + table: "clubapplicants", + column: "userid"); + + migrationBuilder.CreateIndex( + name: "ix_clubbans_userid", + table: "clubbans", + column: "userid"); + + migrationBuilder.CreateIndex( + name: "ix_clubs_ownerid", + table: "clubs", + column: "ownerid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_commandalias_guildconfigid", + table: "commandalias", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_commandcooldown_guildconfigid", + table: "commandcooldown", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_currencytransactions_userid", + table: "currencytransactions", + column: "userid"); + + migrationBuilder.CreateIndex( + name: "ix_delmsgoncmdchannel_guildconfigid", + table: "delmsgoncmdchannel", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_discordpermoverrides_guildid_command", + table: "discordpermoverrides", + columns: new[] { "guildid", "command" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_discorduser_clubid", + table: "discorduser", + column: "clubid"); + + migrationBuilder.CreateIndex( + name: "ix_discorduser_currencyamount", + table: "discorduser", + column: "currencyamount"); + + migrationBuilder.CreateIndex( + name: "ix_discorduser_totalxp", + table: "discorduser", + column: "totalxp"); + + migrationBuilder.CreateIndex( + name: "ix_discorduser_userid", + table: "discorduser", + column: "userid"); + + migrationBuilder.CreateIndex( + name: "ix_excludeditem_xpsettingsid", + table: "excludeditem", + column: "xpsettingsid"); + + migrationBuilder.CreateIndex( + name: "ix_filterchannelid_guildconfigid", + table: "filterchannelid", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_filteredword_guildconfigid", + table: "filteredword", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_filterlinkschannelid_guildconfigid", + table: "filterlinkschannelid", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_filterwordschannelid_guildconfigid", + table: "filterwordschannelid", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_followedstream_guildconfigid", + table: "followedstream", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_gcchannelid_guildconfigid", + table: "gcchannelid", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_groupname_guildconfigid_number", + table: "groupname", + columns: new[] { "guildconfigid", "number" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_guildconfigs_guildid", + table: "guildconfigs", + column: "guildid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_guildconfigs_warnexpirehours", + table: "guildconfigs", + column: "warnexpirehours"); + + migrationBuilder.CreateIndex( + name: "ix_ignoredlogchannels_logsettingid_logitemid_itemtype", + table: "ignoredlogchannels", + columns: new[] { "logsettingid", "logitemid", "itemtype" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_ignoredvoicepresencechannels_logsettingid", + table: "ignoredvoicepresencechannels", + column: "logsettingid"); + + migrationBuilder.CreateIndex( + name: "ix_imageonlychannels_channelid", + table: "imageonlychannels", + column: "channelid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_logsettings_guildid", + table: "logsettings", + column: "guildid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_musicplayersettings_guildid", + table: "musicplayersettings", + column: "guildid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_muteduserid_guildconfigid", + table: "muteduserid", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_nsfwblacklistedtags_guildid", + table: "nsfwblacklistedtags", + column: "guildid"); + + migrationBuilder.CreateIndex( + name: "ix_permissions_guildconfigid", + table: "permissions", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_plantedcurrency_channelid", + table: "plantedcurrency", + column: "channelid"); + + migrationBuilder.CreateIndex( + name: "ix_plantedcurrency_messageid", + table: "plantedcurrency", + column: "messageid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_playlistsong_musicplaylistid", + table: "playlistsong", + column: "musicplaylistid"); + + migrationBuilder.CreateIndex( + name: "ix_poll_guildid", + table: "poll", + column: "guildid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_pollanswer_pollid", + table: "pollanswer", + column: "pollid"); + + migrationBuilder.CreateIndex( + name: "ix_pollvote_pollid", + table: "pollvote", + column: "pollid"); + + migrationBuilder.CreateIndex( + name: "ix_quotes_guildid", + table: "quotes", + column: "guildid"); + + migrationBuilder.CreateIndex( + name: "ix_quotes_keyword", + table: "quotes", + column: "keyword"); + + migrationBuilder.CreateIndex( + name: "ix_reactionrole_reactionrolemessageid", + table: "reactionrole", + column: "reactionrolemessageid"); + + migrationBuilder.CreateIndex( + name: "ix_reactionrolemessage_guildconfigid", + table: "reactionrolemessage", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_reminders_when", + table: "reminders", + column: "when"); + + migrationBuilder.CreateIndex( + name: "ix_rewardedusers_patreonuserid", + table: "rewardedusers", + column: "patreonuserid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_selfassignableroles_guildid_roleid", + table: "selfassignableroles", + columns: new[] { "guildid", "roleid" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_shopentry_guildconfigid", + table: "shopentry", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_shopentryitem_shopentryid", + table: "shopentryitem", + column: "shopentryid"); + + migrationBuilder.CreateIndex( + name: "ix_slowmodeignoredrole_guildconfigid", + table: "slowmodeignoredrole", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_slowmodeignoreduser_guildconfigid", + table: "slowmodeignoreduser", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_streamroleblacklisteduser_streamrolesettingsid", + table: "streamroleblacklisteduser", + column: "streamrolesettingsid"); + + migrationBuilder.CreateIndex( + name: "ix_streamrolesettings_guildconfigid", + table: "streamrolesettings", + column: "guildconfigid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_streamrolewhitelisteduser_streamrolesettingsid", + table: "streamrolewhitelisteduser", + column: "streamrolesettingsid"); + + migrationBuilder.CreateIndex( + name: "ix_unbantimer_guildconfigid", + table: "unbantimer", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_unmutetimer_guildconfigid", + table: "unmutetimer", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_unroletimer_guildconfigid", + table: "unroletimer", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_userxpstats_awardedxp", + table: "userxpstats", + column: "awardedxp"); + + migrationBuilder.CreateIndex( + name: "ix_userxpstats_guildid", + table: "userxpstats", + column: "guildid"); + + migrationBuilder.CreateIndex( + name: "ix_userxpstats_userid", + table: "userxpstats", + column: "userid"); + + migrationBuilder.CreateIndex( + name: "ix_userxpstats_userid_guildid", + table: "userxpstats", + columns: new[] { "userid", "guildid" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_userxpstats_xp", + table: "userxpstats", + column: "xp"); + + migrationBuilder.CreateIndex( + name: "ix_vcroleinfo_guildconfigid", + table: "vcroleinfo", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_waifuinfo_affinityid", + table: "waifuinfo", + column: "affinityid"); + + migrationBuilder.CreateIndex( + name: "ix_waifuinfo_claimerid", + table: "waifuinfo", + column: "claimerid"); + + migrationBuilder.CreateIndex( + name: "ix_waifuinfo_price", + table: "waifuinfo", + column: "price"); + + migrationBuilder.CreateIndex( + name: "ix_waifuinfo_waifuid", + table: "waifuinfo", + column: "waifuid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_waifuitem_waifuinfoid", + table: "waifuitem", + column: "waifuinfoid"); + + migrationBuilder.CreateIndex( + name: "ix_waifuupdates_newid", + table: "waifuupdates", + column: "newid"); + + migrationBuilder.CreateIndex( + name: "ix_waifuupdates_oldid", + table: "waifuupdates", + column: "oldid"); + + migrationBuilder.CreateIndex( + name: "ix_waifuupdates_userid", + table: "waifuupdates", + column: "userid"); + + migrationBuilder.CreateIndex( + name: "ix_warningpunishment_guildconfigid", + table: "warningpunishment", + column: "guildconfigid"); + + migrationBuilder.CreateIndex( + name: "ix_warnings_dateadded", + table: "warnings", + column: "dateadded"); + + migrationBuilder.CreateIndex( + name: "ix_warnings_guildid", + table: "warnings", + column: "guildid"); + + migrationBuilder.CreateIndex( + name: "ix_warnings_userid", + table: "warnings", + column: "userid"); + + migrationBuilder.CreateIndex( + name: "ix_xpcurrencyreward_xpsettingsid", + table: "xpcurrencyreward", + column: "xpsettingsid"); + + migrationBuilder.CreateIndex( + name: "ix_xprolereward_xpsettingsid_level", + table: "xprolereward", + columns: new[] { "xpsettingsid", "level" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_xpsettings_guildconfigid", + table: "xpsettings", + column: "guildconfigid", + unique: true); + + migrationBuilder.AddForeignKey( + name: "fk_clubapplicants_clubs_clubid", + table: "clubapplicants", + column: "clubid", + principalTable: "clubs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_clubapplicants_discorduser_userid", + table: "clubapplicants", + column: "userid", + principalTable: "discorduser", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_clubbans_clubs_clubid", + table: "clubbans", + column: "clubid", + principalTable: "clubs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_clubbans_discorduser_userid", + table: "clubbans", + column: "userid", + principalTable: "discorduser", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_clubs_discorduser_ownerid", + table: "clubs", + column: "ownerid", + principalTable: "discorduser", + principalColumn: "id", + onDelete: ReferentialAction.SetNull); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "fk_discorduser_clubs_clubid", + table: "discorduser"); + + migrationBuilder.DropTable( + name: "antialtsetting"); + + migrationBuilder.DropTable( + name: "antiraidsetting"); + + migrationBuilder.DropTable( + name: "antispamignore"); + + migrationBuilder.DropTable( + name: "autocommands"); + + migrationBuilder.DropTable( + name: "autotranslateusers"); + + migrationBuilder.DropTable( + name: "bantemplates"); + + migrationBuilder.DropTable( + name: "blacklist"); + + migrationBuilder.DropTable( + name: "clubapplicants"); + + migrationBuilder.DropTable( + name: "clubbans"); + + migrationBuilder.DropTable( + name: "commandalias"); + + migrationBuilder.DropTable( + name: "commandcooldown"); + + migrationBuilder.DropTable( + name: "currencytransactions"); + + migrationBuilder.DropTable( + name: "delmsgoncmdchannel"); + + migrationBuilder.DropTable( + name: "discordpermoverrides"); + + migrationBuilder.DropTable( + name: "excludeditem"); + + migrationBuilder.DropTable( + name: "expressions"); + + migrationBuilder.DropTable( + name: "feedsub"); + + migrationBuilder.DropTable( + name: "filterchannelid"); + + migrationBuilder.DropTable( + name: "filteredword"); + + migrationBuilder.DropTable( + name: "filterlinkschannelid"); + + migrationBuilder.DropTable( + name: "filterwordschannelid"); + + migrationBuilder.DropTable( + name: "followedstream"); + + migrationBuilder.DropTable( + name: "gcchannelid"); + + migrationBuilder.DropTable( + name: "groupname"); + + migrationBuilder.DropTable( + name: "ignoredlogchannels"); + + migrationBuilder.DropTable( + name: "ignoredvoicepresencechannels"); + + migrationBuilder.DropTable( + name: "imageonlychannels"); + + migrationBuilder.DropTable( + name: "musicplayersettings"); + + migrationBuilder.DropTable( + name: "muteduserid"); + + migrationBuilder.DropTable( + name: "nsfwblacklistedtags"); + + migrationBuilder.DropTable( + name: "permissions"); + + migrationBuilder.DropTable( + name: "plantedcurrency"); + + migrationBuilder.DropTable( + name: "playlistsong"); + + migrationBuilder.DropTable( + name: "pollanswer"); + + migrationBuilder.DropTable( + name: "pollvote"); + + migrationBuilder.DropTable( + name: "quotes"); + + migrationBuilder.DropTable( + name: "reactionrole"); + + migrationBuilder.DropTable( + name: "reminders"); + + migrationBuilder.DropTable( + name: "repeaters"); + + migrationBuilder.DropTable( + name: "rewardedusers"); + + migrationBuilder.DropTable( + name: "rotatingstatus"); + + migrationBuilder.DropTable( + name: "selfassignableroles"); + + migrationBuilder.DropTable( + name: "shopentryitem"); + + migrationBuilder.DropTable( + name: "slowmodeignoredrole"); + + migrationBuilder.DropTable( + name: "slowmodeignoreduser"); + + migrationBuilder.DropTable( + name: "streamroleblacklisteduser"); + + migrationBuilder.DropTable( + name: "streamrolewhitelisteduser"); + + migrationBuilder.DropTable( + name: "unbantimer"); + + migrationBuilder.DropTable( + name: "unmutetimer"); + + migrationBuilder.DropTable( + name: "unroletimer"); + + migrationBuilder.DropTable( + name: "userxpstats"); + + migrationBuilder.DropTable( + name: "vcroleinfo"); + + migrationBuilder.DropTable( + name: "waifuitem"); + + migrationBuilder.DropTable( + name: "waifuupdates"); + + migrationBuilder.DropTable( + name: "warningpunishment"); + + migrationBuilder.DropTable( + name: "warnings"); + + migrationBuilder.DropTable( + name: "xpcurrencyreward"); + + migrationBuilder.DropTable( + name: "xprolereward"); + + migrationBuilder.DropTable( + name: "antispamsetting"); + + migrationBuilder.DropTable( + name: "autotranslatechannels"); + + migrationBuilder.DropTable( + name: "logsettings"); + + migrationBuilder.DropTable( + name: "musicplaylists"); + + migrationBuilder.DropTable( + name: "poll"); + + migrationBuilder.DropTable( + name: "reactionrolemessage"); + + migrationBuilder.DropTable( + name: "shopentry"); + + migrationBuilder.DropTable( + name: "streamrolesettings"); + + migrationBuilder.DropTable( + name: "waifuinfo"); + + migrationBuilder.DropTable( + name: "xpsettings"); + + migrationBuilder.DropTable( + name: "guildconfigs"); + + migrationBuilder.DropTable( + name: "clubs"); + + migrationBuilder.DropTable( + name: "discorduser"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220428044612_stondel.Designer.cs b/src/EllieBot/Migrations/Mysql/20220428044612_stondel.Designer.cs new file mode 100644 index 0000000..3eef208 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220428044612_stondel.Designer.cs @@ -0,0 +1,3429 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20220428044612_stondel")] + partial class stondel + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("LastXpGain") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastxpgain") + .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .HasColumnType("tinyint(1)") + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("EmoteName") + .HasColumnType("longtext") + .HasColumnName("emotename"); + + b.Property("ReactionRoleMessageId") + .HasColumnType("int") + .HasColumnName("reactionrolemessageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionrole"); + + b.HasIndex("ReactionRoleMessageId") + .HasDatabaseName("ix_reactionrole_reactionrolemessageid"); + + b.ToTable("reactionrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Exclusive") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusive"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.HasKey("Id") + .HasName("pk_reactionrolemessage"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_reactionrolemessage_guildconfigid"); + + b.ToTable("reactionrolemessage", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("int") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PatreonUserId") + .HasColumnType("varchar(255)") + .HasColumnName("patreonuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PatreonUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_patreonuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("int") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) + .WithMany("ReactionRoles") + .HasForeignKey("ReactionRoleMessageId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_reactionrole_reactionrolemessage_reactionrolemessageid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("ReactionRoleMessages") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_reactionrolemessage_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("ReactionRoleMessages"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => + { + b.Navigation("ReactionRoles"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220428044612_stondel.cs b/src/EllieBot/Migrations/Mysql/20220428044612_stondel.cs new file mode 100644 index 0000000..2daa4c0 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220428044612_stondel.cs @@ -0,0 +1,26 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class stondel : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "deletestreamonlinemessage", + table: "guildconfigs", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "deletestreamonlinemessage", + table: "guildconfigs"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220429044757_bank.Designer.cs b/src/EllieBot/Migrations/Mysql/20220429044757_bank.Designer.cs new file mode 100644 index 0000000..f47381e --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220429044757_bank.Designer.cs @@ -0,0 +1,3458 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20220429044757_bank")] + partial class bank + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("LastXpGain") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastxpgain") + .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .HasColumnType("tinyint(1)") + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("EmoteName") + .HasColumnType("longtext") + .HasColumnName("emotename"); + + b.Property("ReactionRoleMessageId") + .HasColumnType("int") + .HasColumnName("reactionrolemessageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionrole"); + + b.HasIndex("ReactionRoleMessageId") + .HasDatabaseName("ix_reactionrole_reactionrolemessageid"); + + b.ToTable("reactionrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Exclusive") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusive"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.HasKey("Id") + .HasName("pk_reactionrolemessage"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_reactionrolemessage_guildconfigid"); + + b.ToTable("reactionrolemessage", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("int") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PatreonUserId") + .HasColumnType("varchar(255)") + .HasColumnName("patreonuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PatreonUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_patreonuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("int") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.ReactionRoleMessage", null) + .WithMany("ReactionRoles") + .HasForeignKey("ReactionRoleMessageId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_reactionrole_reactionrolemessage_reactionrolemessageid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("ReactionRoleMessages") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_reactionrolemessage_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("ReactionRoleMessages"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleMessage", b => + { + b.Navigation("ReactionRoles"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220429044757_bank.cs b/src/EllieBot/Migrations/Mysql/20220429044757_bank.cs new file mode 100644 index 0000000..73e42f7 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220429044757_bank.cs @@ -0,0 +1,42 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class bank : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "bankusers", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + balance = table.Column(type: "bigint", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_bankusers", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "ix_bankusers_userid", + table: "bankusers", + column: "userid", + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "bankusers"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.Designer.cs b/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.Designer.cs new file mode 100644 index 0000000..ef0f91b --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.Designer.cs @@ -0,0 +1,3411 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20220504162509_new-rero")] + partial class newrero + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("LastXpGain") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastxpgain") + .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .HasColumnType("tinyint(1)") + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("int") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PatreonUserId") + .HasColumnType("varchar(255)") + .HasColumnName("patreonuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PatreonUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_patreonuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("int") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.cs b/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.cs new file mode 100644 index 0000000..e94af0b --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220504162509_new-rero.cs @@ -0,0 +1,121 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class newrero : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + + migrationBuilder.CreateTable( + name: "reactionroles", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: false), + messageid = table.Column(type: "bigint unsigned", nullable: false), + emote = table.Column(type: "varchar(100)", maxLength: 100, nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + roleid = table.Column(type: "bigint unsigned", nullable: false), + group = table.Column(type: "int", nullable: false), + levelreq = table.Column(type: "int", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_reactionroles", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "ix_reactionroles_guildid", + table: "reactionroles", + column: "guildid"); + + migrationBuilder.CreateIndex( + name: "ix_reactionroles_messageid_emote", + table: "reactionroles", + columns: new[] { "messageid", "emote" }, + unique: true); + + MigrationQueries.MigrateRero(migrationBuilder); + + migrationBuilder.DropTable( + name: "reactionrole"); + + migrationBuilder.DropTable( + name: "reactionrolemessage"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "reactionroles"); + + migrationBuilder.CreateTable( + name: "reactionrolemessage", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildconfigid = table.Column(type: "int", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true), + exclusive = table.Column(type: "tinyint(1)", nullable: false), + index = table.Column(type: "int", nullable: false), + messageid = table.Column(type: "bigint unsigned", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_reactionrolemessage", x => x.id); + table.ForeignKey( + name: "fk_reactionrolemessage_guildconfigs_guildconfigid", + column: x => x.guildconfigid, + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "reactionrole", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + dateadded = table.Column(type: "datetime(6)", nullable: true), + emotename = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + reactionrolemessageid = table.Column(type: "int", nullable: true), + roleid = table.Column(type: "bigint unsigned", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_reactionrole", x => x.id); + table.ForeignKey( + name: "fk_reactionrole_reactionrolemessage_reactionrolemessageid", + column: x => x.reactionrolemessageid, + principalTable: "reactionrolemessage", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "ix_reactionrole_reactionrolemessageid", + table: "reactionrole", + column: "reactionrolemessageid"); + + migrationBuilder.CreateIndex( + name: "ix_reactionrolemessage_guildconfigid", + table: "reactionrolemessage", + column: "guildconfigid"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.Designer.cs b/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.Designer.cs new file mode 100644 index 0000000..9ae3e46 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.Designer.cs @@ -0,0 +1,3481 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20220614071410_patronage-system")] + partial class patronagesystem + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("LastXpGain") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastxpgain") + .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => + { + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.cs b/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.cs new file mode 100644 index 0000000..af53bf5 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220614071410_patronage-system.cs @@ -0,0 +1,176 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class patronagesystem : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "patreonuserid", + table: "rewardedusers", + newName: "platformuserid"); + + migrationBuilder.RenameIndex( + name: "ix_rewardedusers_patreonuserid", + table: "rewardedusers", + newName: "ix_rewardedusers_platformuserid"); + + migrationBuilder.AlterColumn( + name: "xp", + table: "userxpstats", + type: "bigint", + nullable: false, + oldClrType: typeof(int), + oldType: "int"); + + migrationBuilder.AlterColumn( + name: "awardedxp", + table: "userxpstats", + type: "bigint", + nullable: false, + oldClrType: typeof(int), + oldType: "int"); + + migrationBuilder.AlterColumn( + name: "amountrewardedthismonth", + table: "rewardedusers", + type: "bigint", + nullable: false, + oldClrType: typeof(int), + oldType: "int"); + + migrationBuilder.AlterColumn( + name: "verboseerrors", + table: "guildconfigs", + type: "tinyint(1)", + nullable: false, + defaultValue: true, + oldClrType: typeof(bool), + oldType: "tinyint(1)"); + + migrationBuilder.AlterColumn( + name: "totalxp", + table: "discorduser", + type: "bigint", + nullable: false, + defaultValue: 0L, + oldClrType: typeof(int), + oldType: "int", + oldDefaultValue: 0); + + migrationBuilder.CreateTable( + name: "patronquotas", + columns: table => new + { + userid = table.Column(type: "bigint unsigned", nullable: false), + featuretype = table.Column(type: "int", nullable: false), + feature = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + hourlycount = table.Column(type: "int unsigned", nullable: false), + dailycount = table.Column(type: "int unsigned", nullable: false), + monthlycount = table.Column(type: "int unsigned", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_patronquotas", x => new { x.userid, x.featuretype, x.feature }); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "patrons", + columns: table => new + { + userid = table.Column(type: "bigint unsigned", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + uniqueplatformuserid = table.Column(type: "varchar(255)", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + amountcents = table.Column(type: "int", nullable: false), + lastcharge = table.Column(type: "datetime(6)", nullable: false), + validthru = table.Column(type: "datetime(6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_patrons", x => x.userid); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "ix_patronquotas_userid", + table: "patronquotas", + column: "userid"); + + migrationBuilder.CreateIndex( + name: "ix_patrons_uniqueplatformuserid", + table: "patrons", + column: "uniqueplatformuserid", + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "patronquotas"); + + migrationBuilder.DropTable( + name: "patrons"); + + migrationBuilder.RenameColumn( + name: "platformuserid", + table: "rewardedusers", + newName: "patreonuserid"); + + migrationBuilder.RenameIndex( + name: "ix_rewardedusers_platformuserid", + table: "rewardedusers", + newName: "ix_rewardedusers_patreonuserid"); + + migrationBuilder.AlterColumn( + name: "xp", + table: "userxpstats", + type: "int", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint"); + + migrationBuilder.AlterColumn( + name: "awardedxp", + table: "userxpstats", + type: "int", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint"); + + migrationBuilder.AlterColumn( + name: "amountrewardedthismonth", + table: "rewardedusers", + type: "int", + nullable: false, + oldClrType: typeof(long), + oldType: "bigint"); + + migrationBuilder.AlterColumn( + name: "verboseerrors", + table: "guildconfigs", + type: "tinyint(1)", + nullable: false, + oldClrType: typeof(bool), + oldType: "tinyint(1)", + oldDefaultValue: true); + + migrationBuilder.AlterColumn( + name: "totalxp", + table: "discorduser", + type: "int", + nullable: false, + defaultValue: 0, + oldClrType: typeof(long), + oldType: "bigint", + oldDefaultValue: 0L); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.Designer.cs b/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.Designer.cs new file mode 100644 index 0000000..3b4cb17 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.Designer.cs @@ -0,0 +1,3514 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20220623090718_stondel-db-cache")] + partial class stondeldbcache + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.6") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("LastXpGain") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastxpgain") + .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => + { + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.cs b/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.cs new file mode 100644 index 0000000..1546ea1 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220623090718_stondel-db-cache.cs @@ -0,0 +1,39 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class stondeldbcache : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "streamonlinemessages", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + channelid = table.Column(type: "bigint unsigned", nullable: false), + messageid = table.Column(type: "bigint unsigned", nullable: false), + type = table.Column(type: "int", nullable: false), + name = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_streamonlinemessages", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "streamonlinemessages"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220703194400_logwarns.Designer.cs b/src/EllieBot/Migrations/Mysql/20220703194400_logwarns.Designer.cs new file mode 100644 index 0000000..9a940a3 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220703194400_logwarns.Designer.cs @@ -0,0 +1,3518 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20220703194400_logwarns")] + partial class logwarns + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.6") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("LastXpGain") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastxpgain") + .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => + { + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220703194400_logwarns.cs b/src/EllieBot/Migrations/Mysql/20220703194400_logwarns.cs new file mode 100644 index 0000000..02adc4e --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220703194400_logwarns.cs @@ -0,0 +1,25 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class logwarns : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "logwarnsid", + table: "logsettings", + type: "bigint unsigned", + nullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "logwarnsid", + table: "logsettings"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.Designer.cs b/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.Designer.cs new file mode 100644 index 0000000..e887ab4 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.Designer.cs @@ -0,0 +1,3556 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20220725155953_xpitemshop")] + partial class xpitemshop + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.7") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("LastXpGain") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastxpgain") + .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => + { + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); + + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); + + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.cs b/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.cs new file mode 100644 index 0000000..e876590 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220725155953_xpitemshop.cs @@ -0,0 +1,45 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class xpitemshop : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "xpshopowneditem", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + itemtype = table.Column(type: "int", nullable: false), + isusing = table.Column(type: "tinyint(1)", nullable: false), + itemkey = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_xpshopowneditem", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "ix_xpshopowneditem_userid_itemtype_itemkey", + table: "xpshopowneditem", + columns: new[] { "userid", "itemtype", "itemkey" }, + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "xpshopowneditem"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220727033931_linkonly-channels.Designer.cs b/src/EllieBot/Migrations/Mysql/20220727033931_linkonly-channels.Designer.cs new file mode 100644 index 0000000..11a1e05 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220727033931_linkonly-channels.Designer.cs @@ -0,0 +1,3560 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20220727033931_linkonly-channels")] + partial class linkonlychannels + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.7") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("LastXpGain") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastxpgain") + .HasDefaultValueSql("(UTC_TIMESTAMP - INTERVAL 1 year)"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => + { + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); + + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); + + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasColumnName("lastlevelup") + .HasDefaultValueSql("(UTC_TIMESTAMP)"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220727033931_linkonly-channels.cs b/src/EllieBot/Migrations/Mysql/20220727033931_linkonly-channels.cs new file mode 100644 index 0000000..95a31e3 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220727033931_linkonly-channels.cs @@ -0,0 +1,26 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class linkonlychannels : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "type", + table: "imageonlychannels", + type: "int", + nullable: false, + defaultValue: 0); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "type", + table: "imageonlychannels"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.Designer.cs b/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.Designer.cs new file mode 100644 index 0000000..26d81e5 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.Designer.cs @@ -0,0 +1,3542 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20220808141855_remove-obsolete-xp-columns")] + partial class removeobsoletexpcolumns + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.7") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => + { + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); + + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); + + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.cs b/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.cs new file mode 100644 index 0000000..dedceb3 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220808141855_remove-obsolete-xp-columns.cs @@ -0,0 +1,49 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class removeobsoletexpcolumns : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "lastlevelup", + table: "userxpstats"); + + migrationBuilder.DropColumn( + name: "lastlevelup", + table: "discorduser"); + + migrationBuilder.DropColumn( + name: "lastxpgain", + table: "discorduser"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "lastlevelup", + table: "userxpstats", + type: "datetime(6)", + nullable: false, + defaultValueSql: "(UTC_TIMESTAMP)"); + + migrationBuilder.AddColumn( + name: "lastlevelup", + table: "discorduser", + type: "datetime(6)", + nullable: false, + defaultValueSql: "(UTC_TIMESTAMP)"); + + migrationBuilder.AddColumn( + name: "lastxpgain", + table: "discorduser", + type: "datetime(6)", + nullable: false, + defaultValueSql: "(UTC_TIMESTAMP - INTERVAL 1 year)"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220831142722_banprune.Designer.cs b/src/EllieBot/Migrations/Mysql/20220831142722_banprune.Designer.cs new file mode 100644 index 0000000..19d21c1 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220831142722_banprune.Designer.cs @@ -0,0 +1,3546 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20220831142722_banprune")] + partial class banprune + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.7") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => + { + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); + + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); + + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("PruneDays") + .HasColumnType("int") + .HasColumnName("prunedays"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220831142722_banprune.cs b/src/EllieBot/Migrations/Mysql/20220831142722_banprune.cs new file mode 100644 index 0000000..5a1c7b7 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220831142722_banprune.cs @@ -0,0 +1,25 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class banprune : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "prunedays", + table: "bantemplates", + type: "int", + nullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "prunedays", + table: "bantemplates"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220913192520_shop-role-req.Designer.cs b/src/EllieBot/Migrations/Mysql/20220913192520_shop-role-req.Designer.cs new file mode 100644 index 0000000..031585a --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220913192520_shop-role-req.Designer.cs @@ -0,0 +1,3550 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20220913192520_shop-role-req")] + partial class shoprolereq + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.7") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => + { + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); + + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); + + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("PruneDays") + .HasColumnType("int") + .HasColumnName("prunedays"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") + .HasColumnName("rolerequirement"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220913192520_shop-role-req.cs b/src/EllieBot/Migrations/Mysql/20220913192520_shop-role-req.cs new file mode 100644 index 0000000..6d52a2c --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220913192520_shop-role-req.cs @@ -0,0 +1,25 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class shoprolereq : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "rolerequirement", + table: "shopentry", + type: "bigint unsigned", + nullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "rolerequirement", + table: "shopentry"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220916194514_autopub.Designer.cs b/src/EllieBot/Migrations/Mysql/20220916194514_autopub.Designer.cs new file mode 100644 index 0000000..af77b12 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220916194514_autopub.Designer.cs @@ -0,0 +1,3579 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20220916194514_autopub")] + partial class autopub + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.7") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autopublishchannel"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_autopublishchannel_guildid"); + + b.ToTable("autopublishchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => + { + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); + + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); + + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("PruneDays") + .HasColumnType("int") + .HasColumnName("prunedays"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") + .HasColumnName("rolerequirement"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20220916194514_autopub.cs b/src/EllieBot/Migrations/Mysql/20220916194514_autopub.cs new file mode 100644 index 0000000..16a0ed2 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20220916194514_autopub.cs @@ -0,0 +1,42 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class autopub : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "autopublishchannel", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_autopublishchannel", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "ix_autopublishchannel_guildid", + table: "autopublishchannel", + column: "guildid", + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "autopublishchannel"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.Designer.cs b/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.Designer.cs new file mode 100644 index 0000000..c2041d8 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.Designer.cs @@ -0,0 +1,3612 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20221003175743_gambling-stats")] + partial class gamblingstats + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.7") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autopublishchannel"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_autopublishchannel_guildid"); + + b.ToTable("autopublishchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => + { + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); + + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); + + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("PruneDays") + .HasColumnType("int") + .HasColumnName("prunedays"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Bet") + .HasColumnType("decimal(65,30)") + .HasColumnName("bet"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("PaidOut") + .HasColumnType("decimal(65,30)") + .HasColumnName("paidout"); + + b.HasKey("Id") + .HasName("pk_gamblingstats"); + + b.HasIndex("Feature") + .IsUnique() + .HasDatabaseName("ix_gamblingstats_feature"); + + b.ToTable("gamblingstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") + .HasColumnName("rolerequirement"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.cs b/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.cs new file mode 100644 index 0000000..bb53a5e --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20221003175743_gambling-stats.cs @@ -0,0 +1,44 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class gamblingstats : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "gamblingstats", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + feature = table.Column(type: "varchar(255)", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + bet = table.Column(type: "decimal(65,30)", nullable: false), + paidout = table.Column(type: "decimal(65,30)", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_gamblingstats", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "ix_gamblingstats_feature", + table: "gamblingstats", + column: "feature", + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "gamblingstats"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20221021192758_toggle-global-expressions.Designer.cs b/src/EllieBot/Migrations/Mysql/20221021192758_toggle-global-expressions.Designer.cs new file mode 100644 index 0000000..a953c5f --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20221021192758_toggle-global-expressions.Designer.cs @@ -0,0 +1,3616 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20221021192758_toggle-global-expressions")] + partial class toggleglobalexpressions + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.7") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autopublishchannel"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_autopublishchannel_guildid"); + + b.ToTable("autopublishchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => + { + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); + + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); + + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("PruneDays") + .HasColumnType("int") + .HasColumnName("prunedays"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Bet") + .HasColumnType("decimal(65,30)") + .HasColumnName("bet"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("PaidOut") + .HasColumnType("decimal(65,30)") + .HasColumnName("paidout"); + + b.HasKey("Id") + .HasName("pk_gamblingstats"); + + b.HasIndex("Feature") + .IsUnique() + .HasDatabaseName("ix_gamblingstats_feature"); + + b.ToTable("gamblingstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DisableGlobalExpressions") + .HasColumnType("tinyint(1)") + .HasColumnName("disableglobalexpressions"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") + .HasColumnName("rolerequirement"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20221021192758_toggle-global-expressions.cs b/src/EllieBot/Migrations/Mysql/20221021192758_toggle-global-expressions.cs new file mode 100644 index 0000000..ebbcc38 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20221021192758_toggle-global-expressions.cs @@ -0,0 +1,26 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class toggleglobalexpressions : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "disableglobalexpressions", + table: "guildconfigs", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "disableglobalexpressions", + table: "guildconfigs"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20221118195208_log-thread.Designer.cs b/src/EllieBot/Migrations/Mysql/20221118195208_log-thread.Designer.cs new file mode 100644 index 0000000..ba0d48a --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20221118195208_log-thread.Designer.cs @@ -0,0 +1,3624 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20221118195208_log-thread")] + partial class logthread + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.7") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autopublishchannel"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_autopublishchannel_guildid"); + + b.ToTable("autopublishchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => + { + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); + + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); + + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("PruneDays") + .HasColumnType("int") + .HasColumnName("prunedays"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Bet") + .HasColumnType("decimal(65,30)") + .HasColumnName("bet"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("PaidOut") + .HasColumnType("decimal(65,30)") + .HasColumnName("paidout"); + + b.HasKey("Id") + .HasName("pk_gamblingstats"); + + b.HasIndex("Feature") + .IsUnique() + .HasDatabaseName("ix_gamblingstats_feature"); + + b.ToTable("gamblingstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DisableGlobalExpressions") + .HasColumnType("tinyint(1)") + .HasColumnName("disableglobalexpressions"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("ThreadCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("threadcreatedid"); + + b.Property("ThreadDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("threaddeletedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") + .HasColumnName("rolerequirement"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20221118195208_log-thread.cs b/src/EllieBot/Migrations/Mysql/20221118195208_log-thread.cs new file mode 100644 index 0000000..5b2b38d --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20221118195208_log-thread.cs @@ -0,0 +1,35 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class logthread : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "threadcreatedid", + table: "logsettings", + type: "bigint unsigned", + nullable: true); + + migrationBuilder.AddColumn( + name: "threaddeletedid", + table: "logsettings", + type: "bigint unsigned", + nullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "threadcreatedid", + table: "logsettings"); + + migrationBuilder.DropColumn( + name: "threaddeletedid", + table: "logsettings"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20221122204432_feed-text.Designer.cs b/src/EllieBot/Migrations/Mysql/20221122204432_feed-text.Designer.cs new file mode 100644 index 0000000..d21380b --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20221122204432_feed-text.Designer.cs @@ -0,0 +1,3628 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Services.Database; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20221122204432_feed-text")] + partial class feedtext + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.7") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autopublishchannel"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_autopublishchannel_guildid"); + + b.ToTable("autopublishchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasAlternateKey("Name") + .HasName("ak_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => + { + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); + + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); + + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("PruneDays") + .HasColumnType("int") + .HasColumnName("prunedays"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GamblingStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Bet") + .HasColumnType("decimal(65,30)") + .HasColumnName("bet"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("PaidOut") + .HasColumnType("decimal(65,30)") + .HasColumnName("paidout"); + + b.HasKey("Id") + .HasName("pk_gamblingstats"); + + b.HasIndex("Feature") + .IsUnique() + .HasDatabaseName("ix_gamblingstats_feature"); + + b.ToTable("gamblingstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DisableGlobalExpressions") + .HasColumnType("tinyint(1)") + .HasColumnName("disableglobalexpressions"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("ThreadCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("threadcreatedid"); + + b.Property("ThreadDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("threaddeletedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.NsfwBlacklistedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Tag") + .HasColumnType("longtext") + .HasColumnName("tag"); + + b.HasKey("Id") + .HasName("pk_nsfwblacklistedtags"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_nsfwblacklistedtags_guildid"); + + b.ToTable("nsfwblacklistedtags", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Question") + .HasColumnType("longtext") + .HasColumnName("question"); + + b.HasKey("Id") + .HasName("pk_poll"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_poll_guildid"); + + b.ToTable("poll", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_pollanswer"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollanswer_pollid"); + + b.ToTable("pollanswer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("PollId") + .HasColumnType("int") + .HasColumnName("pollid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("VoteIndex") + .HasColumnType("int") + .HasColumnName("voteindex"); + + b.HasKey("Id") + .HasName("pk_pollvote"); + + b.HasIndex("PollId") + .HasDatabaseName("ix_pollvote_pollid"); + + b.ToTable("pollvote", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") + .HasColumnName("rolerequirement"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Services.Database.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FeedSub", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GroupName", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Services.Database.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollAnswer", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Answers") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollanswer_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.PollVote", b => + { + b.HasOne("EllieBot.Services.Database.Models.Poll", null) + .WithMany("Votes") + .HasForeignKey("PollId") + .HasConstraintName("fk_pollvote_poll_pollid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Services.Database.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Services.Database.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.HasOne("EllieBot.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.Poll", b => + { + b.Navigation("Answers"); + + b.Navigation("Votes"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Services.Database.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20221122204432_feed-text.cs b/src/EllieBot/Migrations/Mysql/20221122204432_feed-text.cs new file mode 100644 index 0000000..c9760b4 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20221122204432_feed-text.cs @@ -0,0 +1,26 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + public partial class feedtext : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "message", + table: "feedsub", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "message", + table: "feedsub"); + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20240502233216_v5.Designer.cs b/src/EllieBot/Migrations/Mysql/20240502233216_v5.Designer.cs new file mode 100644 index 0000000..4c8220f --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20240502233216_v5.Designer.cs @@ -0,0 +1,3830 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using EllieBot.Db; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + [DbContext(typeof(MysqlContext))] + [Migration("20240502233216_v5")] + partial class v5 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("ActionDurationMinutes") + .HasColumnType("int") + .HasColumnName("actiondurationminutes"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MinAge") + .HasColumnType("time(6)") + .HasColumnName("minage"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antialtsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antialtsetting_guildconfigid"); + + b.ToTable("antialtsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("PunishDuration") + .HasColumnType("int") + .HasColumnName("punishduration"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.Property("UserThreshold") + .HasColumnType("int") + .HasColumnName("userthreshold"); + + b.HasKey("Id") + .HasName("pk_antiraidsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antiraidsetting_guildconfigid"); + + b.ToTable("antiraidsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AntiSpamSettingId") + .HasColumnType("int") + .HasColumnName("antispamsettingid"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.HasKey("Id") + .HasName("pk_antispamignore"); + + b.HasIndex("AntiSpamSettingId") + .HasDatabaseName("ix_antispamignore_antispamsettingid"); + + b.ToTable("antispamignore", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("MessageThreshold") + .HasColumnType("int") + .HasColumnName("messagethreshold"); + + b.Property("MuteTime") + .HasColumnType("int") + .HasColumnName("mutetime"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_antispamsetting"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_antispamsetting_guildconfigid"); + + b.ToTable("antispamsetting", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_todosarchive"); + + b.ToTable("todosarchive", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("ChannelName") + .HasColumnType("longtext") + .HasColumnName("channelname"); + + b.Property("CommandText") + .HasColumnType("longtext") + .HasColumnName("commandtext"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("GuildName") + .HasColumnType("longtext") + .HasColumnName("guildname"); + + b.Property("Interval") + .HasColumnType("int") + .HasColumnName("interval"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.Property("VoiceChannelName") + .HasColumnType("longtext") + .HasColumnName("voicechannelname"); + + b.HasKey("Id") + .HasName("pk_autocommands"); + + b.ToTable("autocommands", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autopublishchannel"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_autopublishchannel_guildid"); + + b.ToTable("autopublishchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AutoDelete") + .HasColumnType("tinyint(1)") + .HasColumnName("autodelete"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.HasKey("Id") + .HasName("pk_autotranslatechannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_autotranslatechannels_channelid"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_autotranslatechannels_guildid"); + + b.ToTable("autotranslatechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("int") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Source") + .HasColumnType("longtext") + .HasColumnName("source"); + + b.Property("Target") + .HasColumnType("longtext") + .HasColumnName("target"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_autotranslateusers"); + + b.HasAlternateKey("ChannelId", "UserId") + .HasName("ak_autotranslateusers_channelid_userid"); + + b.ToTable("autotranslateusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("PruneDays") + .HasColumnType("int") + .HasColumnName("prunedays"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_bantemplates"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_bantemplates_guildid"); + + b.ToTable("bantemplates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Balance") + .HasColumnType("bigint") + .HasColumnName("balance"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_bankusers"); + + b.HasIndex("UserId") + .IsUnique() + .HasDatabaseName("ix_bankusers_userid"); + + b.ToTable("bankusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_blacklist"); + + b.ToTable("blacklist", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubapplicants"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubapplicants_userid"); + + b.ToTable("clubapplicants", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("ClubId", "UserId") + .HasName("pk_clubbans"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_clubbans_userid"); + + b.ToTable("clubbans", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Description") + .HasColumnType("longtext") + .HasColumnName("description"); + + b.Property("ImageUrl") + .HasColumnType("longtext") + .HasColumnName("imageurl"); + + b.Property("Name") + .HasMaxLength(20) + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); + + b.Property("OwnerId") + .HasColumnType("int") + .HasColumnName("ownerid"); + + b.Property("Xp") + .HasColumnType("int") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_clubs"); + + b.HasIndex("Name") + .IsUnique() + .HasDatabaseName("ix_clubs_name"); + + b.HasIndex("OwnerId") + .IsUnique() + .HasDatabaseName("ix_clubs_ownerid"); + + b.ToTable("clubs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Mapping") + .HasColumnType("longtext") + .HasColumnName("mapping"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_commandalias"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandalias_guildconfigid"); + + b.ToTable("commandalias", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("CommandName") + .HasColumnType("longtext") + .HasColumnName("commandname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Seconds") + .HasColumnType("int") + .HasColumnName("seconds"); + + b.HasKey("Id") + .HasName("pk_commandcooldown"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_commandcooldown_guildconfigid"); + + b.ToTable("commandcooldown", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Extra") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("extra"); + + b.Property("Note") + .HasColumnType("longtext") + .HasColumnName("note"); + + b.Property("OtherId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("otherid") + .HasDefaultValueSql("NULL"); + + b.Property("Type") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_currencytransactions"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_currencytransactions_userid"); + + b.ToTable("currencytransactions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_delmsgoncmdchannel"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_delmsgoncmdchannel_guildconfigid"); + + b.ToTable("delmsgoncmdchannel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Command") + .HasColumnType("varchar(255)") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Perm") + .HasColumnType("bigint unsigned") + .HasColumnName("perm"); + + b.HasKey("Id") + .HasName("pk_discordpermoverrides"); + + b.HasIndex("GuildId", "Command") + .IsUnique() + .HasDatabaseName("ix_discordpermoverrides_guildid_command"); + + b.ToTable("discordpermoverrides", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AvatarId") + .HasColumnType("longtext") + .HasColumnName("avatarid"); + + b.Property("ClubId") + .HasColumnType("int") + .HasColumnName("clubid"); + + b.Property("CurrencyAmount") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("currencyamount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + + b.Property("IsClubAdmin") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("isclubadmin"); + + b.Property("NotifyOnLevelUp") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("notifyonlevelup"); + + b.Property("TotalXp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L) + .HasColumnName("totalxp"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_discorduser"); + + b.HasAlternateKey("UserId") + .HasName("ak_discorduser_userid"); + + b.HasIndex("ClubId") + .HasDatabaseName("ix_discorduser_clubid"); + + b.HasIndex("CurrencyAmount") + .HasDatabaseName("ix_discorduser_currencyamount"); + + b.HasIndex("TotalXp") + .HasDatabaseName("ix_discorduser_totalxp"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_discorduser_userid"); + + b.ToTable("discorduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("itemid"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_excludeditem"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_excludeditem_xpsettingsid"); + + b.ToTable("excludeditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_feedsub"); + + b.HasAlternateKey("GuildConfigId", "Url") + .HasName("ak_feedsub_guildconfigid_url"); + + b.ToTable("feedsub", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterchannelid_guildconfigid"); + + b.ToTable("filterchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterlinkschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterlinkschannelid_guildconfigid"); + + b.ToTable("filterlinkschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_filterwordschannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filterwordschannelid_guildconfigid"); + + b.ToTable("filterwordschannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Word") + .HasColumnType("longtext") + .HasColumnName("word"); + + b.HasKey("Id") + .HasName("pk_filteredword"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_filteredword_guildconfigid"); + + b.ToTable("filteredword", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_followedstream"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_followedstream_guildconfigid"); + + b.ToTable("followedstream", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.HasKey("Id") + .HasName("pk_gcchannelid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_gcchannelid_guildconfigid"); + + b.ToTable("gcchannelid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Bet") + .HasColumnType("decimal(65,30)") + .HasColumnName("bet"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("PaidOut") + .HasColumnType("decimal(65,30)") + .HasColumnName("paidout"); + + b.HasKey("Id") + .HasName("pk_gamblingstats"); + + b.HasIndex("Feature") + .IsUnique() + .HasDatabaseName("ix_gamblingstats_feature"); + + b.ToTable("gamblingstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("EndsAt") + .HasColumnType("datetime(6)") + .HasColumnName("endsat"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.HasKey("Id") + .HasName("pk_giveawaymodel"); + + b.ToTable("giveawaymodel", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("GiveawayId") + .HasColumnType("int") + .HasColumnName("giveawayid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_giveawayuser"); + + b.HasIndex("GiveawayId", "UserId") + .IsUnique() + .HasDatabaseName("ix_giveawayuser_giveawayid_userid"); + + b.ToTable("giveawayuser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Number") + .HasColumnType("int") + .HasColumnName("number"); + + b.HasKey("Id") + .HasName("pk_groupname"); + + b.HasIndex("GuildConfigId", "Number") + .IsUnique() + .HasDatabaseName("ix_groupname_guildconfigid_number"); + + b.ToTable("groupname", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AutoAssignRoleIds") + .HasColumnType("longtext") + .HasColumnName("autoassignroleids"); + + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeleteselfassignedrolemessages"); + + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + + b.Property("CleverbotEnabled") + .HasColumnType("tinyint(1)") + .HasColumnName("cleverbotenabled"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DeleteMessageOnCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("deletemessageoncommand"); + + b.Property("DeleteStreamOnlineMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("deletestreamonlinemessage"); + + b.Property("DisableGlobalExpressions") + .HasColumnType("tinyint(1)") + .HasColumnName("disableglobalexpressions"); + + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + + b.Property("ExclusiveSelfAssignedRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("exclusiveselfassignedroles"); + + b.Property("FilterInvites") + .HasColumnType("tinyint(1)") + .HasColumnName("filterinvites"); + + b.Property("FilterLinks") + .HasColumnType("tinyint(1)") + .HasColumnName("filterlinks"); + + b.Property("FilterWords") + .HasColumnType("tinyint(1)") + .HasColumnName("filterwords"); + + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") + .HasColumnName("gamevoicechannel"); + + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Locale") + .HasColumnType("longtext") + .HasColumnName("locale"); + + b.Property("MuteRoleName") + .HasColumnType("longtext") + .HasColumnName("muterolename"); + + b.Property("NotifyStreamOffline") + .HasColumnType("tinyint(1)") + .HasColumnName("notifystreamoffline"); + + b.Property("PermissionRole") + .HasColumnType("longtext") + .HasColumnName("permissionrole"); + + b.Property("Prefix") + .HasColumnType("longtext") + .HasColumnName("prefix"); + + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + + b.Property("StickyRoles") + .HasColumnType("tinyint(1)") + .HasColumnName("stickyroles"); + + b.Property("TimeZoneId") + .HasColumnType("longtext") + .HasColumnName("timezoneid"); + + b.Property("VerboseErrors") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true) + .HasColumnName("verboseerrors"); + + b.Property("VerbosePermissions") + .HasColumnType("tinyint(1)") + .HasColumnName("verbosepermissions"); + + b.Property("WarnExpireAction") + .HasColumnType("int") + .HasColumnName("warnexpireaction"); + + b.Property("WarnExpireHours") + .HasColumnType("int") + .HasColumnName("warnexpirehours"); + + b.Property("WarningsInitialized") + .HasColumnType("tinyint(1)") + .HasColumnName("warningsinitialized"); + + b.HasKey("Id") + .HasName("pk_guildconfigs"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_guildconfigs_guildid"); + + b.HasIndex("WarnExpireHours") + .HasDatabaseName("ix_guildconfigs_warnexpirehours"); + + b.ToTable("guildconfigs", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("LogItemId") + .HasColumnType("bigint unsigned") + .HasColumnName("logitemid"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredlogchannels"); + + b.HasIndex("LogSettingId", "LogItemId", "ItemType") + .IsUnique() + .HasDatabaseName("ix_ignoredlogchannels_logsettingid_logitemid_itemtype"); + + b.ToTable("ignoredlogchannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LogSettingId") + .HasColumnType("int") + .HasColumnName("logsettingid"); + + b.HasKey("Id") + .HasName("pk_ignoredvoicepresencechannels"); + + b.HasIndex("LogSettingId") + .HasDatabaseName("ix_ignoredvoicepresencechannels_logsettingid"); + + b.ToTable("ignoredvoicepresencechannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_imageonlychannels"); + + b.HasIndex("ChannelId") + .IsUnique() + .HasDatabaseName("ix_imageonlychannels_channelid"); + + b.ToTable("imageonlychannels", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelcreatedid"); + + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channeldestroyedid"); + + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelupdatedid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") + .HasColumnName("logotherid"); + + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("loguserpresenceid"); + + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresenceid"); + + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") + .HasColumnName("logvoicepresencettsid"); + + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") + .HasColumnName("logwarnsid"); + + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messagedeletedid"); + + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageupdatedid"); + + b.Property("ThreadCreatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("threadcreatedid"); + + b.Property("ThreadDeletedId") + .HasColumnType("bigint unsigned") + .HasColumnName("threaddeletedid"); + + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userbannedid"); + + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userjoinedid"); + + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") + .HasColumnName("userleftid"); + + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") + .HasColumnName("usermutedid"); + + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userunbannedid"); + + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") + .HasColumnName("userupdatedid"); + + b.HasKey("Id") + .HasName("pk_logsettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_logsettings_guildid"); + + b.ToTable("logsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AutoDisconnect") + .HasColumnType("tinyint(1)") + .HasColumnName("autodisconnect"); + + b.Property("AutoPlay") + .HasColumnType("tinyint(1)") + .HasColumnName("autoplay"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("musicchannelid"); + + b.Property("PlayerRepeat") + .HasColumnType("int") + .HasColumnName("playerrepeat"); + + b.Property("QualityPreset") + .HasColumnType("int") + .HasColumnName("qualitypreset"); + + b.Property("Volume") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(100) + .HasColumnName("volume"); + + b.HasKey("Id") + .HasName("pk_musicplayersettings"); + + b.HasIndex("GuildId") + .IsUnique() + .HasDatabaseName("ix_musicplayersettings_guildid"); + + b.ToTable("musicplayersettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Author") + .HasColumnType("longtext") + .HasColumnName("author"); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.HasKey("Id") + .HasName("pk_musicplaylists"); + + b.ToTable("musicplaylists", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_muteduserid"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_muteduserid_guildconfigid"); + + b.ToTable("muteduserid", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); + + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); + + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); + + b.HasKey("Id") + .HasName("pk_expressions"); + + b.ToTable("expressions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => + { + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); + + b.Property("AmountCents") + .HasColumnType("int") + .HasColumnName("amountcents"); + + b.Property("LastCharge") + .HasColumnType("datetime(6)") + .HasColumnName("lastcharge"); + + b.Property("UniquePlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("uniqueplatformuserid"); + + b.Property("ValidThru") + .HasColumnType("datetime(6)") + .HasColumnName("validthru"); + + b.HasKey("UserId") + .HasName("pk_patrons"); + + b.HasIndex("UniquePlatformUserId") + .IsUnique() + .HasDatabaseName("ix_patrons_uniqueplatformuserid"); + + b.ToTable("patrons", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("IsCustomCommand") + .HasColumnType("tinyint(1)") + .HasColumnName("iscustomcommand"); + + b.Property("PrimaryTarget") + .HasColumnType("int") + .HasColumnName("primarytarget"); + + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") + .HasColumnName("primarytargetid"); + + b.Property("SecondaryTarget") + .HasColumnType("int") + .HasColumnName("secondarytarget"); + + b.Property("SecondaryTargetName") + .HasColumnType("longtext") + .HasColumnName("secondarytargetname"); + + b.Property("State") + .HasColumnType("tinyint(1)") + .HasColumnName("state"); + + b.HasKey("Id") + .HasName("pk_permissions"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_permissions_guildconfigid"); + + b.ToTable("permissions", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Amount") + .HasColumnType("bigint") + .HasColumnName("amount"); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Password") + .HasColumnType("longtext") + .HasColumnName("password"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_plantedcurrency"); + + b.HasIndex("ChannelId") + .HasDatabaseName("ix_plantedcurrency_channelid"); + + b.HasIndex("MessageId") + .IsUnique() + .HasDatabaseName("ix_plantedcurrency_messageid"); + + b.ToTable("plantedcurrency", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MusicPlaylistId") + .HasColumnType("int") + .HasColumnName("musicplaylistid"); + + b.Property("Provider") + .HasColumnType("longtext") + .HasColumnName("provider"); + + b.Property("ProviderType") + .HasColumnType("int") + .HasColumnName("providertype"); + + b.Property("Query") + .HasColumnType("longtext") + .HasColumnName("query"); + + b.Property("Title") + .HasColumnType("longtext") + .HasColumnName("title"); + + b.Property("Uri") + .HasColumnType("longtext") + .HasColumnName("uri"); + + b.HasKey("Id") + .HasName("pk_playlistsong"); + + b.HasIndex("MusicPlaylistId") + .HasDatabaseName("ix_playlistsong_musicplaylistid"); + + b.ToTable("playlistsong", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("AuthorName") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("authorname"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Keyword") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("keyword"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_quotes"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_quotes_guildid"); + + b.HasIndex("Keyword") + .HasDatabaseName("ix_quotes_keyword"); + + b.ToTable("quotes", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Emote") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("emote"); + + b.Property("Group") + .HasColumnType("int") + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelReq") + .HasColumnType("int") + .HasColumnName("levelreq"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_reactionroles"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_reactionroles_guildid"); + + b.HasIndex("MessageId", "Emote") + .IsUnique() + .HasDatabaseName("ix_reactionroles_messageid_emote"); + + b.ToTable("reactionroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsPrivate") + .HasColumnType("tinyint(1)") + .HasColumnName("isprivate"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("ServerId") + .HasColumnType("bigint unsigned") + .HasColumnName("serverid"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("When") + .HasColumnType("datetime(6)") + .HasColumnName("when"); + + b.HasKey("Id") + .HasName("pk_reminders"); + + b.HasIndex("When") + .HasDatabaseName("ix_reminders_when"); + + b.ToTable("reminders", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Interval") + .HasColumnType("time(6)") + .HasColumnName("interval"); + + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("lastmessageid"); + + b.Property("Message") + .HasColumnType("longtext") + .HasColumnName("message"); + + b.Property("NoRedundant") + .HasColumnType("tinyint(1)") + .HasColumnName("noredundant"); + + b.Property("StartTimeOfDay") + .HasColumnType("time(6)") + .HasColumnName("starttimeofday"); + + b.HasKey("Id") + .HasName("pk_repeaters"); + + b.ToTable("repeaters", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AmountRewardedThisMonth") + .HasColumnType("bigint") + .HasColumnName("amountrewardedthismonth"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("LastReward") + .HasColumnType("datetime(6)") + .HasColumnName("lastreward"); + + b.Property("PlatformUserId") + .HasColumnType("varchar(255)") + .HasColumnName("platformuserid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_rewardedusers"); + + b.HasIndex("PlatformUserId") + .IsUnique() + .HasDatabaseName("ix_rewardedusers_platformuserid"); + + b.ToTable("rewardedusers", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Status") + .HasColumnType("longtext") + .HasColumnName("status"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_rotatingstatus"); + + b.ToTable("rotatingstatus", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("group"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("LevelRequirement") + .HasColumnType("int") + .HasColumnName("levelrequirement"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_selfassignableroles"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique() + .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); + + b.ToTable("selfassignableroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AuthorId") + .HasColumnType("bigint unsigned") + .HasColumnName("authorid"); + + b.Property("Command") + .HasColumnType("longtext") + .HasColumnName("command"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Index") + .HasColumnType("int") + .HasColumnName("index"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Price") + .HasColumnType("int") + .HasColumnName("price"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("RoleName") + .HasColumnType("longtext") + .HasColumnName("rolename"); + + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") + .HasColumnName("rolerequirement"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_shopentry"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_shopentry_guildconfigid"); + + b.ToTable("shopentry", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ShopEntryId") + .HasColumnType("int") + .HasColumnName("shopentryid"); + + b.Property("Text") + .HasColumnType("longtext") + .HasColumnName("text"); + + b.HasKey("Id") + .HasName("pk_shopentryitem"); + + b.HasIndex("ShopEntryId") + .HasDatabaseName("ix_shopentryitem_shopentryid"); + + b.ToTable("shopentryitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoredrole"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); + + b.ToTable("slowmodeignoredrole", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_slowmodeignoreduser"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); + + b.ToTable("slowmodeignoreduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("RoleIds") + .HasColumnType("longtext") + .HasColumnName("roleids"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_stickyroles"); + + b.HasIndex("GuildId", "UserId") + .IsUnique() + .HasDatabaseName("ix_stickyroles_guildid_userid"); + + b.ToTable("stickyroles", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("channelid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("MessageId") + .HasColumnType("bigint unsigned") + .HasColumnName("messageid"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("Type") + .HasColumnType("int") + .HasColumnName("type"); + + b.HasKey("Id") + .HasName("pk_streamonlinemessages"); + + b.ToTable("streamonlinemessages", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamroleblacklisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); + + b.ToTable("streamroleblacklisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("addroleid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Enabled") + .HasColumnType("tinyint(1)") + .HasColumnName("enabled"); + + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("fromroleid"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Keyword") + .HasColumnType("longtext") + .HasColumnName("keyword"); + + b.HasKey("Id") + .HasName("pk_streamrolesettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_streamrolesettings_guildconfigid"); + + b.ToTable("streamrolesettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("StreamRoleSettingsId") + .HasColumnType("int") + .HasColumnName("streamrolesettingsid"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Username") + .HasColumnType("longtext") + .HasColumnName("username"); + + b.HasKey("Id") + .HasName("pk_streamrolewhitelisteduser"); + + b.HasIndex("StreamRoleSettingsId") + .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); + + b.ToTable("streamrolewhitelisteduser", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("ArchiveId") + .HasColumnType("int") + .HasColumnName("archiveid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsDone") + .HasColumnType("tinyint(1)") + .HasColumnName("isdone"); + + b.Property("Todo") + .HasColumnType("longtext") + .HasColumnName("todo"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_todos"); + + b.HasIndex("ArchiveId") + .HasDatabaseName("ix_todos_archiveid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_todos_userid"); + + b.ToTable("todos", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unbantimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unbantimer_guildconfigid"); + + b.ToTable("unbantimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("UnmuteAt") + .HasColumnType("datetime(6)") + .HasColumnName("unmuteat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unmutetimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unmutetimer_guildconfigid"); + + b.ToTable("unmutetimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("UnbanAt") + .HasColumnType("datetime(6)") + .HasColumnName("unbanat"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_unroletimer"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_unroletimer_guildconfigid"); + + b.ToTable("unroletimer", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AwardedXp") + .HasColumnType("bigint") + .HasColumnName("awardedxp"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("NotifyOnLevelUp") + .HasColumnType("int") + .HasColumnName("notifyonlevelup"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Xp") + .HasColumnType("bigint") + .HasColumnName("xp"); + + b.HasKey("Id") + .HasName("pk_userxpstats"); + + b.HasIndex("AwardedXp") + .HasDatabaseName("ix_userxpstats_awardedxp"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_userxpstats_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_userxpstats_userid"); + + b.HasIndex("Xp") + .HasDatabaseName("ix_userxpstats_xp"); + + b.HasIndex("UserId", "GuildId") + .IsUnique() + .HasDatabaseName("ix_userxpstats_userid_guildid"); + + b.ToTable("userxpstats", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("voicechannelid"); + + b.HasKey("Id") + .HasName("pk_vcroleinfo"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_vcroleinfo_guildconfigid"); + + b.ToTable("vcroleinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("AffinityId") + .HasColumnType("int") + .HasColumnName("affinityid"); + + b.Property("ClaimerId") + .HasColumnType("int") + .HasColumnName("claimerid"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Price") + .HasColumnType("bigint") + .HasColumnName("price"); + + b.Property("WaifuId") + .HasColumnType("int") + .HasColumnName("waifuid"); + + b.HasKey("Id") + .HasName("pk_waifuinfo"); + + b.HasIndex("AffinityId") + .HasDatabaseName("ix_waifuinfo_affinityid"); + + b.HasIndex("ClaimerId") + .HasDatabaseName("ix_waifuinfo_claimerid"); + + b.HasIndex("Price") + .HasDatabaseName("ix_waifuinfo_price"); + + b.HasIndex("WaifuId") + .IsUnique() + .HasDatabaseName("ix_waifuinfo_waifuid"); + + b.ToTable("waifuinfo", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("ItemEmoji") + .HasColumnType("longtext") + .HasColumnName("itememoji"); + + b.Property("Name") + .HasColumnType("longtext") + .HasColumnName("name"); + + b.Property("WaifuInfoId") + .HasColumnType("int") + .HasColumnName("waifuinfoid"); + + b.HasKey("Id") + .HasName("pk_waifuitem"); + + b.HasIndex("WaifuInfoId") + .HasDatabaseName("ix_waifuitem_waifuinfoid"); + + b.ToTable("waifuitem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("NewId") + .HasColumnType("int") + .HasColumnName("newid"); + + b.Property("OldId") + .HasColumnType("int") + .HasColumnName("oldid"); + + b.Property("UpdateType") + .HasColumnType("int") + .HasColumnName("updatetype"); + + b.Property("UserId") + .HasColumnType("int") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_waifuupdates"); + + b.HasIndex("NewId") + .HasDatabaseName("ix_waifuupdates_newid"); + + b.HasIndex("OldId") + .HasDatabaseName("ix_waifuupdates_oldid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_waifuupdates_userid"); + + b.ToTable("waifuupdates", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Forgiven") + .HasColumnType("tinyint(1)") + .HasColumnName("forgiven"); + + b.Property("ForgivenBy") + .HasColumnType("longtext") + .HasColumnName("forgivenby"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Moderator") + .HasColumnType("longtext") + .HasColumnName("moderator"); + + b.Property("Reason") + .HasColumnType("longtext") + .HasColumnName("reason"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.Property("Weight") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(1L) + .HasColumnName("weight"); + + b.HasKey("Id") + .HasName("pk_warnings"); + + b.HasIndex("DateAdded") + .HasDatabaseName("ix_warnings_dateadded"); + + b.HasIndex("GuildId") + .HasDatabaseName("ix_warnings_guildid"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_warnings_userid"); + + b.ToTable("warnings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Count") + .HasColumnType("int") + .HasColumnName("count"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("Punishment") + .HasColumnType("int") + .HasColumnName("punishment"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("Time") + .HasColumnType("int") + .HasColumnName("time"); + + b.HasKey("Id") + .HasName("pk_warningpunishment"); + + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); + + b.ToTable("warningpunishment", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("Amount") + .HasColumnType("int") + .HasColumnName("amount"); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xpcurrencyreward"); + + b.HasIndex("XpSettingsId") + .HasDatabaseName("ix_xpcurrencyreward_xpsettingsid"); + + b.ToTable("xpcurrencyreward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.Property("Remove") + .HasColumnType("tinyint(1)") + .HasColumnName("remove"); + + b.Property("RoleId") + .HasColumnType("bigint unsigned") + .HasColumnName("roleid"); + + b.Property("XpSettingsId") + .HasColumnType("int") + .HasColumnName("xpsettingsid"); + + b.HasKey("Id") + .HasName("pk_xprolereward"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique() + .HasDatabaseName("ix_xprolereward_xpsettingsid_level"); + + b.ToTable("xprolereward", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); + + b.Property("ServerExcluded") + .HasColumnType("tinyint(1)") + .HasColumnName("serverexcluded"); + + b.HasKey("Id") + .HasName("pk_xpsettings"); + + b.HasIndex("GuildConfigId") + .IsUnique() + .HasDatabaseName("ix_xpsettings_guildconfigid"); + + b.ToTable("xpsettings", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); + + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); + + b.Property("IsUsing") + .HasColumnType("tinyint(1)") + .HasColumnName("isusing"); + + b.Property("ItemKey") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("itemkey"); + + b.Property("ItemType") + .HasColumnType("int") + .HasColumnName("itemtype"); + + b.Property("UserId") + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + b.HasKey("Id") + .HasName("pk_xpshopowneditem"); + + b.HasIndex("UserId", "ItemType", "ItemKey") + .IsUnique() + .HasDatabaseName("ix_xpshopowneditem_userid_itemtype_itemkey"); + + b.ToTable("xpshopowneditem", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithOne("AntiAltSetting") + .HasForeignKey("EllieBot.Db.Models.AntiAltSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antialtsetting_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("EllieBot.Db.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antiraidsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => + { + b.HasOne("EllieBot.Db.Models.AntiSpamSetting", null) + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId") + .HasConstraintName("fk_antispamignore_antispamsetting_antispamsettingid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("EllieBot.Db.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_antispamsetting_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => + { + b.HasOne("EllieBot.Db.Models.AutoTranslateChannel", "Channel") + .WithMany("Users") + .HasForeignKey("ChannelId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_autotranslateusers_autotranslatechannels_channelid"); + + b.Navigation("Channel"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubapplicants_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_clubs_clubid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_clubbans_discorduser_userid"); + + b.Navigation("Club"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.SetNull) + .HasConstraintName("fk_clubs_discorduser_ownerid"); + + b.Navigation("Owner"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandalias_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_commandcooldown_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("DelMsgOnCmdChannels") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_delmsgoncmdchannel_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => + { + b.HasOne("EllieBot.Db.Models.ClubInfo", "Club") + .WithMany("Members") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.NoAction) + .HasConstraintName("fk_discorduser_clubs_clubid"); + + b.Navigation("Club"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => + { + b.HasOne("EllieBot.Db.Models.XpSettings", null) + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId") + .HasConstraintName("fk_excludeditem_xpsettings_xpsettingsid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_feedsub_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterchannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterLinksChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterlinkschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filterwordschannelid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_filteredword_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_followedstream_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_gcchannelid_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => + { + b.HasOne("EllieBot.Db.Models.GiveawayModel", null) + .WithMany("Participants") + .HasForeignKey("GiveawayId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_giveawayuser_giveawaymodel_giveawayid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithMany("SelfAssignableRoleGroupNames") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_groupname_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => + { + b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") + .WithMany("LogIgnores") + .HasForeignKey("LogSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_ignoredlogchannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId") + .HasConstraintName("fk_ignoredvoicepresencechannels_logsettings_logsettingid"); + + b.Navigation("LogSetting"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_muteduserid_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("Permissions") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_permissions_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => + { + b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_playlistsong_musicplaylists_musicplaylistid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_shopentry_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => + { + b.HasOne("EllieBot.Db.Models.ShopEntry", null) + .WithMany("Items") + .HasForeignKey("ShopEntryId") + .HasConstraintName("fk_shopentryitem_shopentry_shopentryid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoredrole_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_slowmodeignoreduser_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", null) + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_streamrolesettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("EllieBot.Db.Models.StreamRoleSettings", null) + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId") + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => + { + b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) + .WithMany("Items") + .HasForeignKey("ArchiveId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_todos_todosarchive_archiveid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnbanTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unbantimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unmutetimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("UnroleTimer") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_unroletimer_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_vcroleinfo_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId") + .HasConstraintName("fk_waifuinfo_discorduser_affinityid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId") + .HasConstraintName("fk_waifuinfo_discorduser_claimerid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuinfo_discorduser_waifuid"); + + b.Navigation("Affinity"); + + b.Navigation("Claimer"); + + b.Navigation("Waifu"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => + { + b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId") + .HasConstraintName("fk_waifuitem_waifuinfo_waifuinfoid"); + + b.Navigation("WaifuInfo"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => + { + b.HasOne("EllieBot.Db.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId") + .HasConstraintName("fk_waifuupdates_discorduser_newid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId") + .HasConstraintName("fk_waifuupdates_discorduser_oldid"); + + b.HasOne("EllieBot.Db.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_waifuupdates_discorduser_userid"); + + b.Navigation("New"); + + b.Navigation("Old"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("CurrencyRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpcurrencyreward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => + { + b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xprolereward_xpsettings_xpsettingsid"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_xpsettings_guildconfigs_guildconfigid"); + + b.Navigation("GuildConfig"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => + { + b.Navigation("IgnoredChannels"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => + { + b.Navigation("Users"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => + { + b.Navigation("Applicants"); + + b.Navigation("Bans"); + + b.Navigation("Members"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => + { + b.Navigation("Participants"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => + { + b.Navigation("AntiAltSetting"); + + b.Navigation("AntiRaidSetting"); + + b.Navigation("AntiSpamSetting"); + + b.Navigation("CommandAliases"); + + b.Navigation("CommandCooldowns"); + + b.Navigation("DelMsgOnCmdChannels"); + + b.Navigation("FeedSubs"); + + b.Navigation("FilterInvitesChannelIds"); + + b.Navigation("FilterLinksChannelIds"); + + b.Navigation("FilterWordsChannelIds"); + + b.Navigation("FilteredWords"); + + b.Navigation("FollowedStreams"); + + b.Navigation("GenerateCurrencyChannelIds"); + + b.Navigation("MutedUsers"); + + b.Navigation("Permissions"); + + b.Navigation("SelfAssignableRoleGroupNames"); + + b.Navigation("ShopEntries"); + + b.Navigation("SlowmodeIgnoredRoles"); + + b.Navigation("SlowmodeIgnoredUsers"); + + b.Navigation("StreamRole"); + + b.Navigation("UnbanTimer"); + + b.Navigation("UnmuteTimers"); + + b.Navigation("UnroleTimer"); + + b.Navigation("VcRoleInfos"); + + b.Navigation("WarnPunishments"); + + b.Navigation("XpSettings"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => + { + b.Navigation("LogIgnores"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => + { + b.Navigation("Songs"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => + { + b.Navigation("Blacklist"); + + b.Navigation("Whitelist"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => + { + b.Navigation("CurrencyRewards"); + + b.Navigation("ExclusionList"); + + b.Navigation("RoleRewards"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/EllieBot/Migrations/Mysql/20240502233216_v5.cs b/src/EllieBot/Migrations/Mysql/20240502233216_v5.cs new file mode 100644 index 0000000..4ed5d52 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20240502233216_v5.cs @@ -0,0 +1,1615 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + /// + public partial class v5 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "nsfwblacklistedtags"); + + migrationBuilder.DropTable( + name: "pollanswer"); + + migrationBuilder.DropTable( + name: "pollvote"); + + migrationBuilder.DropTable( + name: "poll"); + + migrationBuilder.DropUniqueConstraint( + name: "ak_clubs_name", + table: "clubs"); + + migrationBuilder.AlterColumn( + name: "id", + table: "xpshopowneditem", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "xpsettings", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "xprolereward", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "xpcurrencyreward", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "warnings", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "warningpunishment", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "waifuupdates", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "waifuitem", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "waifuinfo", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "vcroleinfo", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "userxpstats", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "unroletimer", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "unmutetimer", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "unbantimer", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "streamrolewhitelisteduser", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "streamrolesettings", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "streamroleblacklisteduser", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "streamonlinemessages", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "slowmodeignoreduser", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "slowmodeignoredrole", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "shopentryitem", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "shopentry", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AddColumn( + name: "command", + table: "shopentry", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "id", + table: "selfassignableroles", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "rotatingstatus", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "rewardedusers", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "repeaters", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "reminders", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AddColumn( + name: "type", + table: "reminders", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AlterColumn( + name: "id", + table: "reactionroles", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "quotes", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "playlistsong", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "plantedcurrency", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "permissions", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "userid", + table: "patrons", + type: "bigint unsigned", + nullable: false, + oldClrType: typeof(ulong), + oldType: "bigint unsigned") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "muteduserid", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "musicplaylists", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "musicplayersettings", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "logsettings", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "imageonlychannels", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "ignoredvoicepresencechannels", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "ignoredlogchannels", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "guildconfigs", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AddColumn( + name: "stickyroles", + table: "guildconfigs", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + + migrationBuilder.AlterColumn( + name: "id", + table: "groupname", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "gcchannelid", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "gamblingstats", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "followedstream", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "filterwordschannelid", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "filterlinkschannelid", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "filteredword", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "filterchannelid", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "feedsub", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "expressions", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "excludeditem", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "discorduser", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "discordpermoverrides", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "delmsgoncmdchannel", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "currencytransactions", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "commandcooldown", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "commandalias", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "name", + table: "clubs", + type: "varchar(20)", + maxLength: 20, + nullable: true, + collation: "utf8mb4_bin", + oldClrType: typeof(string), + oldType: "varchar(20)", + oldMaxLength: 20, + oldCollation: "utf8mb4_bin") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "id", + table: "clubs", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "blacklist", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "bantemplates", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "bankusers", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "autotranslateusers", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "autotranslatechannels", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "autopublishchannel", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "autocommands", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "antispamsetting", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "antispamignore", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "antiraidsetting", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "antialtsetting", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.CreateTable( + name: "giveawaymodel", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + messageid = table.Column(type: "bigint unsigned", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: false), + message = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + endsat = table.Column(type: "datetime(6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_giveawaymodel", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "stickyroles", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + guildid = table.Column(type: "bigint unsigned", nullable: false), + roleids = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + userid = table.Column(type: "bigint unsigned", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_stickyroles", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "todosarchive", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + name = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("pk_todosarchive", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "giveawayuser", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + giveawayid = table.Column(type: "int", nullable: false), + userid = table.Column(type: "bigint unsigned", nullable: false), + name = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("pk_giveawayuser", x => x.id); + table.ForeignKey( + name: "fk_giveawayuser_giveawaymodel_giveawayid", + column: x => x.giveawayid, + principalTable: "giveawaymodel", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "todos", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + userid = table.Column(type: "bigint unsigned", nullable: false), + todo = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + dateadded = table.Column(type: "datetime(6)", nullable: false), + isdone = table.Column(type: "tinyint(1)", nullable: false), + archiveid = table.Column(type: "int", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_todos", x => x.id); + table.ForeignKey( + name: "fk_todos_todosarchive_archiveid", + column: x => x.archiveid, + principalTable: "todosarchive", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "ix_clubs_name", + table: "clubs", + column: "name", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_giveawayuser_giveawayid_userid", + table: "giveawayuser", + columns: new[] { "giveawayid", "userid" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_stickyroles_guildid_userid", + table: "stickyroles", + columns: new[] { "guildid", "userid" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_todos_archiveid", + table: "todos", + column: "archiveid"); + + migrationBuilder.CreateIndex( + name: "ix_todos_userid", + table: "todos", + column: "userid"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "giveawayuser"); + + migrationBuilder.DropTable( + name: "stickyroles"); + + migrationBuilder.DropTable( + name: "todos"); + + migrationBuilder.DropTable( + name: "giveawaymodel"); + + migrationBuilder.DropTable( + name: "todosarchive"); + + migrationBuilder.DropIndex( + name: "ix_clubs_name", + table: "clubs"); + + migrationBuilder.DropColumn( + name: "command", + table: "shopentry"); + + migrationBuilder.DropColumn( + name: "type", + table: "reminders"); + + migrationBuilder.DropColumn( + name: "stickyroles", + table: "guildconfigs"); + + migrationBuilder.AlterColumn( + name: "id", + table: "xpshopowneditem", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "xpsettings", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "xprolereward", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "xpcurrencyreward", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "warnings", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "warningpunishment", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "waifuupdates", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "waifuitem", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "waifuinfo", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "vcroleinfo", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "userxpstats", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "unroletimer", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "unmutetimer", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "unbantimer", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "streamrolewhitelisteduser", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "streamrolesettings", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "streamroleblacklisteduser", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "streamonlinemessages", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "slowmodeignoreduser", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "slowmodeignoredrole", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "shopentryitem", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "shopentry", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "selfassignableroles", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "rotatingstatus", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "rewardedusers", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "repeaters", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "reminders", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "reactionroles", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "quotes", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "playlistsong", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "plantedcurrency", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "permissions", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "userid", + table: "patrons", + type: "bigint unsigned", + nullable: false, + oldClrType: typeof(ulong), + oldType: "bigint unsigned") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "muteduserid", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "musicplaylists", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "musicplayersettings", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "logsettings", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "imageonlychannels", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "ignoredvoicepresencechannels", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "ignoredlogchannels", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "guildconfigs", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "groupname", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "gcchannelid", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "gamblingstats", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "followedstream", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "filterwordschannelid", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "filterlinkschannelid", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "filteredword", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "filterchannelid", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "feedsub", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "expressions", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "excludeditem", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "discorduser", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "discordpermoverrides", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "delmsgoncmdchannel", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "currencytransactions", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "commandcooldown", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "commandalias", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.UpdateData( + table: "clubs", + keyColumn: "name", + keyValue: null, + column: "name", + value: ""); + + migrationBuilder.AlterColumn( + name: "name", + table: "clubs", + type: "varchar(20)", + maxLength: 20, + nullable: false, + collation: "utf8mb4_bin", + oldClrType: typeof(string), + oldType: "varchar(20)", + oldMaxLength: 20, + oldNullable: true, + oldCollation: "utf8mb4_bin") + .Annotation("MySql:CharSet", "utf8mb4") + .OldAnnotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AlterColumn( + name: "id", + table: "clubs", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "blacklist", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "bantemplates", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "bankusers", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "autotranslateusers", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "autotranslatechannels", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "autopublishchannel", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "autocommands", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "antispamsetting", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "antispamignore", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "antiraidsetting", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AlterColumn( + name: "id", + table: "antialtsetting", + type: "int", + nullable: false, + oldClrType: typeof(int), + oldType: "int") + .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); + + migrationBuilder.AddUniqueConstraint( + name: "ak_clubs_name", + table: "clubs", + column: "name"); + + migrationBuilder.CreateTable( + name: "nsfwblacklistedtags", + columns: table => new + { + id = table.Column(type: "int", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true), + guildid = table.Column(type: "bigint unsigned", nullable: false), + tag = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("pk_nsfwblacklistedtags", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "poll", + columns: table => new + { + id = table.Column(type: "int", nullable: false), + channelid = table.Column(type: "bigint unsigned", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true), + guildid = table.Column(type: "bigint unsigned", nullable: false), + question = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("pk_poll", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "pollanswer", + columns: table => new + { + id = table.Column(type: "int", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true), + index = table.Column(type: "int", nullable: false), + pollid = table.Column(type: "int", nullable: true), + text = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("pk_pollanswer", x => x.id); + table.ForeignKey( + name: "fk_pollanswer_poll_pollid", + column: x => x.pollid, + principalTable: "poll", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "pollvote", + columns: table => new + { + id = table.Column(type: "int", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true), + pollid = table.Column(type: "int", nullable: true), + userid = table.Column(type: "bigint unsigned", nullable: false), + voteindex = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_pollvote", x => x.id); + table.ForeignKey( + name: "fk_pollvote_poll_pollid", + column: x => x.pollid, + principalTable: "poll", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "ix_nsfwblacklistedtags_guildid", + table: "nsfwblacklistedtags", + column: "guildid"); + + migrationBuilder.CreateIndex( + name: "ix_poll_guildid", + table: "poll", + column: "guildid", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_pollanswer_pollid", + table: "pollanswer", + column: "pollid"); + + migrationBuilder.CreateIndex( + name: "ix_pollvote_pollid", + table: "pollvote", + column: "pollid"); + } + } +} diff --git a/src/EllieBot/Migrations/PostgreSql/20241028033704_ncanvas.Designer.cs b/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.Designer.cs similarity index 71% rename from src/EllieBot/Migrations/PostgreSql/20241028033704_ncanvas.Designer.cs rename to src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.Designer.cs index 995fd46..7c2b93b 100644 --- a/src/EllieBot/Migrations/PostgreSql/20241028033704_ncanvas.Designer.cs +++ b/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.Designer.cs @@ -1,57 +1,57 @@ -// +// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using EllieBot.Db; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable -namespace EllieBot.Migrations.PostgreSql +namespace EllieBot.Migrations.Mysql { - [DbContext(typeof(PostgreSqlContext))] - [Migration("20241028033704_ncanvas")] - partial class ncanvas + [DbContext(typeof(MysqlContext))] + [Migration("20240518221440_guidlconfig-cleanup")] + partial class guidlconfigcleanup { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 63); + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Action") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("action"); b.Property("ActionDurationMinutes") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("actiondurationminutes"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("MinAge") - .HasColumnType("interval") + .HasColumnType("time(6)") .HasColumnName("minage"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -68,33 +68,33 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Action") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("action"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("PunishDuration") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("punishduration"); b.Property("Seconds") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("seconds"); b.Property("UserThreshold") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userthreshold"); b.HasKey("Id") @@ -111,21 +111,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AntiSpamSettingId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("antispamsettingid"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.HasKey("Id") @@ -141,33 +141,33 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Action") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("action"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("MessageThreshold") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("messagethreshold"); b.Property("MuteTime") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("mutetime"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -184,17 +184,17 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -207,45 +207,45 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("ChannelName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("channelname"); b.Property("CommandText") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("commandtext"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("GuildName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("guildname"); b.Property("Interval") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("interval"); - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("voicechannelid"); b.Property("VoiceChannelName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("voicechannelname"); b.HasKey("Id") @@ -258,21 +258,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.HasKey("Id") @@ -289,25 +289,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AutoDelete") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodelete"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.HasKey("Id") @@ -327,29 +327,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("ChannelId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Source") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("source"); b.Property("Target") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("target"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -365,25 +365,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("PruneDays") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("prunedays"); b.Property("Text") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("text"); b.HasKey("Id") @@ -400,21 +400,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Balance") .HasColumnType("bigint") .HasColumnName("balance"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -431,21 +431,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("numeric(20,0)") + b.Property("ItemId") + .HasColumnType("bigint unsigned") .HasColumnName("itemid"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -457,11 +457,11 @@ namespace EllieBot.Migrations.PostgreSql modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => { b.Property("ClubId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("clubid"); b.Property("UserId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userid"); b.HasKey("ClubId", "UserId") @@ -476,11 +476,11 @@ namespace EllieBot.Migrations.PostgreSql modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => { b.Property("ClubId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("clubid"); b.Property("UserId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userid"); b.HasKey("ClubId", "UserId") @@ -496,34 +496,35 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Description") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("description"); b.Property("ImageUrl") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("imageurl"); b.Property("Name") .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); b.Property("OwnerId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("ownerid"); b.Property("Xp") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xp"); b.HasKey("Id") @@ -544,25 +545,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Mapping") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("mapping"); b.Property("Trigger") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("trigger"); b.HasKey("Id") @@ -578,25 +579,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("CommandName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("commandname"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Seconds") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("seconds"); b.HasKey("Id") @@ -612,41 +613,41 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Amount") .HasColumnType("bigint") .HasColumnName("amount"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Extra") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("extra"); b.Property("Note") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("note"); - b.Property("OtherId") + b.Property("OtherId") .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") + .HasColumnType("bigint unsigned") .HasColumnName("otherid") .HasDefaultValueSql("NULL"); b.Property("Type") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -662,25 +663,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("State") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("state"); b.HasKey("Id") @@ -696,25 +697,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Command") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("command"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("Perm") - .HasColumnType("numeric(20,0)") + b.Property("Perm") + .HasColumnType("bigint unsigned") .HasColumnName("perm"); b.HasKey("Id") @@ -731,17 +732,17 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AvatarId") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("avatarid"); b.Property("ClubId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("clubid"); b.Property("CurrencyAmount") @@ -751,22 +752,22 @@ namespace EllieBot.Migrations.PostgreSql .HasColumnName("currencyamount"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Discriminator") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("discriminator"); b.Property("IsClubAdmin") .ValueGeneratedOnAdd() - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasDefaultValue(false) .HasColumnName("isclubadmin"); b.Property("NotifyOnLevelUp") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasDefaultValue(0) .HasColumnName("notifyonlevelup"); @@ -776,12 +777,12 @@ namespace EllieBot.Migrations.PostgreSql .HasDefaultValue(0L) .HasColumnName("totalxp"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -802,9 +803,6 @@ namespace EllieBot.Migrations.PostgreSql b.HasIndex("UserId") .HasDatabaseName("ix_discorduser_userid"); - b.HasIndex("Username") - .HasDatabaseName("ix_discorduser_username"); - b.ToTable("discorduser", (string)null); }); @@ -812,25 +810,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("numeric(20,0)") + b.Property("ItemId") + .HasColumnType("bigint unsigned") .HasColumnName("itemid"); b.Property("ItemType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("itemtype"); b.Property("XpSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xpsettingsid"); b.HasKey("Id") @@ -846,30 +844,30 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); b.Property("Url") .IsRequired() - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("url"); b.HasKey("Id") @@ -885,21 +883,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -915,21 +913,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -945,21 +943,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -975,21 +973,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Word") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("word"); b.HasKey("Id") @@ -1005,37 +1003,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -1051,21 +1049,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -1081,25 +1079,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Bet") - .HasColumnType("numeric") + .HasColumnType("decimal(65,30)") .HasColumnName("bet"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Feature") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("feature"); b.Property("PaidOut") - .HasColumnType("numeric") + .HasColumnType("decimal(65,30)") .HasColumnName("paidout"); b.HasKey("Id") @@ -1116,29 +1114,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("EndsAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("endsat"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); b.HasKey("Id") @@ -1151,21 +1149,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("GiveawayId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("giveawayid"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -1182,25 +1180,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("Number") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("number"); b.HasKey("Id") @@ -1217,111 +1215,167 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AutoAssignRoleIds") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("autoassignroleids"); + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodeleteselfassignedrolemessages"); + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + b.Property("CleverbotEnabled") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("cleverbotenabled"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("deletemessageoncommand"); b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("deletestreamonlinemessage"); b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("disableglobalexpressions"); + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("exclusiveselfassignedroles"); b.Property("FilterInvites") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("filterinvites"); b.Property("FilterLinks") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("filterlinks"); b.Property("FilterWords") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("filterwords"); - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") .HasColumnName("gamevoicechannel"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Locale") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("locale"); b.Property("MuteRoleName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("muterolename"); b.Property("NotifyStreamOffline") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("notifystreamoffline"); b.Property("PermissionRole") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("permissionrole"); b.Property("Prefix") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("prefix"); + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + b.Property("StickyRoles") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("stickyroles"); b.Property("TimeZoneId") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("timezoneid"); b.Property("VerboseErrors") .ValueGeneratedOnAdd() - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasDefaultValue(true) .HasColumnName("verboseerrors"); b.Property("VerbosePermissions") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("verbosepermissions"); b.Property("WarnExpireAction") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("warnexpireaction"); b.Property("WarnExpireHours") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("warnexpirehours"); b.Property("WarningsInitialized") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("warningsinitialized"); b.HasKey("Id") @@ -1337,46 +1391,29 @@ namespace EllieBot.Migrations.PostgreSql 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") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("ItemType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("itemtype"); - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") + b.Property("LogItemId") + .HasColumnType("bigint unsigned") .HasColumnName("logitemid"); b.Property("LogSettingId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("logsettingid"); b.HasKey("Id") @@ -1393,25 +1430,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -1428,89 +1465,89 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") .HasColumnName("channelcreatedid"); - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") .HasColumnName("channeldestroyedid"); - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") .HasColumnName("channelupdatedid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") .HasColumnName("logotherid"); - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") .HasColumnName("loguserpresenceid"); - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") .HasColumnName("logvoicepresenceid"); - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") .HasColumnName("logvoicepresencettsid"); - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") .HasColumnName("logwarnsid"); - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") .HasColumnName("messagedeletedid"); - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") .HasColumnName("messageupdatedid"); - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") + b.Property("ThreadCreatedId") + .HasColumnType("bigint unsigned") .HasColumnName("threadcreatedid"); - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") + b.Property("ThreadDeletedId") + .HasColumnType("bigint unsigned") .HasColumnName("threaddeletedid"); - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") .HasColumnName("userbannedid"); - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") .HasColumnName("userjoinedid"); - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") .HasColumnName("userleftid"); - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") .HasColumnName("usermutedid"); - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") .HasColumnName("userunbannedid"); - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") .HasColumnName("userupdatedid"); b.HasKey("Id") @@ -1527,38 +1564,38 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AutoDisconnect") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodisconnect"); b.Property("AutoPlay") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autoplay"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("musicchannelid"); b.Property("PlayerRepeat") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("playerrepeat"); b.Property("QualityPreset") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("qualitypreset"); b.Property("Volume") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasDefaultValue(100) .HasColumnName("volume"); @@ -1576,25 +1613,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Author") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("author"); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") + b.Property("AuthorId") + .HasColumnType("bigint unsigned") .HasColumnName("authorid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.HasKey("Id") @@ -1607,21 +1644,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -1633,92 +1670,49 @@ namespace EllieBot.Migrations.PostgreSql 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.EllieExpression", b => { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AllowTarget") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("allowtarget"); b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodeletetrigger"); b.Property("ContainsAnywhere") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("containsanywhere"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("DmResponse") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("dmresponse"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Reactions") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("reactions"); b.Property("Response") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("response"); b.Property("Trigger") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("trigger"); b.HasKey("Id") @@ -1727,27 +1721,64 @@ namespace EllieBot.Migrations.PostgreSql b.ToTable("expressions", (string)null); }); - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b => { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); + b.Property("FeatureType") + .HasColumnType("int") + .HasColumnName("featuretype"); + + b.Property("Feature") + .HasColumnType("varchar(255)") + .HasColumnName("feature"); + + b.Property("DailyCount") + .HasColumnType("int unsigned") + .HasColumnName("dailycount"); + + b.Property("HourlyCount") + .HasColumnType("int unsigned") + .HasColumnName("hourlycount"); + + b.Property("MonthlyCount") + .HasColumnType("int unsigned") + .HasColumnName("monthlycount"); + + b.HasKey("UserId", "FeatureType", "Feature") + .HasName("pk_patronquotas"); + + b.HasIndex("UserId") + .HasDatabaseName("ix_patronquotas_userid"); + + b.ToTable("patronquotas", (string)null); + }); + + modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint unsigned") + .HasColumnName("userid"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); + b.Property("AmountCents") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("amountcents"); b.Property("LastCharge") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("lastcharge"); b.Property("UniquePlatformUserId") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("uniqueplatformuserid"); b.Property("ValidThru") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("validthru"); b.HasKey("UserId") @@ -1764,45 +1795,45 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Index") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("index"); b.Property("IsCustomCommand") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("iscustomcommand"); b.Property("PrimaryTarget") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("primarytarget"); - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") .HasColumnName("primarytargetid"); b.Property("SecondaryTarget") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("secondarytarget"); b.Property("SecondaryTargetName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("secondarytargetname"); b.Property("State") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("state"); b.HasKey("Id") @@ -1818,37 +1849,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Amount") .HasColumnType("bigint") .HasColumnName("amount"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); b.Property("Password") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("password"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -1868,37 +1899,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("MusicPlaylistId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("musicplaylistid"); b.Property("Provider") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("provider"); b.Property("ProviderType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("providertype"); b.Property("Query") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("query"); b.Property("Title") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("title"); b.Property("Uri") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("uri"); b.HasKey("Id") @@ -1914,36 +1945,36 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") + b.Property("AuthorId") + .HasColumnType("bigint unsigned") .HasColumnName("authorid"); b.Property("AuthorName") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("authorname"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Keyword") .IsRequired() - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("keyword"); b.Property("Text") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("text"); b.HasKey("Id") @@ -1962,42 +1993,42 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Emote") .HasMaxLength(100) - .HasColumnType("character varying(100)") + .HasColumnType("varchar(100)") .HasColumnName("emote"); b.Property("Group") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("LevelReq") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("levelreq"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -2017,41 +2048,41 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("IsPrivate") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("isprivate"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); - b.Property("ServerId") - .HasColumnType("numeric(20,0)") + b.Property("ServerId") + .HasColumnType("bigint unsigned") .HasColumnName("serverid"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("When") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("when"); b.HasKey("Id") @@ -2067,41 +2098,41 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Interval") - .HasColumnType("interval") + .HasColumnType("time(6)") .HasColumnName("interval"); - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") .HasColumnName("lastmessageid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); b.Property("NoRedundant") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("noredundant"); b.Property("StartTimeOfDay") - .HasColumnType("interval") + .HasColumnType("time(6)") .HasColumnName("starttimeofday"); b.HasKey("Id") @@ -2114,29 +2145,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AmountRewardedThisMonth") .HasColumnType("bigint") .HasColumnName("amountrewardedthismonth"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("LastReward") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("lastreward"); b.Property("PlatformUserId") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("platformuserid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2153,21 +2184,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Status") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("status"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -2180,31 +2211,31 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Group") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasDefaultValue(0) .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("LevelRequirement") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("levelrequirement"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -2221,53 +2252,53 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") + b.Property("AuthorId") + .HasColumnType("bigint unsigned") .HasColumnName("authorid"); b.Property("Command") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("command"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Index") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("index"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("Price") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("price"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("RoleName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("rolename"); - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") .HasColumnName("rolerequirement"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -2283,21 +2314,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("ShopEntryId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("shopentryid"); b.Property("Text") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("text"); b.HasKey("Id") @@ -2313,21 +2344,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -2343,21 +2374,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2373,25 +2404,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("RoleIds") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("roleids"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2408,29 +2439,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -2443,25 +2474,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("StreamRoleSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -2477,33 +2508,33 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") .HasColumnName("addroleid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Enabled") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("enabled"); - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") .HasColumnName("fromroleid"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Keyword") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("keyword"); b.HasKey("Id") @@ -2520,25 +2551,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("StreamRoleSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -2554,29 +2585,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("ArchiveId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("archiveid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("IsDone") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("isdone"); b.Property("Todo") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("todo"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2595,25 +2626,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2629,25 +2660,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("unmuteat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2663,29 +2694,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2701,29 +2732,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AwardedXp") .HasColumnType("bigint") .HasColumnName("awardedxp"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("NotifyOnLevelUp") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("notifyonlevelup"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Xp") @@ -2756,25 +2787,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("voicechannelid"); b.HasKey("Id") @@ -2790,21 +2821,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AffinityId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("affinityid"); b.Property("ClaimerId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("claimerid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Price") @@ -2812,7 +2843,7 @@ namespace EllieBot.Migrations.PostgreSql .HasColumnName("price"); b.Property("WaifuId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("waifuid"); b.HasKey("Id") @@ -2838,25 +2869,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("ItemEmoji") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("itememoji"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("WaifuInfoId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("waifuinfoid"); b.HasKey("Id") @@ -2872,29 +2903,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("NewId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("newid"); b.Property("OldId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("oldid"); b.Property("UpdateType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("updatetype"); b.Property("UserId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userid"); b.HasKey("Id") @@ -2916,37 +2947,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Forgiven") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("forgiven"); b.Property("ForgivenBy") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("forgivenby"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Moderator") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("moderator"); b.Property("Reason") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("reason"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Weight") @@ -2974,40 +3005,40 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Count") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("count"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); b.Property("Punishment") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("punishment"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("Time") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("time"); b.HasKey("Id") .HasName("pk_warningpunishment"); - b.HasAlternateKey("GuildId", "Count") - .HasName("ak_warningpunishment_guildid_count"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); b.ToTable("warningpunishment", (string)null); }); @@ -3016,25 +3047,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Amount") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("amount"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Level") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("level"); b.Property("XpSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xpsettingsid"); b.HasKey("Id") @@ -3050,29 +3081,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Level") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("level"); b.Property("Remove") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("remove"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("XpSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xpsettingsid"); b.HasKey("Id") @@ -3089,21 +3120,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("ServerExcluded") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("serverexcluded"); b.HasKey("Id") @@ -3120,30 +3151,30 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("IsUsing") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("isusing"); b.Property("ItemKey") .IsRequired() - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("itemkey"); b.Property("ItemType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("itemtype"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -3156,53 +3187,6 @@ namespace EllieBot.Migrations.PostgreSql 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) @@ -3529,7 +3513,7 @@ namespace EllieBot.Migrations.PostgreSql .HasForeignKey("StreamRoleSettingsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); b.Navigation("StreamRoleSettings"); }); @@ -3553,7 +3537,7 @@ namespace EllieBot.Migrations.PostgreSql .HasForeignKey("StreamRoleSettingsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); b.Navigation("StreamRoleSettings"); }); @@ -3665,6 +3649,15 @@ namespace EllieBot.Migrations.PostgreSql b.Navigation("User"); }); + modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => { b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") @@ -3780,6 +3773,8 @@ namespace EllieBot.Migrations.PostgreSql b.Navigation("VcRoleInfos"); + b.Navigation("WarnPunishments"); + b.Navigation("XpSettings"); }); diff --git a/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.cs b/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.cs new file mode 100644 index 0000000..89c098d --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20240518221440_guidlconfig-cleanup.cs @@ -0,0 +1,703 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + /// + public partial class guidlconfigcleanup : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "fk_antiraidsetting_guildconfigs_guildconfigid", + table: "antiraidsetting"); + + migrationBuilder.DropForeignKey( + name: "fk_antispamignore_antispamsetting_antispamsettingid", + table: "antispamignore"); + + migrationBuilder.DropForeignKey( + name: "fk_antispamsetting_guildconfigs_guildconfigid", + table: "antispamsetting"); + + migrationBuilder.DropForeignKey( + name: "fk_commandalias_guildconfigs_guildconfigid", + table: "commandalias"); + + migrationBuilder.DropForeignKey( + name: "fk_commandcooldown_guildconfigs_guildconfigid", + table: "commandcooldown"); + + migrationBuilder.DropForeignKey( + name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", + table: "delmsgoncmdchannel"); + + migrationBuilder.DropForeignKey( + name: "fk_excludeditem_xpsettings_xpsettingsid", + table: "excludeditem"); + + migrationBuilder.DropForeignKey( + name: "fk_filterchannelid_guildconfigs_guildconfigid", + table: "filterchannelid"); + + migrationBuilder.DropForeignKey( + name: "fk_filteredword_guildconfigs_guildconfigid", + table: "filteredword"); + + migrationBuilder.DropForeignKey( + name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", + table: "filterlinkschannelid"); + + migrationBuilder.DropForeignKey( + name: "fk_filterwordschannelid_guildconfigs_guildconfigid", + table: "filterwordschannelid"); + + migrationBuilder.DropForeignKey( + name: "fk_followedstream_guildconfigs_guildconfigid", + table: "followedstream"); + + migrationBuilder.DropForeignKey( + name: "fk_gcchannelid_guildconfigs_guildconfigid", + table: "gcchannelid"); + + migrationBuilder.DropForeignKey( + name: "fk_muteduserid_guildconfigs_guildconfigid", + table: "muteduserid"); + + migrationBuilder.DropForeignKey( + name: "fk_permissions_guildconfigs_guildconfigid", + table: "permissions"); + + migrationBuilder.DropForeignKey( + name: "fk_shopentry_guildconfigs_guildconfigid", + table: "shopentry"); + + migrationBuilder.DropForeignKey( + name: "fk_shopentryitem_shopentry_shopentryid", + table: "shopentryitem"); + + migrationBuilder.DropForeignKey( + name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", + table: "slowmodeignoredrole"); + + migrationBuilder.DropForeignKey( + name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", + table: "slowmodeignoreduser"); + + migrationBuilder.DropForeignKey( + name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~", + table: "streamroleblacklisteduser"); + + migrationBuilder.DropForeignKey( + name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~", + table: "streamrolewhitelisteduser"); + + migrationBuilder.DropForeignKey( + name: "fk_unbantimer_guildconfigs_guildconfigid", + table: "unbantimer"); + + migrationBuilder.DropForeignKey( + name: "fk_unmutetimer_guildconfigs_guildconfigid", + table: "unmutetimer"); + + migrationBuilder.DropForeignKey( + name: "fk_unroletimer_guildconfigs_guildconfigid", + table: "unroletimer"); + + migrationBuilder.DropForeignKey( + name: "fk_vcroleinfo_guildconfigs_guildconfigid", + table: "vcroleinfo"); + + migrationBuilder.DropForeignKey( + name: "fk_warningpunishment_guildconfigs_guildconfigid", + table: "warningpunishment"); + + migrationBuilder.DropTable( + name: "ignoredvoicepresencechannels"); + + migrationBuilder.AlterColumn( + name: "streamrolesettingsid", + table: "streamrolewhitelisteduser", + type: "int", + nullable: false, + defaultValue: 0, + oldClrType: typeof(int), + oldType: "int", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "streamrolesettingsid", + table: "streamroleblacklisteduser", + type: "int", + nullable: false, + defaultValue: 0, + oldClrType: typeof(int), + oldType: "int", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "guildconfigid", + table: "delmsgoncmdchannel", + type: "int", + nullable: false, + defaultValue: 0, + oldClrType: typeof(int), + oldType: "int", + oldNullable: true); + + migrationBuilder.AddForeignKey( + name: "fk_antiraidsetting_guildconfigs_guildconfigid", + table: "antiraidsetting", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_antispamignore_antispamsetting_antispamsettingid", + table: "antispamignore", + column: "antispamsettingid", + principalTable: "antispamsetting", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_antispamsetting_guildconfigs_guildconfigid", + table: "antispamsetting", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_commandalias_guildconfigs_guildconfigid", + table: "commandalias", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_commandcooldown_guildconfigs_guildconfigid", + table: "commandcooldown", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", + table: "delmsgoncmdchannel", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_excludeditem_xpsettings_xpsettingsid", + table: "excludeditem", + column: "xpsettingsid", + principalTable: "xpsettings", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_filterchannelid_guildconfigs_guildconfigid", + table: "filterchannelid", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_filteredword_guildconfigs_guildconfigid", + table: "filteredword", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", + table: "filterlinkschannelid", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_filterwordschannelid_guildconfigs_guildconfigid", + table: "filterwordschannelid", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_followedstream_guildconfigs_guildconfigid", + table: "followedstream", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_gcchannelid_guildconfigs_guildconfigid", + table: "gcchannelid", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_muteduserid_guildconfigs_guildconfigid", + table: "muteduserid", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_permissions_guildconfigs_guildconfigid", + table: "permissions", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_shopentry_guildconfigs_guildconfigid", + table: "shopentry", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_shopentryitem_shopentry_shopentryid", + table: "shopentryitem", + column: "shopentryid", + principalTable: "shopentry", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", + table: "slowmodeignoredrole", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", + table: "slowmodeignoreduser", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~", + table: "streamroleblacklisteduser", + column: "streamrolesettingsid", + principalTable: "streamrolesettings", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~", + table: "streamrolewhitelisteduser", + column: "streamrolesettingsid", + principalTable: "streamrolesettings", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_unbantimer_guildconfigs_guildconfigid", + table: "unbantimer", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_unmutetimer_guildconfigs_guildconfigid", + table: "unmutetimer", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_unroletimer_guildconfigs_guildconfigid", + table: "unroletimer", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_vcroleinfo_guildconfigs_guildconfigid", + table: "vcroleinfo", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_warningpunishment_guildconfigs_guildconfigid", + table: "warningpunishment", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "fk_antiraidsetting_guildconfigs_guildconfigid", + table: "antiraidsetting"); + + migrationBuilder.DropForeignKey( + name: "fk_antispamignore_antispamsetting_antispamsettingid", + table: "antispamignore"); + + migrationBuilder.DropForeignKey( + name: "fk_antispamsetting_guildconfigs_guildconfigid", + table: "antispamsetting"); + + migrationBuilder.DropForeignKey( + name: "fk_commandalias_guildconfigs_guildconfigid", + table: "commandalias"); + + migrationBuilder.DropForeignKey( + name: "fk_commandcooldown_guildconfigs_guildconfigid", + table: "commandcooldown"); + + migrationBuilder.DropForeignKey( + name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", + table: "delmsgoncmdchannel"); + + migrationBuilder.DropForeignKey( + name: "fk_excludeditem_xpsettings_xpsettingsid", + table: "excludeditem"); + + migrationBuilder.DropForeignKey( + name: "fk_filterchannelid_guildconfigs_guildconfigid", + table: "filterchannelid"); + + migrationBuilder.DropForeignKey( + name: "fk_filteredword_guildconfigs_guildconfigid", + table: "filteredword"); + + migrationBuilder.DropForeignKey( + name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", + table: "filterlinkschannelid"); + + migrationBuilder.DropForeignKey( + name: "fk_filterwordschannelid_guildconfigs_guildconfigid", + table: "filterwordschannelid"); + + migrationBuilder.DropForeignKey( + name: "fk_followedstream_guildconfigs_guildconfigid", + table: "followedstream"); + + migrationBuilder.DropForeignKey( + name: "fk_gcchannelid_guildconfigs_guildconfigid", + table: "gcchannelid"); + + migrationBuilder.DropForeignKey( + name: "fk_muteduserid_guildconfigs_guildconfigid", + table: "muteduserid"); + + migrationBuilder.DropForeignKey( + name: "fk_permissions_guildconfigs_guildconfigid", + table: "permissions"); + + migrationBuilder.DropForeignKey( + name: "fk_shopentry_guildconfigs_guildconfigid", + table: "shopentry"); + + migrationBuilder.DropForeignKey( + name: "fk_shopentryitem_shopentry_shopentryid", + table: "shopentryitem"); + + migrationBuilder.DropForeignKey( + name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", + table: "slowmodeignoredrole"); + + migrationBuilder.DropForeignKey( + name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", + table: "slowmodeignoreduser"); + + migrationBuilder.DropForeignKey( + name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~", + table: "streamroleblacklisteduser"); + + migrationBuilder.DropForeignKey( + name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~", + table: "streamrolewhitelisteduser"); + + migrationBuilder.DropForeignKey( + name: "fk_unbantimer_guildconfigs_guildconfigid", + table: "unbantimer"); + + migrationBuilder.DropForeignKey( + name: "fk_unmutetimer_guildconfigs_guildconfigid", + table: "unmutetimer"); + + migrationBuilder.DropForeignKey( + name: "fk_unroletimer_guildconfigs_guildconfigid", + table: "unroletimer"); + + migrationBuilder.DropForeignKey( + name: "fk_vcroleinfo_guildconfigs_guildconfigid", + table: "vcroleinfo"); + + migrationBuilder.DropForeignKey( + name: "fk_warningpunishment_guildconfigs_guildconfigid", + table: "warningpunishment"); + + migrationBuilder.AlterColumn( + name: "streamrolesettingsid", + table: "streamrolewhitelisteduser", + type: "int", + nullable: true, + oldClrType: typeof(int), + oldType: "int"); + + migrationBuilder.AlterColumn( + name: "streamrolesettingsid", + table: "streamroleblacklisteduser", + type: "int", + nullable: true, + oldClrType: typeof(int), + oldType: "int"); + + migrationBuilder.AlterColumn( + name: "guildconfigid", + table: "delmsgoncmdchannel", + type: "int", + nullable: true, + oldClrType: typeof(int), + oldType: "int"); + + migrationBuilder.CreateTable( + name: "ignoredvoicepresencechannels", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + logsettingid = table.Column(type: "int", nullable: true), + channelid = table.Column(type: "bigint unsigned", nullable: false), + dateadded = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_ignoredvoicepresencechannels", x => x.id); + table.ForeignKey( + name: "fk_ignoredvoicepresencechannels_logsettings_logsettingid", + column: x => x.logsettingid, + principalTable: "logsettings", + principalColumn: "id"); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "ix_ignoredvoicepresencechannels_logsettingid", + table: "ignoredvoicepresencechannels", + column: "logsettingid"); + + migrationBuilder.AddForeignKey( + name: "fk_antiraidsetting_guildconfigs_guildconfigid", + table: "antiraidsetting", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_antispamignore_antispamsetting_antispamsettingid", + table: "antispamignore", + column: "antispamsettingid", + principalTable: "antispamsetting", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_antispamsetting_guildconfigs_guildconfigid", + table: "antispamsetting", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "fk_commandalias_guildconfigs_guildconfigid", + table: "commandalias", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_commandcooldown_guildconfigs_guildconfigid", + table: "commandcooldown", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_delmsgoncmdchannel_guildconfigs_guildconfigid", + table: "delmsgoncmdchannel", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_excludeditem_xpsettings_xpsettingsid", + table: "excludeditem", + column: "xpsettingsid", + principalTable: "xpsettings", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_filterchannelid_guildconfigs_guildconfigid", + table: "filterchannelid", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_filteredword_guildconfigs_guildconfigid", + table: "filteredword", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_filterlinkschannelid_guildconfigs_guildconfigid", + table: "filterlinkschannelid", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_filterwordschannelid_guildconfigs_guildconfigid", + table: "filterwordschannelid", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_followedstream_guildconfigs_guildconfigid", + table: "followedstream", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_gcchannelid_guildconfigs_guildconfigid", + table: "gcchannelid", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_muteduserid_guildconfigs_guildconfigid", + table: "muteduserid", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_permissions_guildconfigs_guildconfigid", + table: "permissions", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_shopentry_guildconfigs_guildconfigid", + table: "shopentry", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_shopentryitem_shopentry_shopentryid", + table: "shopentryitem", + column: "shopentryid", + principalTable: "shopentry", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_slowmodeignoredrole_guildconfigs_guildconfigid", + table: "slowmodeignoredrole", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_slowmodeignoreduser_guildconfigs_guildconfigid", + table: "slowmodeignoreduser", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~", + table: "streamroleblacklisteduser", + column: "streamrolesettingsid", + principalTable: "streamrolesettings", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~", + table: "streamrolewhitelisteduser", + column: "streamrolesettingsid", + principalTable: "streamrolesettings", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_unbantimer_guildconfigs_guildconfigid", + table: "unbantimer", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_unmutetimer_guildconfigs_guildconfigid", + table: "unmutetimer", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_unroletimer_guildconfigs_guildconfigid", + table: "unroletimer", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_vcroleinfo_guildconfigs_guildconfigid", + table: "vcroleinfo", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + + migrationBuilder.AddForeignKey( + name: "fk_warningpunishment_guildconfigs_guildconfigid", + table: "warningpunishment", + column: "guildconfigid", + principalTable: "guildconfigs", + principalColumn: "id"); + } + } +} diff --git a/src/EllieBot/Migrations/PostgreSql/20241105024753_betstats.Designer.cs b/src/EllieBot/Migrations/Mysql/20240611180516_remove-patron-limits.Designer.cs similarity index 69% rename from src/EllieBot/Migrations/PostgreSql/20241105024753_betstats.Designer.cs rename to src/EllieBot/Migrations/Mysql/20240611180516_remove-patron-limits.Designer.cs index 685e80e..fb9293b 100644 --- a/src/EllieBot/Migrations/PostgreSql/20241105024753_betstats.Designer.cs +++ b/src/EllieBot/Migrations/Mysql/20240611180516_remove-patron-limits.Designer.cs @@ -1,57 +1,57 @@ // using System; -using EllieBot.Db; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using EllieBot.Db; #nullable disable -namespace EllieBot.Migrations.PostgreSql +namespace EllieBot.Migrations.Mysql { - [DbContext(typeof(PostgreSqlContext))] - [Migration("20241105024753_betstats")] - partial class betstats + [DbContext(typeof(MysqlContext))] + [Migration("20240611180516_remove-patron-limits")] + partial class removepatronlimits { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 63); + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Action") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("action"); b.Property("ActionDurationMinutes") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("actiondurationminutes"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("MinAge") - .HasColumnType("interval") + .HasColumnType("time(6)") .HasColumnName("minage"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -68,33 +68,33 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Action") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("action"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("PunishDuration") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("punishduration"); b.Property("Seconds") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("seconds"); b.Property("UserThreshold") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userthreshold"); b.HasKey("Id") @@ -111,21 +111,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AntiSpamSettingId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("antispamsettingid"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.HasKey("Id") @@ -141,33 +141,33 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Action") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("action"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("MessageThreshold") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("messagethreshold"); b.Property("MuteTime") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("mutetime"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -184,17 +184,17 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -207,45 +207,45 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("ChannelName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("channelname"); b.Property("CommandText") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("commandtext"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("GuildName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("guildname"); b.Property("Interval") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("interval"); - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("voicechannelid"); b.Property("VoiceChannelName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("voicechannelname"); b.HasKey("Id") @@ -258,21 +258,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.HasKey("Id") @@ -289,25 +289,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AutoDelete") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodelete"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.HasKey("Id") @@ -327,29 +327,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("ChannelId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Source") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("source"); b.Property("Target") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("target"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -365,25 +365,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("PruneDays") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("prunedays"); b.Property("Text") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("text"); b.HasKey("Id") @@ -400,21 +400,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Balance") .HasColumnType("bigint") .HasColumnName("balance"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -431,21 +431,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("numeric(20,0)") + b.Property("ItemId") + .HasColumnType("bigint unsigned") .HasColumnName("itemid"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -457,11 +457,11 @@ namespace EllieBot.Migrations.PostgreSql modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => { b.Property("ClubId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("clubid"); b.Property("UserId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userid"); b.HasKey("ClubId", "UserId") @@ -476,11 +476,11 @@ namespace EllieBot.Migrations.PostgreSql modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => { b.Property("ClubId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("clubid"); b.Property("UserId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userid"); b.HasKey("ClubId", "UserId") @@ -496,34 +496,35 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Description") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("description"); b.Property("ImageUrl") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("imageurl"); b.Property("Name") .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); b.Property("OwnerId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("ownerid"); b.Property("Xp") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xp"); b.HasKey("Id") @@ -544,25 +545,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Mapping") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("mapping"); b.Property("Trigger") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("trigger"); b.HasKey("Id") @@ -578,25 +579,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("CommandName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("commandname"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Seconds") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("seconds"); b.HasKey("Id") @@ -612,41 +613,41 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Amount") .HasColumnType("bigint") .HasColumnName("amount"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Extra") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("extra"); b.Property("Note") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("note"); - b.Property("OtherId") + b.Property("OtherId") .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") + .HasColumnType("bigint unsigned") .HasColumnName("otherid") .HasDefaultValueSql("NULL"); b.Property("Type") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -662,25 +663,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("State") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("state"); b.HasKey("Id") @@ -696,25 +697,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Command") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("command"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("Perm") - .HasColumnType("numeric(20,0)") + b.Property("Perm") + .HasColumnType("bigint unsigned") .HasColumnName("perm"); b.HasKey("Id") @@ -731,17 +732,17 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AvatarId") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("avatarid"); b.Property("ClubId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("clubid"); b.Property("CurrencyAmount") @@ -751,18 +752,22 @@ namespace EllieBot.Migrations.PostgreSql .HasColumnName("currencyamount"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); + b.Property("Discriminator") + .HasColumnType("longtext") + .HasColumnName("discriminator"); + b.Property("IsClubAdmin") .ValueGeneratedOnAdd() - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasDefaultValue(false) .HasColumnName("isclubadmin"); b.Property("NotifyOnLevelUp") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasDefaultValue(0) .HasColumnName("notifyonlevelup"); @@ -772,12 +777,12 @@ namespace EllieBot.Migrations.PostgreSql .HasDefaultValue(0L) .HasColumnName("totalxp"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -798,86 +803,32 @@ namespace EllieBot.Migrations.PostgreSql 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") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("numeric(20,0)") + b.Property("ItemId") + .HasColumnType("bigint unsigned") .HasColumnName("itemid"); b.Property("ItemType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("itemtype"); b.Property("XpSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xpsettingsid"); b.HasKey("Id") @@ -893,30 +844,30 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); b.Property("Url") .IsRequired() - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("url"); b.HasKey("Id") @@ -932,21 +883,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -962,21 +913,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -992,21 +943,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -1022,21 +973,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Word") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("word"); b.HasKey("Id") @@ -1048,72 +999,41 @@ namespace EllieBot.Migrations.PostgreSql 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") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -1129,21 +1049,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -1159,25 +1079,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Bet") - .HasColumnType("numeric") + .HasColumnType("decimal(65,30)") .HasColumnName("bet"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Feature") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("feature"); b.Property("PaidOut") - .HasColumnType("numeric") + .HasColumnType("decimal(65,30)") .HasColumnName("paidout"); b.HasKey("Id") @@ -1194,29 +1114,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("EndsAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("endsat"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); b.HasKey("Id") @@ -1229,21 +1149,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("GiveawayId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("giveawayid"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -1260,25 +1180,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("Number") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("number"); b.HasKey("Id") @@ -1295,111 +1215,167 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AutoAssignRoleIds") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("autoassignroleids"); + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodeleteselfassignedrolemessages"); + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + b.Property("CleverbotEnabled") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("cleverbotenabled"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("deletemessageoncommand"); b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("deletestreamonlinemessage"); b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("disableglobalexpressions"); + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("exclusiveselfassignedroles"); b.Property("FilterInvites") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("filterinvites"); b.Property("FilterLinks") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("filterlinks"); b.Property("FilterWords") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("filterwords"); - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") .HasColumnName("gamevoicechannel"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Locale") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("locale"); b.Property("MuteRoleName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("muterolename"); b.Property("NotifyStreamOffline") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("notifystreamoffline"); b.Property("PermissionRole") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("permissionrole"); b.Property("Prefix") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("prefix"); + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + b.Property("StickyRoles") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("stickyroles"); b.Property("TimeZoneId") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("timezoneid"); b.Property("VerboseErrors") .ValueGeneratedOnAdd() - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasDefaultValue(true) .HasColumnName("verboseerrors"); b.Property("VerbosePermissions") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("verbosepermissions"); b.Property("WarnExpireAction") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("warnexpireaction"); b.Property("WarnExpireHours") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("warnexpirehours"); b.Property("WarningsInitialized") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("warningsinitialized"); b.HasKey("Id") @@ -1415,46 +1391,29 @@ namespace EllieBot.Migrations.PostgreSql 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") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("ItemType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("itemtype"); - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") + b.Property("LogItemId") + .HasColumnType("bigint unsigned") .HasColumnName("logitemid"); b.Property("LogSettingId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("logsettingid"); b.HasKey("Id") @@ -1471,25 +1430,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -1506,89 +1465,89 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") .HasColumnName("channelcreatedid"); - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") .HasColumnName("channeldestroyedid"); - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") .HasColumnName("channelupdatedid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") .HasColumnName("logotherid"); - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") .HasColumnName("loguserpresenceid"); - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") .HasColumnName("logvoicepresenceid"); - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") .HasColumnName("logvoicepresencettsid"); - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") .HasColumnName("logwarnsid"); - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") .HasColumnName("messagedeletedid"); - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") .HasColumnName("messageupdatedid"); - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") + b.Property("ThreadCreatedId") + .HasColumnType("bigint unsigned") .HasColumnName("threadcreatedid"); - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") + b.Property("ThreadDeletedId") + .HasColumnType("bigint unsigned") .HasColumnName("threaddeletedid"); - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") .HasColumnName("userbannedid"); - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") .HasColumnName("userjoinedid"); - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") .HasColumnName("userleftid"); - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") .HasColumnName("usermutedid"); - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") .HasColumnName("userunbannedid"); - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") .HasColumnName("userupdatedid"); b.HasKey("Id") @@ -1605,38 +1564,38 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AutoDisconnect") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodisconnect"); b.Property("AutoPlay") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autoplay"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("musicchannelid"); b.Property("PlayerRepeat") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("playerrepeat"); b.Property("QualityPreset") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("qualitypreset"); b.Property("Volume") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasDefaultValue(100) .HasColumnName("volume"); @@ -1654,25 +1613,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Author") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("author"); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") + b.Property("AuthorId") + .HasColumnType("bigint unsigned") .HasColumnName("authorid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.HasKey("Id") @@ -1685,21 +1644,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -1711,70 +1670,80 @@ namespace EllieBot.Migrations.PostgreSql b.ToTable("muteduserid", (string)null); }); - modelBuilder.Entity("EllieBot.Db.Models.NCPixel", b => + modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("Color") - .HasColumnType("bigint") - .HasColumnName("color"); + b.Property("AllowTarget") + .HasColumnType("tinyint(1)") + .HasColumnName("allowtarget"); - b.Property("OwnerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("ownerid"); + b.Property("AutoDeleteTrigger") + .HasColumnType("tinyint(1)") + .HasColumnName("autodeletetrigger"); - b.Property("Position") - .HasColumnType("integer") - .HasColumnName("position"); + b.Property("ContainsAnywhere") + .HasColumnType("tinyint(1)") + .HasColumnName("containsanywhere"); - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); + b.Property("DateAdded") + .HasColumnType("datetime(6)") + .HasColumnName("dateadded"); - b.Property("Text") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("text"); + b.Property("DmResponse") + .HasColumnType("tinyint(1)") + .HasColumnName("dmresponse"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") + .HasColumnName("guildid"); + + b.Property("Reactions") + .HasColumnType("longtext") + .HasColumnName("reactions"); + + b.Property("Response") + .HasColumnType("longtext") + .HasColumnName("response"); + + b.Property("Trigger") + .HasColumnType("longtext") + .HasColumnName("trigger"); b.HasKey("Id") - .HasName("pk_ncpixel"); + .HasName("pk_expressions"); - b.HasAlternateKey("Position") - .HasName("ak_ncpixel_position"); - - b.HasIndex("OwnerId") - .HasDatabaseName("ix_ncpixel_ownerid"); - - b.ToTable("ncpixel", (string)null); + b.ToTable("expressions", (string)null); }); modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => { - b.Property("UserId") + b.Property("UserId") .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); + b.Property("AmountCents") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("amountcents"); b.Property("LastCharge") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("lastcharge"); b.Property("UniquePlatformUserId") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("uniqueplatformuserid"); b.Property("ValidThru") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("validthru"); b.HasKey("UserId") @@ -1791,45 +1760,45 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Index") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("index"); b.Property("IsCustomCommand") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("iscustomcommand"); b.Property("PrimaryTarget") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("primarytarget"); - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") .HasColumnName("primarytargetid"); b.Property("SecondaryTarget") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("secondarytarget"); b.Property("SecondaryTargetName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("secondarytargetname"); b.Property("State") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("state"); b.HasKey("Id") @@ -1845,37 +1814,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Amount") .HasColumnType("bigint") .HasColumnName("amount"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); b.Property("Password") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("password"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -1895,37 +1864,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("MusicPlaylistId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("musicplaylistid"); b.Property("Provider") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("provider"); b.Property("ProviderType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("providertype"); b.Property("Query") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("query"); b.Property("Title") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("title"); b.Property("Uri") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("uri"); b.HasKey("Id") @@ -1941,36 +1910,36 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") + b.Property("AuthorId") + .HasColumnType("bigint unsigned") .HasColumnName("authorid"); b.Property("AuthorName") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("authorname"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Keyword") .IsRequired() - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("keyword"); b.Property("Text") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("text"); b.HasKey("Id") @@ -1989,42 +1958,42 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Emote") .HasMaxLength(100) - .HasColumnType("character varying(100)") + .HasColumnType("varchar(100)") .HasColumnName("emote"); b.Property("Group") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("LevelReq") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("levelreq"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -2044,41 +2013,41 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("IsPrivate") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("isprivate"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); - b.Property("ServerId") - .HasColumnType("numeric(20,0)") + b.Property("ServerId") + .HasColumnType("bigint unsigned") .HasColumnName("serverid"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("When") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("when"); b.HasKey("Id") @@ -2094,41 +2063,41 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Interval") - .HasColumnType("interval") + .HasColumnType("time(6)") .HasColumnName("interval"); - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") .HasColumnName("lastmessageid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); b.Property("NoRedundant") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("noredundant"); b.Property("StartTimeOfDay") - .HasColumnType("interval") + .HasColumnType("time(6)") .HasColumnName("starttimeofday"); b.HasKey("Id") @@ -2141,29 +2110,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AmountRewardedThisMonth") .HasColumnType("bigint") .HasColumnName("amountrewardedthismonth"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("LastReward") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("lastreward"); b.Property("PlatformUserId") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("platformuserid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2180,21 +2149,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Status") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("status"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -2207,31 +2176,31 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Group") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasDefaultValue(0) .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("LevelRequirement") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("levelrequirement"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -2248,53 +2217,53 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") + b.Property("AuthorId") + .HasColumnType("bigint unsigned") .HasColumnName("authorid"); b.Property("Command") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("command"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Index") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("index"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("Price") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("price"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("RoleName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("rolename"); - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") .HasColumnName("rolerequirement"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -2310,21 +2279,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("ShopEntryId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("shopentryid"); b.Property("Text") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("text"); b.HasKey("Id") @@ -2340,21 +2309,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -2370,21 +2339,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2400,25 +2369,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("RoleIds") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("roleids"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2435,29 +2404,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -2470,25 +2439,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("StreamRoleSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -2504,33 +2473,33 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") .HasColumnName("addroleid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Enabled") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("enabled"); - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") .HasColumnName("fromroleid"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Keyword") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("keyword"); b.HasKey("Id") @@ -2547,25 +2516,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("StreamRoleSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -2581,29 +2550,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("ArchiveId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("archiveid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("IsDone") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("isdone"); b.Property("Todo") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("todo"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2622,25 +2591,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2656,25 +2625,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("unmuteat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2690,29 +2659,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2728,29 +2697,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AwardedXp") .HasColumnType("bigint") .HasColumnName("awardedxp"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("NotifyOnLevelUp") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("notifyonlevelup"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Xp") @@ -2783,25 +2752,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("voicechannelid"); b.HasKey("Id") @@ -2817,21 +2786,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AffinityId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("affinityid"); b.Property("ClaimerId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("claimerid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Price") @@ -2839,7 +2808,7 @@ namespace EllieBot.Migrations.PostgreSql .HasColumnName("price"); b.Property("WaifuId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("waifuid"); b.HasKey("Id") @@ -2865,25 +2834,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("ItemEmoji") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("itememoji"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("WaifuInfoId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("waifuinfoid"); b.HasKey("Id") @@ -2899,29 +2868,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("NewId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("newid"); b.Property("OldId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("oldid"); b.Property("UpdateType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("updatetype"); b.Property("UserId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userid"); b.HasKey("Id") @@ -2943,37 +2912,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Forgiven") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("forgiven"); b.Property("ForgivenBy") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("forgivenby"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Moderator") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("moderator"); b.Property("Reason") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("reason"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Weight") @@ -3001,40 +2970,40 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Count") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("count"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); b.Property("Punishment") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("punishment"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("Time") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("time"); b.HasKey("Id") .HasName("pk_warningpunishment"); - b.HasAlternateKey("GuildId", "Count") - .HasName("ak_warningpunishment_guildid_count"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); b.ToTable("warningpunishment", (string)null); }); @@ -3043,25 +3012,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Amount") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("amount"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Level") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("level"); b.Property("XpSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xpsettingsid"); b.HasKey("Id") @@ -3077,29 +3046,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Level") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("level"); b.Property("Remove") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("remove"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("XpSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xpsettingsid"); b.HasKey("Id") @@ -3116,21 +3085,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("ServerExcluded") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("serverexcluded"); b.HasKey("Id") @@ -3147,30 +3116,30 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("IsUsing") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("isusing"); b.Property("ItemKey") .IsRequired() - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("itemkey"); b.Property("ItemType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("itemtype"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -3183,104 +3152,6 @@ namespace EllieBot.Migrations.PostgreSql 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) @@ -3607,7 +3478,7 @@ namespace EllieBot.Migrations.PostgreSql .HasForeignKey("StreamRoleSettingsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); b.Navigation("StreamRoleSettings"); }); @@ -3631,7 +3502,7 @@ namespace EllieBot.Migrations.PostgreSql .HasForeignKey("StreamRoleSettingsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); b.Navigation("StreamRoleSettings"); }); @@ -3743,6 +3614,15 @@ namespace EllieBot.Migrations.PostgreSql b.Navigation("User"); }); + modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => { b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") @@ -3858,6 +3738,8 @@ namespace EllieBot.Migrations.PostgreSql b.Navigation("VcRoleInfos"); + b.Navigation("WarnPunishments"); + b.Navigation("XpSettings"); }); diff --git a/src/EllieBot/Migrations/Mysql/20240611180516_remove-patron-limits.cs b/src/EllieBot/Migrations/Mysql/20240611180516_remove-patron-limits.cs new file mode 100644 index 0000000..745636a --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20240611180516_remove-patron-limits.cs @@ -0,0 +1,44 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + /// + public partial class removepatronlimits : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "patronquotas"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "patronquotas", + columns: table => new + { + userid = table.Column(type: "bigint unsigned", nullable: false), + featuretype = table.Column(type: "int", nullable: false), + feature = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + dailycount = table.Column(type: "int unsigned", nullable: false), + hourlycount = table.Column(type: "int unsigned", nullable: false), + monthlycount = table.Column(type: "int unsigned", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_patronquotas", x => new { x.userid, x.featuretype, x.feature }); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "ix_patronquotas_userid", + table: "patronquotas", + column: "userid"); + } + } +} diff --git a/src/EllieBot/Migrations/PostgreSql/20240912124719_greet-settings.Designer.cs b/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.Designer.cs similarity index 72% rename from src/EllieBot/Migrations/PostgreSql/20240912124719_greet-settings.Designer.cs rename to src/EllieBot/Migrations/Mysql/20240627033532_honeypot.Designer.cs index bb3e2f5..8d0bf29 100644 --- a/src/EllieBot/Migrations/PostgreSql/20240912124719_greet-settings.Designer.cs +++ b/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.Designer.cs @@ -2,56 +2,56 @@ using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using EllieBot.Db; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable -namespace EllieBot.Migrations.PostgreSql +namespace EllieBot.Migrations.Mysql { - [DbContext(typeof(PostgreSqlContext))] - [Migration("20240912124719_greet-settings")] - partial class greetsettings + [DbContext(typeof(MysqlContext))] + [Migration("20240627033532_honeypot")] + partial class honeypot { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 63); + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Action") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("action"); b.Property("ActionDurationMinutes") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("actiondurationminutes"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("MinAge") - .HasColumnType("interval") + .HasColumnType("time(6)") .HasColumnName("minage"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -68,33 +68,33 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Action") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("action"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("PunishDuration") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("punishduration"); b.Property("Seconds") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("seconds"); b.Property("UserThreshold") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userthreshold"); b.HasKey("Id") @@ -111,21 +111,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AntiSpamSettingId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("antispamsettingid"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.HasKey("Id") @@ -141,33 +141,33 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Action") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("action"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("MessageThreshold") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("messagethreshold"); b.Property("MuteTime") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("mutetime"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -184,17 +184,17 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -207,45 +207,45 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("ChannelName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("channelname"); b.Property("CommandText") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("commandtext"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("GuildName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("guildname"); b.Property("Interval") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("interval"); - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("voicechannelid"); b.Property("VoiceChannelName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("voicechannelname"); b.HasKey("Id") @@ -258,21 +258,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.HasKey("Id") @@ -289,25 +289,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AutoDelete") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodelete"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.HasKey("Id") @@ -327,29 +327,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("ChannelId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Source") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("source"); b.Property("Target") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("target"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -365,25 +365,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("PruneDays") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("prunedays"); b.Property("Text") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("text"); b.HasKey("Id") @@ -400,21 +400,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Balance") .HasColumnType("bigint") .HasColumnName("balance"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -431,21 +431,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("numeric(20,0)") + b.Property("ItemId") + .HasColumnType("bigint unsigned") .HasColumnName("itemid"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -457,11 +457,11 @@ namespace EllieBot.Migrations.PostgreSql modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => { b.Property("ClubId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("clubid"); b.Property("UserId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userid"); b.HasKey("ClubId", "UserId") @@ -476,11 +476,11 @@ namespace EllieBot.Migrations.PostgreSql modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => { b.Property("ClubId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("clubid"); b.Property("UserId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userid"); b.HasKey("ClubId", "UserId") @@ -496,34 +496,35 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Description") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("description"); b.Property("ImageUrl") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("imageurl"); b.Property("Name") .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); b.Property("OwnerId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("ownerid"); b.Property("Xp") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xp"); b.HasKey("Id") @@ -544,25 +545,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Mapping") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("mapping"); b.Property("Trigger") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("trigger"); b.HasKey("Id") @@ -578,25 +579,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("CommandName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("commandname"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Seconds") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("seconds"); b.HasKey("Id") @@ -612,41 +613,41 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Amount") .HasColumnType("bigint") .HasColumnName("amount"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Extra") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("extra"); b.Property("Note") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("note"); - b.Property("OtherId") + b.Property("OtherId") .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") + .HasColumnType("bigint unsigned") .HasColumnName("otherid") .HasDefaultValueSql("NULL"); b.Property("Type") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -662,25 +663,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("State") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("state"); b.HasKey("Id") @@ -696,25 +697,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Command") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("command"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("Perm") - .HasColumnType("numeric(20,0)") + b.Property("Perm") + .HasColumnType("bigint unsigned") .HasColumnName("perm"); b.HasKey("Id") @@ -731,17 +732,17 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AvatarId") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("avatarid"); b.Property("ClubId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("clubid"); b.Property("CurrencyAmount") @@ -751,22 +752,22 @@ namespace EllieBot.Migrations.PostgreSql .HasColumnName("currencyamount"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Discriminator") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("discriminator"); b.Property("IsClubAdmin") .ValueGeneratedOnAdd() - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasDefaultValue(false) .HasColumnName("isclubadmin"); b.Property("NotifyOnLevelUp") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasDefaultValue(0) .HasColumnName("notifyonlevelup"); @@ -776,12 +777,12 @@ namespace EllieBot.Migrations.PostgreSql .HasDefaultValue(0L) .HasColumnName("totalxp"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -809,25 +810,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("numeric(20,0)") + b.Property("ItemId") + .HasColumnType("bigint unsigned") .HasColumnName("itemid"); b.Property("ItemType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("itemtype"); b.Property("XpSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xpsettingsid"); b.HasKey("Id") @@ -843,30 +844,30 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); b.Property("Url") .IsRequired() - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("url"); b.HasKey("Id") @@ -882,21 +883,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -912,21 +913,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -942,21 +943,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -972,21 +973,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Word") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("word"); b.HasKey("Id") @@ -1002,37 +1003,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -1048,21 +1049,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -1078,25 +1079,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Bet") - .HasColumnType("numeric") + .HasColumnType("decimal(65,30)") .HasColumnName("bet"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Feature") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("feature"); b.Property("PaidOut") - .HasColumnType("numeric") + .HasColumnType("decimal(65,30)") .HasColumnName("paidout"); b.HasKey("Id") @@ -1113,29 +1114,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("EndsAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("endsat"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); b.HasKey("Id") @@ -1148,21 +1149,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("GiveawayId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("giveawayid"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -1179,25 +1180,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("Number") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("number"); b.HasKey("Id") @@ -1214,111 +1215,167 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AutoAssignRoleIds") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("autoassignroleids"); + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodeleteselfassignedrolemessages"); + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + b.Property("CleverbotEnabled") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("cleverbotenabled"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("deletemessageoncommand"); b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("deletestreamonlinemessage"); b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("disableglobalexpressions"); + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("exclusiveselfassignedroles"); b.Property("FilterInvites") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("filterinvites"); b.Property("FilterLinks") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("filterlinks"); b.Property("FilterWords") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("filterwords"); - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") .HasColumnName("gamevoicechannel"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Locale") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("locale"); b.Property("MuteRoleName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("muterolename"); b.Property("NotifyStreamOffline") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("notifystreamoffline"); b.Property("PermissionRole") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("permissionrole"); b.Property("Prefix") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("prefix"); + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + b.Property("StickyRoles") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("stickyroles"); b.Property("TimeZoneId") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("timezoneid"); b.Property("VerboseErrors") .ValueGeneratedOnAdd() - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasDefaultValue(true) .HasColumnName("verboseerrors"); b.Property("VerbosePermissions") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("verbosepermissions"); b.Property("WarnExpireAction") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("warnexpireaction"); b.Property("WarnExpireHours") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("warnexpirehours"); b.Property("WarningsInitialized") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("warningsinitialized"); b.HasKey("Id") @@ -1336,13 +1393,15 @@ namespace EllieBot.Migrations.PostgreSql modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => { - b.Property("GuildId") + b.Property("GuildId") .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GuildId")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.HasKey("GuildId") @@ -1355,25 +1414,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("ItemType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("itemtype"); - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") + b.Property("LogItemId") + .HasColumnType("bigint unsigned") .HasColumnName("logitemid"); b.Property("LogSettingId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("logsettingid"); b.HasKey("Id") @@ -1390,25 +1449,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -1425,89 +1484,89 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") .HasColumnName("channelcreatedid"); - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") .HasColumnName("channeldestroyedid"); - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") .HasColumnName("channelupdatedid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") .HasColumnName("logotherid"); - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") .HasColumnName("loguserpresenceid"); - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") .HasColumnName("logvoicepresenceid"); - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") .HasColumnName("logvoicepresencettsid"); - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") .HasColumnName("logwarnsid"); - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") .HasColumnName("messagedeletedid"); - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") .HasColumnName("messageupdatedid"); - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") + b.Property("ThreadCreatedId") + .HasColumnType("bigint unsigned") .HasColumnName("threadcreatedid"); - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") + b.Property("ThreadDeletedId") + .HasColumnType("bigint unsigned") .HasColumnName("threaddeletedid"); - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") .HasColumnName("userbannedid"); - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") .HasColumnName("userjoinedid"); - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") .HasColumnName("userleftid"); - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") .HasColumnName("usermutedid"); - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") .HasColumnName("userunbannedid"); - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") .HasColumnName("userupdatedid"); b.HasKey("Id") @@ -1524,38 +1583,38 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AutoDisconnect") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodisconnect"); b.Property("AutoPlay") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autoplay"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("musicchannelid"); b.Property("PlayerRepeat") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("playerrepeat"); b.Property("QualityPreset") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("qualitypreset"); b.Property("Volume") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasDefaultValue(100) .HasColumnName("volume"); @@ -1573,25 +1632,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Author") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("author"); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") + b.Property("AuthorId") + .HasColumnType("bigint unsigned") .HasColumnName("authorid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.HasKey("Id") @@ -1604,21 +1663,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -1634,45 +1693,45 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AllowTarget") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("allowtarget"); b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodeletetrigger"); b.Property("ContainsAnywhere") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("containsanywhere"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("DmResponse") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("dmresponse"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Reactions") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("reactions"); b.Property("Response") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("response"); b.Property("Trigger") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("trigger"); b.HasKey("Id") @@ -1683,25 +1742,27 @@ namespace EllieBot.Migrations.PostgreSql modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => { - b.Property("UserId") + b.Property("UserId") .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); + b.Property("AmountCents") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("amountcents"); b.Property("LastCharge") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("lastcharge"); b.Property("UniquePlatformUserId") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("uniqueplatformuserid"); b.Property("ValidThru") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("validthru"); b.HasKey("UserId") @@ -1718,45 +1779,45 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Index") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("index"); b.Property("IsCustomCommand") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("iscustomcommand"); b.Property("PrimaryTarget") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("primarytarget"); - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") .HasColumnName("primarytargetid"); b.Property("SecondaryTarget") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("secondarytarget"); b.Property("SecondaryTargetName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("secondarytargetname"); b.Property("State") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("state"); b.HasKey("Id") @@ -1772,37 +1833,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Amount") .HasColumnType("bigint") .HasColumnName("amount"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); b.Property("Password") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("password"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -1822,37 +1883,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("MusicPlaylistId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("musicplaylistid"); b.Property("Provider") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("provider"); b.Property("ProviderType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("providertype"); b.Property("Query") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("query"); b.Property("Title") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("title"); b.Property("Uri") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("uri"); b.HasKey("Id") @@ -1868,36 +1929,36 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") + b.Property("AuthorId") + .HasColumnType("bigint unsigned") .HasColumnName("authorid"); b.Property("AuthorName") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("authorname"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Keyword") .IsRequired() - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("keyword"); b.Property("Text") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("text"); b.HasKey("Id") @@ -1916,42 +1977,42 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Emote") .HasMaxLength(100) - .HasColumnType("character varying(100)") + .HasColumnType("varchar(100)") .HasColumnName("emote"); b.Property("Group") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("LevelReq") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("levelreq"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -1971,41 +2032,41 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("IsPrivate") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("isprivate"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); - b.Property("ServerId") - .HasColumnType("numeric(20,0)") + b.Property("ServerId") + .HasColumnType("bigint unsigned") .HasColumnName("serverid"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("When") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("when"); b.HasKey("Id") @@ -2021,41 +2082,41 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Interval") - .HasColumnType("interval") + .HasColumnType("time(6)") .HasColumnName("interval"); - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") .HasColumnName("lastmessageid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); b.Property("NoRedundant") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("noredundant"); b.Property("StartTimeOfDay") - .HasColumnType("interval") + .HasColumnType("time(6)") .HasColumnName("starttimeofday"); b.HasKey("Id") @@ -2068,29 +2129,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AmountRewardedThisMonth") .HasColumnType("bigint") .HasColumnName("amountrewardedthismonth"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("LastReward") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("lastreward"); b.Property("PlatformUserId") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("platformuserid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2107,21 +2168,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Status") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("status"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -2134,31 +2195,31 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Group") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasDefaultValue(0) .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("LevelRequirement") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("levelrequirement"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -2175,53 +2236,53 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") + b.Property("AuthorId") + .HasColumnType("bigint unsigned") .HasColumnName("authorid"); b.Property("Command") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("command"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Index") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("index"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("Price") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("price"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("RoleName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("rolename"); - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") .HasColumnName("rolerequirement"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -2237,21 +2298,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("ShopEntryId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("shopentryid"); b.Property("Text") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("text"); b.HasKey("Id") @@ -2267,21 +2328,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -2297,21 +2358,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2327,25 +2388,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("RoleIds") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("roleids"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2362,29 +2423,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -2397,25 +2458,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("StreamRoleSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -2431,33 +2492,33 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") .HasColumnName("addroleid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Enabled") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("enabled"); - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") .HasColumnName("fromroleid"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Keyword") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("keyword"); b.HasKey("Id") @@ -2474,25 +2535,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("StreamRoleSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -2508,29 +2569,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("ArchiveId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("archiveid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("IsDone") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("isdone"); b.Property("Todo") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("todo"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2549,25 +2610,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2583,25 +2644,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("unmuteat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2617,29 +2678,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2655,29 +2716,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AwardedXp") .HasColumnType("bigint") .HasColumnName("awardedxp"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("NotifyOnLevelUp") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("notifyonlevelup"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Xp") @@ -2710,25 +2771,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("voicechannelid"); b.HasKey("Id") @@ -2744,21 +2805,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AffinityId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("affinityid"); b.Property("ClaimerId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("claimerid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Price") @@ -2766,7 +2827,7 @@ namespace EllieBot.Migrations.PostgreSql .HasColumnName("price"); b.Property("WaifuId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("waifuid"); b.HasKey("Id") @@ -2792,25 +2853,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("ItemEmoji") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("itememoji"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("WaifuInfoId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("waifuinfoid"); b.HasKey("Id") @@ -2826,29 +2887,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("NewId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("newid"); b.Property("OldId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("oldid"); b.Property("UpdateType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("updatetype"); b.Property("UserId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userid"); b.HasKey("Id") @@ -2870,37 +2931,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Forgiven") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("forgiven"); b.Property("ForgivenBy") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("forgivenby"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Moderator") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("moderator"); b.Property("Reason") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("reason"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Weight") @@ -2928,33 +2989,33 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Count") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("count"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Punishment") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("punishment"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("Time") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("time"); b.HasKey("Id") @@ -2970,25 +3031,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Amount") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("amount"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Level") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("level"); b.Property("XpSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xpsettingsid"); b.HasKey("Id") @@ -3004,29 +3065,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Level") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("level"); b.Property("Remove") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("remove"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("XpSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xpsettingsid"); b.HasKey("Id") @@ -3043,21 +3104,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("ServerExcluded") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("serverexcluded"); b.HasKey("Id") @@ -3074,30 +3135,30 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("IsUsing") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("isusing"); b.Property("ItemKey") .IsRequired() - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("itemkey"); b.Property("ItemType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("itemtype"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -3110,53 +3171,6 @@ namespace EllieBot.Migrations.PostgreSql 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) @@ -3483,7 +3497,7 @@ namespace EllieBot.Migrations.PostgreSql .HasForeignKey("StreamRoleSettingsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); b.Navigation("StreamRoleSettings"); }); @@ -3507,7 +3521,7 @@ namespace EllieBot.Migrations.PostgreSql .HasForeignKey("StreamRoleSettingsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); b.Navigation("StreamRoleSettings"); }); @@ -3786,4 +3800,4 @@ namespace EllieBot.Migrations.PostgreSql #pragma warning restore 612, 618 } } -} +} \ No newline at end of file diff --git a/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.cs b/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.cs new file mode 100644 index 0000000..5032d23 --- /dev/null +++ b/src/EllieBot/Migrations/Mysql/20240627033532_honeypot.cs @@ -0,0 +1,36 @@ +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EllieBot.Migrations.Mysql +{ + /// + public partial class honeypot : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "honeypotchannels", + columns: table => new + { + guildid = table.Column(type: "bigint unsigned", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + channelid = table.Column(type: "bigint unsigned", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_honeypotchannels", x => x.guildid); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "honeypotchannels"); + } + } +} \ No newline at end of file diff --git a/src/EllieBot/Migrations/PostgreSql/20241018004623_warn-split.Designer.cs b/src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs similarity index 72% rename from src/EllieBot/Migrations/PostgreSql/20241018004623_warn-split.Designer.cs rename to src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs index 2326a13..964a3ea 100644 --- a/src/EllieBot/Migrations/PostgreSql/20241018004623_warn-split.Designer.cs +++ b/src/EllieBot/Migrations/Mysql/MysqlContextModelSnapshot.cs @@ -1,57 +1,54 @@ -// +// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using EllieBot.Db; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable -namespace EllieBot.Migrations.PostgreSql +namespace EllieBot.Migrations.Mysql { - [DbContext(typeof(PostgreSqlContext))] - [Migration("20241018004623_warn-split")] - partial class warnsplit + [DbContext(typeof(MysqlContext))] + partial class MysqlContextModelSnapshot : ModelSnapshot { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) + protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.8") - .HasAnnotation("Relational:MaxIdentifierLength", 63); + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Action") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("action"); b.Property("ActionDurationMinutes") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("actiondurationminutes"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("MinAge") - .HasColumnType("interval") + .HasColumnType("time(6)") .HasColumnName("minage"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -68,33 +65,33 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Action") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("action"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("PunishDuration") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("punishduration"); b.Property("Seconds") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("seconds"); b.Property("UserThreshold") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userthreshold"); b.HasKey("Id") @@ -111,21 +108,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AntiSpamSettingId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("antispamsettingid"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.HasKey("Id") @@ -141,33 +138,33 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Action") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("action"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("MessageThreshold") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("messagethreshold"); b.Property("MuteTime") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("mutetime"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -184,17 +181,17 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -207,45 +204,45 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("ChannelName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("channelname"); b.Property("CommandText") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("commandtext"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("GuildName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("guildname"); b.Property("Interval") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("interval"); - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("voicechannelid"); b.Property("VoiceChannelName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("voicechannelname"); b.HasKey("Id") @@ -258,21 +255,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.HasKey("Id") @@ -289,25 +286,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AutoDelete") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodelete"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.HasKey("Id") @@ -327,29 +324,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("ChannelId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Source") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("source"); b.Property("Target") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("target"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -365,25 +362,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("PruneDays") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("prunedays"); b.Property("Text") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("text"); b.HasKey("Id") @@ -400,21 +397,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Balance") .HasColumnType("bigint") .HasColumnName("balance"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -431,21 +428,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("numeric(20,0)") + b.Property("ItemId") + .HasColumnType("bigint unsigned") .HasColumnName("itemid"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -457,11 +454,11 @@ namespace EllieBot.Migrations.PostgreSql modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => { b.Property("ClubId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("clubid"); b.Property("UserId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userid"); b.HasKey("ClubId", "UserId") @@ -476,11 +473,11 @@ namespace EllieBot.Migrations.PostgreSql modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => { b.Property("ClubId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("clubid"); b.Property("UserId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userid"); b.HasKey("ClubId", "UserId") @@ -496,34 +493,35 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Description") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("description"); b.Property("ImageUrl") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("imageurl"); b.Property("Name") .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("name"); + .HasColumnType("varchar(20)") + .HasColumnName("name") + .UseCollation("utf8mb4_bin"); b.Property("OwnerId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("ownerid"); b.Property("Xp") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xp"); b.HasKey("Id") @@ -544,25 +542,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Mapping") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("mapping"); b.Property("Trigger") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("trigger"); b.HasKey("Id") @@ -578,25 +576,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("CommandName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("commandname"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Seconds") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("seconds"); b.HasKey("Id") @@ -612,41 +610,41 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Amount") .HasColumnType("bigint") .HasColumnName("amount"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Extra") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("extra"); b.Property("Note") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("note"); - b.Property("OtherId") + b.Property("OtherId") .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") + .HasColumnType("bigint unsigned") .HasColumnName("otherid") .HasDefaultValueSql("NULL"); b.Property("Type") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -662,25 +660,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("State") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("state"); b.HasKey("Id") @@ -696,25 +694,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Command") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("command"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("Perm") - .HasColumnType("numeric(20,0)") + b.Property("Perm") + .HasColumnType("bigint unsigned") .HasColumnName("perm"); b.HasKey("Id") @@ -731,17 +729,17 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AvatarId") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("avatarid"); b.Property("ClubId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("clubid"); b.Property("CurrencyAmount") @@ -751,22 +749,22 @@ namespace EllieBot.Migrations.PostgreSql .HasColumnName("currencyamount"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Discriminator") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("discriminator"); b.Property("IsClubAdmin") .ValueGeneratedOnAdd() - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasDefaultValue(false) .HasColumnName("isclubadmin"); b.Property("NotifyOnLevelUp") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasDefaultValue(0) .HasColumnName("notifyonlevelup"); @@ -776,12 +774,12 @@ namespace EllieBot.Migrations.PostgreSql .HasDefaultValue(0L) .HasColumnName("totalxp"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -809,25 +807,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("ItemId") - .HasColumnType("numeric(20,0)") + b.Property("ItemId") + .HasColumnType("bigint unsigned") .HasColumnName("itemid"); b.Property("ItemType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("itemtype"); b.Property("XpSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xpsettingsid"); b.HasKey("Id") @@ -843,30 +841,30 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); b.Property("Url") .IsRequired() - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("url"); b.HasKey("Id") @@ -882,21 +880,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -912,21 +910,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -942,21 +940,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -972,21 +970,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Word") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("word"); b.HasKey("Id") @@ -1002,37 +1000,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -1048,21 +1046,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.HasKey("Id") @@ -1078,25 +1076,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Bet") - .HasColumnType("numeric") + .HasColumnType("decimal(65,30)") .HasColumnName("bet"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Feature") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("feature"); b.Property("PaidOut") - .HasColumnType("numeric") + .HasColumnType("decimal(65,30)") .HasColumnName("paidout"); b.HasKey("Id") @@ -1113,29 +1111,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("EndsAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("endsat"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); b.HasKey("Id") @@ -1148,21 +1146,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("GiveawayId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("giveawayid"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -1179,25 +1177,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("Number") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("number"); b.HasKey("Id") @@ -1214,111 +1212,167 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AutoAssignRoleIds") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("autoassignroleids"); + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("int") + .HasColumnName("autodeletegreetmessagestimer"); + b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodeleteselfassignedrolemessages"); + b.Property("BoostMessage") + .HasColumnType("longtext") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("int") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("longtext") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("channelgreetmessagetext"); + b.Property("CleverbotEnabled") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("cleverbotenabled"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("DeleteMessageOnCommand") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("deletemessageoncommand"); b.Property("DeleteStreamOnlineMessage") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("deletestreamonlinemessage"); b.Property("DisableGlobalExpressions") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("disableglobalexpressions"); + b.Property("DmGreetMessageText") + .HasColumnType("longtext") + .HasColumnName("dmgreetmessagetext"); + b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("exclusiveselfassignedroles"); b.Property("FilterInvites") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("filterinvites"); b.Property("FilterLinks") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("filterlinks"); b.Property("FilterWords") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("filterwords"); - b.Property("GameVoiceChannel") - .HasColumnType("numeric(20,0)") + b.Property("GameVoiceChannel") + .HasColumnType("bigint unsigned") .HasColumnName("gamevoicechannel"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GreetMessageChannelId") + .HasColumnType("bigint unsigned") + .HasColumnName("greetmessagechannelid"); + + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Locale") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("locale"); b.Property("MuteRoleName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("muterolename"); b.Property("NotifyStreamOffline") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("notifystreamoffline"); b.Property("PermissionRole") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("permissionrole"); b.Property("Prefix") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("prefix"); + b.Property("SendBoostMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("tinyint(1)") + .HasColumnName("senddmgreetmessage"); + b.Property("StickyRoles") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("stickyroles"); b.Property("TimeZoneId") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("timezoneid"); b.Property("VerboseErrors") .ValueGeneratedOnAdd() - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasDefaultValue(true) .HasColumnName("verboseerrors"); b.Property("VerbosePermissions") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("verbosepermissions"); b.Property("WarnExpireAction") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("warnexpireaction"); b.Property("WarnExpireHours") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("warnexpirehours"); b.Property("WarningsInitialized") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("warningsinitialized"); b.HasKey("Id") @@ -1336,13 +1390,15 @@ namespace EllieBot.Migrations.PostgreSql modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => { - b.Property("GuildId") + b.Property("GuildId") .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GuildId")); + + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.HasKey("GuildId") @@ -1355,25 +1411,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("ItemType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("itemtype"); - b.Property("LogItemId") - .HasColumnType("numeric(20,0)") + b.Property("LogItemId") + .HasColumnType("bigint unsigned") .HasColumnName("logitemid"); b.Property("LogSettingId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("logsettingid"); b.HasKey("Id") @@ -1390,25 +1446,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -1425,89 +1481,89 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelCreatedId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelCreatedId") + .HasColumnType("bigint unsigned") .HasColumnName("channelcreatedid"); - b.Property("ChannelDestroyedId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelDestroyedId") + .HasColumnType("bigint unsigned") .HasColumnName("channeldestroyedid"); - b.Property("ChannelUpdatedId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelUpdatedId") + .HasColumnType("bigint unsigned") .HasColumnName("channelupdatedid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("LogOtherId") - .HasColumnType("numeric(20,0)") + b.Property("LogOtherId") + .HasColumnType("bigint unsigned") .HasColumnName("logotherid"); - b.Property("LogUserPresenceId") - .HasColumnType("numeric(20,0)") + b.Property("LogUserPresenceId") + .HasColumnType("bigint unsigned") .HasColumnName("loguserpresenceid"); - b.Property("LogVoicePresenceId") - .HasColumnType("numeric(20,0)") + b.Property("LogVoicePresenceId") + .HasColumnType("bigint unsigned") .HasColumnName("logvoicepresenceid"); - b.Property("LogVoicePresenceTTSId") - .HasColumnType("numeric(20,0)") + b.Property("LogVoicePresenceTTSId") + .HasColumnType("bigint unsigned") .HasColumnName("logvoicepresencettsid"); - b.Property("LogWarnsId") - .HasColumnType("numeric(20,0)") + b.Property("LogWarnsId") + .HasColumnType("bigint unsigned") .HasColumnName("logwarnsid"); - b.Property("MessageDeletedId") - .HasColumnType("numeric(20,0)") + b.Property("MessageDeletedId") + .HasColumnType("bigint unsigned") .HasColumnName("messagedeletedid"); - b.Property("MessageUpdatedId") - .HasColumnType("numeric(20,0)") + b.Property("MessageUpdatedId") + .HasColumnType("bigint unsigned") .HasColumnName("messageupdatedid"); - b.Property("ThreadCreatedId") - .HasColumnType("numeric(20,0)") + b.Property("ThreadCreatedId") + .HasColumnType("bigint unsigned") .HasColumnName("threadcreatedid"); - b.Property("ThreadDeletedId") - .HasColumnType("numeric(20,0)") + b.Property("ThreadDeletedId") + .HasColumnType("bigint unsigned") .HasColumnName("threaddeletedid"); - b.Property("UserBannedId") - .HasColumnType("numeric(20,0)") + b.Property("UserBannedId") + .HasColumnType("bigint unsigned") .HasColumnName("userbannedid"); - b.Property("UserJoinedId") - .HasColumnType("numeric(20,0)") + b.Property("UserJoinedId") + .HasColumnType("bigint unsigned") .HasColumnName("userjoinedid"); - b.Property("UserLeftId") - .HasColumnType("numeric(20,0)") + b.Property("UserLeftId") + .HasColumnType("bigint unsigned") .HasColumnName("userleftid"); - b.Property("UserMutedId") - .HasColumnType("numeric(20,0)") + b.Property("UserMutedId") + .HasColumnType("bigint unsigned") .HasColumnName("usermutedid"); - b.Property("UserUnbannedId") - .HasColumnType("numeric(20,0)") + b.Property("UserUnbannedId") + .HasColumnType("bigint unsigned") .HasColumnName("userunbannedid"); - b.Property("UserUpdatedId") - .HasColumnType("numeric(20,0)") + b.Property("UserUpdatedId") + .HasColumnType("bigint unsigned") .HasColumnName("userupdatedid"); b.HasKey("Id") @@ -1524,38 +1580,38 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AutoDisconnect") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodisconnect"); b.Property("AutoPlay") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autoplay"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("MusicChannelId") - .HasColumnType("numeric(20,0)") + b.Property("MusicChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("musicchannelid"); b.Property("PlayerRepeat") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("playerrepeat"); b.Property("QualityPreset") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("qualitypreset"); b.Property("Volume") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasDefaultValue(100) .HasColumnName("volume"); @@ -1573,25 +1629,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Author") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("author"); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") + b.Property("AuthorId") + .HasColumnType("bigint unsigned") .HasColumnName("authorid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.HasKey("Id") @@ -1604,21 +1660,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -1634,45 +1690,45 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AllowTarget") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("allowtarget"); b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("autodeletetrigger"); b.Property("ContainsAnywhere") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("containsanywhere"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("DmResponse") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("dmresponse"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Reactions") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("reactions"); b.Property("Response") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("response"); b.Property("Trigger") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("trigger"); b.HasKey("Id") @@ -1683,25 +1739,27 @@ namespace EllieBot.Migrations.PostgreSql modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => { - b.Property("UserId") + b.Property("UserId") .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("UserId")); + b.Property("AmountCents") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("amountcents"); b.Property("LastCharge") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("lastcharge"); b.Property("UniquePlatformUserId") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("uniqueplatformuserid"); b.Property("ValidThru") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("validthru"); b.HasKey("UserId") @@ -1718,45 +1776,45 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Index") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("index"); b.Property("IsCustomCommand") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("iscustomcommand"); b.Property("PrimaryTarget") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("primarytarget"); - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") + b.Property("PrimaryTargetId") + .HasColumnType("bigint unsigned") .HasColumnName("primarytargetid"); b.Property("SecondaryTarget") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("secondarytarget"); b.Property("SecondaryTargetName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("secondarytargetname"); b.Property("State") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("state"); b.HasKey("Id") @@ -1772,37 +1830,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Amount") .HasColumnType("bigint") .HasColumnName("amount"); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); b.Property("Password") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("password"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -1822,37 +1880,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("MusicPlaylistId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("musicplaylistid"); b.Property("Provider") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("provider"); b.Property("ProviderType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("providertype"); b.Property("Query") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("query"); b.Property("Title") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("title"); b.Property("Uri") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("uri"); b.HasKey("Id") @@ -1868,36 +1926,36 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") + b.Property("AuthorId") + .HasColumnType("bigint unsigned") .HasColumnName("authorid"); b.Property("AuthorName") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("authorname"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Keyword") .IsRequired() - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("keyword"); b.Property("Text") .IsRequired() - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("text"); b.HasKey("Id") @@ -1916,42 +1974,42 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Emote") .HasMaxLength(100) - .HasColumnType("character varying(100)") + .HasColumnType("varchar(100)") .HasColumnName("emote"); b.Property("Group") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("LevelReq") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("levelreq"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -1971,41 +2029,41 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("IsPrivate") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("isprivate"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); - b.Property("ServerId") - .HasColumnType("numeric(20,0)") + b.Property("ServerId") + .HasColumnType("bigint unsigned") .HasColumnName("serverid"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("When") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("when"); b.HasKey("Id") @@ -2021,41 +2079,41 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Interval") - .HasColumnType("interval") + .HasColumnType("time(6)") .HasColumnName("interval"); - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") + b.Property("LastMessageId") + .HasColumnType("bigint unsigned") .HasColumnName("lastmessageid"); b.Property("Message") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("message"); b.Property("NoRedundant") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("noredundant"); b.Property("StartTimeOfDay") - .HasColumnType("interval") + .HasColumnType("time(6)") .HasColumnName("starttimeofday"); b.HasKey("Id") @@ -2068,29 +2126,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AmountRewardedThisMonth") .HasColumnType("bigint") .HasColumnName("amountrewardedthismonth"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("LastReward") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("lastreward"); b.Property("PlatformUserId") - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("platformuserid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2107,21 +2165,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Status") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("status"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -2134,31 +2192,31 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Group") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasDefaultValue(0) .HasColumnName("group"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("LevelRequirement") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("levelrequirement"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -2175,53 +2233,53 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") + b.Property("AuthorId") + .HasColumnType("bigint unsigned") .HasColumnName("authorid"); b.Property("Command") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("command"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Index") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("index"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("Price") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("price"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("RoleName") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("rolename"); - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") + b.Property("RoleRequirement") + .HasColumnType("bigint unsigned") .HasColumnName("rolerequirement"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -2237,21 +2295,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("ShopEntryId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("shopentryid"); b.Property("Text") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("text"); b.HasKey("Id") @@ -2267,21 +2325,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.HasKey("Id") @@ -2297,21 +2355,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2327,25 +2385,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("RoleIds") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("roleids"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2362,29 +2420,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") + b.Property("ChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("channelid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("MessageId") - .HasColumnType("numeric(20,0)") + b.Property("MessageId") + .HasColumnType("bigint unsigned") .HasColumnName("messageid"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("Type") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("type"); b.HasKey("Id") @@ -2397,25 +2455,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("StreamRoleSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -2431,33 +2489,33 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") + b.Property("AddRoleId") + .HasColumnType("bigint unsigned") .HasColumnName("addroleid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Enabled") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("enabled"); - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") + b.Property("FromRoleId") + .HasColumnType("bigint unsigned") .HasColumnName("fromroleid"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("Keyword") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("keyword"); b.HasKey("Id") @@ -2474,25 +2532,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("StreamRoleSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("streamrolesettingsid"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Username") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("username"); b.HasKey("Id") @@ -2508,29 +2566,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("ArchiveId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("archiveid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("IsDone") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("isdone"); b.Property("Todo") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("todo"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2549,25 +2607,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2583,25 +2641,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("unmuteat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2617,29 +2675,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("unbanat"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -2655,29 +2713,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AwardedXp") .HasColumnType("bigint") .HasColumnName("awardedxp"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("NotifyOnLevelUp") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("notifyonlevelup"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Xp") @@ -2710,25 +2768,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") + b.Property("VoiceChannelId") + .HasColumnType("bigint unsigned") .HasColumnName("voicechannelid"); b.HasKey("Id") @@ -2744,21 +2802,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("AffinityId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("affinityid"); b.Property("ClaimerId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("claimerid"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Price") @@ -2766,7 +2824,7 @@ namespace EllieBot.Migrations.PostgreSql .HasColumnName("price"); b.Property("WaifuId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("waifuid"); b.HasKey("Id") @@ -2792,25 +2850,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("ItemEmoji") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("itememoji"); b.Property("Name") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("name"); b.Property("WaifuInfoId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("waifuinfoid"); b.HasKey("Id") @@ -2826,29 +2884,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("NewId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("newid"); b.Property("OldId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("oldid"); b.Property("UpdateType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("updatetype"); b.Property("UserId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("userid"); b.HasKey("Id") @@ -2870,37 +2928,37 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Forgiven") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("forgiven"); b.Property("ForgivenBy") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("forgivenby"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") + b.Property("GuildId") + .HasColumnType("bigint unsigned") .HasColumnName("guildid"); b.Property("Moderator") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("moderator"); b.Property("Reason") - .HasColumnType("text") + .HasColumnType("longtext") .HasColumnName("reason"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.Property("Weight") @@ -2928,40 +2986,40 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Count") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("count"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildConfigId") + .HasColumnType("int") + .HasColumnName("guildconfigid"); b.Property("Punishment") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("punishment"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("Time") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("time"); b.HasKey("Id") .HasName("pk_warningpunishment"); - b.HasAlternateKey("GuildId", "Count") - .HasName("ak_warningpunishment_guildid_count"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); b.ToTable("warningpunishment", (string)null); }); @@ -2970,25 +3028,25 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("Amount") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("amount"); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Level") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("level"); b.Property("XpSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xpsettingsid"); b.HasKey("Id") @@ -3004,29 +3062,29 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("Level") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("level"); b.Property("Remove") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("remove"); - b.Property("RoleId") - .HasColumnType("numeric(20,0)") + b.Property("RoleId") + .HasColumnType("bigint unsigned") .HasColumnName("roleid"); b.Property("XpSettingsId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("xpsettingsid"); b.HasKey("Id") @@ -3043,21 +3101,21 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("GuildConfigId") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("guildconfigid"); b.Property("ServerExcluded") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("serverexcluded"); b.HasKey("Id") @@ -3074,30 +3132,30 @@ namespace EllieBot.Migrations.PostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); b.Property("DateAdded") - .HasColumnType("timestamp without time zone") + .HasColumnType("datetime(6)") .HasColumnName("dateadded"); b.Property("IsUsing") - .HasColumnType("boolean") + .HasColumnType("tinyint(1)") .HasColumnName("isusing"); b.Property("ItemKey") .IsRequired() - .HasColumnType("text") + .HasColumnType("varchar(255)") .HasColumnName("itemkey"); b.Property("ItemType") - .HasColumnType("integer") + .HasColumnType("int") .HasColumnName("itemtype"); - b.Property("UserId") - .HasColumnType("numeric(20,0)") + b.Property("UserId") + .HasColumnType("bigint unsigned") .HasColumnName("userid"); b.HasKey("Id") @@ -3110,53 +3168,6 @@ namespace EllieBot.Migrations.PostgreSql 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) @@ -3483,7 +3494,7 @@ namespace EllieBot.Migrations.PostgreSql .HasForeignKey("StreamRoleSettingsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() - .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesett~"); + .HasConstraintName("fk_streamroleblacklisteduser_streamrolesettings_streamrolesetti~"); b.Navigation("StreamRoleSettings"); }); @@ -3507,7 +3518,7 @@ namespace EllieBot.Migrations.PostgreSql .HasForeignKey("StreamRoleSettingsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() - .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesett~"); + .HasConstraintName("fk_streamrolewhitelisteduser_streamrolesettings_streamrolesetti~"); b.Navigation("StreamRoleSettings"); }); @@ -3619,6 +3630,15 @@ namespace EllieBot.Migrations.PostgreSql b.Navigation("User"); }); + modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => { b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") @@ -3734,6 +3754,8 @@ namespace EllieBot.Migrations.PostgreSql b.Navigation("VcRoleInfos"); + b.Navigation("WarnPunishments"); + b.Navigation("XpSettings"); }); diff --git a/src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.cs b/src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.cs index 3e0cbc0..47fedf6 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220409170719_mysql-init.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220429044808_bank.cs b/src/EllieBot/Migrations/PostgreSql/20220429044808_bank.cs index 4f0a4a5..6d5cc67 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220429044808_bank.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220429044808_bank.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.cs b/src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.cs index 7185c09..237a0d8 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220504162457_new-rero.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.cs b/src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.cs index b8fcc2c..f8bb7b9 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220614071421_patronage-system.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.cs b/src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.cs index eed96a7..9cb7187 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220623090729_stondel-db-cache.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.cs b/src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.cs index 258dc4c..073f682 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220725155941_xpitemshop.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.cs b/src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.cs index 64f3334..4cd146c 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220808142559_remove-obsolete-xp-columns.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs b/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs index 177c650..9718e60 100644 --- a/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs +++ b/src/EllieBot/Migrations/PostgreSql/20220916194523_autopub.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable @@ -9,6 +10,12 @@ namespace EllieBot.Migrations.PostgreSql { protected override void Up(MigrationBuilder migrationBuilder) { + migrationBuilder.AddColumn( + name: "rolerequirement", + table: "shopentry", + type: "numeric(20,0)", + nullable: true); + migrationBuilder.CreateTable( name: "autopublishchannel", columns: table => new @@ -35,6 +42,10 @@ namespace EllieBot.Migrations.PostgreSql { migrationBuilder.DropTable( name: "autopublishchannel"); + + migrationBuilder.DropColumn( + name: "rolerequirement", + table: "shopentry"); } } } diff --git a/src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.cs b/src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.cs index 88c4b12..81dbd5b 100644 --- a/src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.cs +++ b/src/EllieBot/Migrations/PostgreSql/20221003175752_gambling-stats.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20240502233202_v5.cs b/src/EllieBot/Migrations/PostgreSql/20240502233202_v5.cs index 943e959..d3629d8 100644 --- a/src/EllieBot/Migrations/PostgreSql/20240502233202_v5.cs +++ b/src/EllieBot/Migrations/PostgreSql/20240502233202_v5.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.cs b/src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.cs index a6a4994..b22df63 100644 --- a/src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.cs +++ b/src/EllieBot/Migrations/PostgreSql/20240518221432_guidlconfig-cleanup.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.Designer.cs index 471ac16..b0380ea 100644 --- a/src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.Designer.cs +++ b/src/EllieBot/Migrations/PostgreSql/20240627033522_honeypot.Designer.cs @@ -3795,4 +3795,4 @@ namespace EllieBot.Migrations.PostgreSql #pragma warning restore 612, 618 } } -} +} \ No newline at end of file diff --git a/src/EllieBot/Migrations/PostgreSql/20240912124719_greet-settings.cs b/src/EllieBot/Migrations/PostgreSql/20240912124719_greet-settings.cs deleted file mode 100644 index 1b4dd19..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20240912124719_greet-settings.cs +++ /dev/null @@ -1,199 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - /// - public partial class greetsettings : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "greetsettings", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", - NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - greettype = table.Column(type: "integer", nullable: false), - messagetext = table.Column(type: "text", nullable: true), - isenabled = table.Column(type: "boolean", nullable: false, defaultValue: false), - channelid = table.Column(type: "numeric(20,0)", nullable: true), - autodeletetimer = table.Column(type: "integer", nullable: false, defaultValue: 0) - }, - constraints: table => - { - table.PrimaryKey("pk_greetsettings", x => x.id); - }); - - migrationBuilder.CreateIndex( - name: "ix_greetsettings_guildid_greettype", - table: "greetsettings", - columns: new[] { "guildid", "greettype" }, - unique: true); - - MigrationQueries.GreetSettingsCopy(migrationBuilder); - - migrationBuilder.DropColumn( - name: "autodeletebyemessagestimer", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "autodeletegreetmessagestimer", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "boostmessage", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "boostmessagechannelid", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "boostmessagedeleteafter", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "byemessagechannelid", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "channelbyemessagetext", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "channelgreetmessagetext", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "dmgreetmessagetext", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "greetmessagechannelid", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "sendboostmessage", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "sendchannelbyemessage", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "sendchannelgreetmessage", - table: "guildconfigs"); - - migrationBuilder.DropColumn( - name: "senddmgreetmessage", - table: "guildconfigs"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "greetsettings"); - - migrationBuilder.AddColumn( - name: "autodeletebyemessagestimer", - table: "guildconfigs", - type: "integer", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "autodeletegreetmessagestimer", - table: "guildconfigs", - type: "integer", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "boostmessage", - table: "guildconfigs", - type: "text", - nullable: true); - - migrationBuilder.AddColumn( - name: "boostmessagechannelid", - table: "guildconfigs", - type: "numeric(20,0)", - nullable: false, - defaultValue: 0m); - - migrationBuilder.AddColumn( - name: "boostmessagedeleteafter", - table: "guildconfigs", - type: "integer", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "byemessagechannelid", - table: "guildconfigs", - type: "numeric(20,0)", - nullable: false, - defaultValue: 0m); - - migrationBuilder.AddColumn( - name: "channelbyemessagetext", - table: "guildconfigs", - type: "text", - nullable: true); - - migrationBuilder.AddColumn( - name: "channelgreetmessagetext", - table: "guildconfigs", - type: "text", - nullable: true); - - migrationBuilder.AddColumn( - name: "dmgreetmessagetext", - table: "guildconfigs", - type: "text", - nullable: true); - - migrationBuilder.AddColumn( - name: "greetmessagechannelid", - table: "guildconfigs", - type: "numeric(20,0)", - nullable: false, - defaultValue: 0m); - - migrationBuilder.AddColumn( - name: "sendboostmessage", - table: "guildconfigs", - type: "boolean", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "sendchannelbyemessage", - table: "guildconfigs", - type: "boolean", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "sendchannelgreetmessage", - table: "guildconfigs", - type: "boolean", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "senddmgreetmessage", - table: "guildconfigs", - type: "boolean", - nullable: false, - defaultValue: false); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Migrations/PostgreSql/20241018004623_warn-split.cs b/src/EllieBot/Migrations/PostgreSql/20241018004623_warn-split.cs deleted file mode 100644 index cde80a2..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20241018004623_warn-split.cs +++ /dev/null @@ -1,71 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - /// - public partial class warnsplit : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "guildid", - table: "warningpunishment", - type: "numeric(20,0)", - nullable: false, - defaultValue: 0m); - - MigrationQueries.AddGuildIdsToWarningPunishment(migrationBuilder); - - migrationBuilder.DropForeignKey( - name: "fk_warningpunishment_guildconfigs_guildconfigid", - table: "warningpunishment"); - - migrationBuilder.DropIndex( - name: "ix_warningpunishment_guildconfigid", - table: "warningpunishment"); - - migrationBuilder.DropColumn( - name: "guildconfigid", - table: "warningpunishment"); - - migrationBuilder.AddUniqueConstraint( - name: "ak_warningpunishment_guildid_count", - table: "warningpunishment", - columns: new[] { "guildid", "count" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropUniqueConstraint( - name: "ak_warningpunishment_guildid_count", - table: "warningpunishment"); - - migrationBuilder.DropColumn( - name: "guildid", - table: "warningpunishment"); - - migrationBuilder.AddColumn( - name: "guildconfigid", - table: "warningpunishment", - type: "integer", - nullable: true); - - migrationBuilder.CreateIndex( - name: "ix_warningpunishment_guildconfigid", - table: "warningpunishment", - column: "guildconfigid"); - - migrationBuilder.AddForeignKey( - name: "fk_warningpunishment_guildconfigs_guildconfigid", - table: "warningpunishment", - column: "guildconfigid", - principalTable: "guildconfigs", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Migrations/PostgreSql/20241028033704_ncanvas.cs b/src/EllieBot/Migrations/PostgreSql/20241028033704_ncanvas.cs deleted file mode 100644 index 0a1a175..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20241028033704_ncanvas.cs +++ /dev/null @@ -1,54 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - /// - public partial class ncanvas : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "ncpixel", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - position = table.Column(type: "integer", nullable: false), - price = table.Column(type: "bigint", nullable: false), - ownerid = table.Column(type: "numeric(20,0)", nullable: false), - color = table.Column(type: "bigint", nullable: false), - text = table.Column(type: "character varying(256)", maxLength: 256, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_ncpixel", x => x.id); - table.UniqueConstraint("ak_ncpixel_position", x => x.position); - }); - - migrationBuilder.CreateIndex( - name: "ix_discorduser_username", - table: "discorduser", - column: "username"); - - migrationBuilder.CreateIndex( - name: "ix_ncpixel_ownerid", - table: "ncpixel", - column: "ownerid"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "ncpixel"); - - migrationBuilder.DropIndex( - name: "ix_discorduser_username", - table: "discorduser"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20241102022956_no-discrim-and-flag-translate.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20241102022956_no-discrim-and-flag-translate.Designer.cs deleted file mode 100644 index 8109046..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20241102022956_no-discrim-and-flag-translate.Designer.cs +++ /dev/null @@ -1,3851 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - [DbContext(typeof(PostgreSqlContext))] - [Migration("20241102022956_no-discrim-and-flag-translate")] - partial class nodiscrimandflagtranslate - { - /// - 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.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.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AllowTarget") - .HasColumnType("boolean") - .HasColumnName("allowtarget"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("boolean") - .HasColumnName("autodeletetrigger"); - - b.Property("ContainsAnywhere") - .HasColumnType("boolean") - .HasColumnName("containsanywhere"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("DmResponse") - .HasColumnType("boolean") - .HasColumnName("dmresponse"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Reactions") - .HasColumnType("text") - .HasColumnName("reactions"); - - b.Property("Response") - .HasColumnType("text") - .HasColumnName("response"); - - b.Property("Trigger") - .HasColumnType("text") - .HasColumnName("trigger"); - - b.HasKey("Id") - .HasName("pk_expressions"); - - b.ToTable("expressions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("AmountCents") - .HasColumnType("integer") - .HasColumnName("amountcents"); - - b.Property("LastCharge") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastcharge"); - - b.Property("UniquePlatformUserId") - .HasColumnType("text") - .HasColumnName("uniqueplatformuserid"); - - b.Property("ValidThru") - .HasColumnType("timestamp without time zone") - .HasColumnName("validthru"); - - b.HasKey("UserId") - .HasName("pk_patrons"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique() - .HasDatabaseName("ix_patrons_uniqueplatformuserid"); - - b.ToTable("patrons", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("IsCustomCommand") - .HasColumnType("boolean") - .HasColumnName("iscustomcommand"); - - b.Property("PrimaryTarget") - .HasColumnType("integer") - .HasColumnName("primarytarget"); - - b.Property("PrimaryTargetId") - .HasColumnType("numeric(20,0)") - .HasColumnName("primarytargetid"); - - b.Property("SecondaryTarget") - .HasColumnType("integer") - .HasColumnName("secondarytarget"); - - b.Property("SecondaryTargetName") - .HasColumnType("text") - .HasColumnName("secondarytargetname"); - - b.Property("State") - .HasColumnType("boolean") - .HasColumnName("state"); - - b.HasKey("Id") - .HasName("pk_permissions"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_permissions_guildconfigid"); - - b.ToTable("permissions", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Amount") - .HasColumnType("bigint") - .HasColumnName("amount"); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Password") - .HasColumnType("text") - .HasColumnName("password"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_plantedcurrency"); - - b.HasIndex("ChannelId") - .HasDatabaseName("ix_plantedcurrency_channelid"); - - b.HasIndex("MessageId") - .IsUnique() - .HasDatabaseName("ix_plantedcurrency_messageid"); - - b.ToTable("plantedcurrency", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MusicPlaylistId") - .HasColumnType("integer") - .HasColumnName("musicplaylistid"); - - b.Property("Provider") - .HasColumnType("text") - .HasColumnName("provider"); - - b.Property("ProviderType") - .HasColumnType("integer") - .HasColumnName("providertype"); - - b.Property("Query") - .HasColumnType("text") - .HasColumnName("query"); - - b.Property("Title") - .HasColumnType("text") - .HasColumnName("title"); - - b.Property("Uri") - .HasColumnType("text") - .HasColumnName("uri"); - - b.HasKey("Id") - .HasName("pk_playlistsong"); - - b.HasIndex("MusicPlaylistId") - .HasDatabaseName("ix_playlistsong_musicplaylistid"); - - b.ToTable("playlistsong", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("authorname"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("text") - .HasColumnName("keyword"); - - b.Property("Text") - .IsRequired() - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_quotes"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_quotes_guildid"); - - b.HasIndex("Keyword") - .HasDatabaseName("ix_quotes_keyword"); - - b.ToTable("quotes", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("emote"); - - b.Property("Group") - .HasColumnType("integer") - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelReq") - .HasColumnType("integer") - .HasColumnName("levelreq"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_reactionroles"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_reactionroles_guildid"); - - b.HasIndex("MessageId", "Emote") - .IsUnique() - .HasDatabaseName("ix_reactionroles_messageid_emote"); - - b.ToTable("reactionroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsPrivate") - .HasColumnType("boolean") - .HasColumnName("isprivate"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("ServerId") - .HasColumnType("numeric(20,0)") - .HasColumnName("serverid"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("When") - .HasColumnType("timestamp without time zone") - .HasColumnName("when"); - - b.HasKey("Id") - .HasName("pk_reminders"); - - b.HasIndex("When") - .HasDatabaseName("ix_reminders_when"); - - b.ToTable("reminders", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Interval") - .HasColumnType("interval") - .HasColumnName("interval"); - - b.Property("LastMessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("lastmessageid"); - - b.Property("Message") - .HasColumnType("text") - .HasColumnName("message"); - - b.Property("NoRedundant") - .HasColumnType("boolean") - .HasColumnName("noredundant"); - - b.Property("StartTimeOfDay") - .HasColumnType("interval") - .HasColumnName("starttimeofday"); - - b.HasKey("Id") - .HasName("pk_repeaters"); - - b.ToTable("repeaters", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("bigint") - .HasColumnName("amountrewardedthismonth"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("LastReward") - .HasColumnType("timestamp without time zone") - .HasColumnName("lastreward"); - - b.Property("PlatformUserId") - .HasColumnType("text") - .HasColumnName("platformuserid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_rewardedusers"); - - b.HasIndex("PlatformUserId") - .IsUnique() - .HasDatabaseName("ix_rewardedusers_platformuserid"); - - b.ToTable("rewardedusers", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Status") - .HasColumnType("text") - .HasColumnName("status"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_rotatingstatus"); - - b.ToTable("rotatingstatus", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("group"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("LevelRequirement") - .HasColumnType("integer") - .HasColumnName("levelrequirement"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_selfassignableroles"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique() - .HasDatabaseName("ix_selfassignableroles_guildid_roleid"); - - b.ToTable("selfassignableroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AuthorId") - .HasColumnType("numeric(20,0)") - .HasColumnName("authorid"); - - b.Property("Command") - .HasColumnType("text") - .HasColumnName("command"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Index") - .HasColumnType("integer") - .HasColumnName("index"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Price") - .HasColumnType("integer") - .HasColumnName("price"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("RoleName") - .HasColumnType("text") - .HasColumnName("rolename"); - - b.Property("RoleRequirement") - .HasColumnType("numeric(20,0)") - .HasColumnName("rolerequirement"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_shopentry"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_shopentry_guildconfigid"); - - b.ToTable("shopentry", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ShopEntryId") - .HasColumnType("integer") - .HasColumnName("shopentryid"); - - b.Property("Text") - .HasColumnType("text") - .HasColumnName("text"); - - b.HasKey("Id") - .HasName("pk_shopentryitem"); - - b.HasIndex("ShopEntryId") - .HasDatabaseName("ix_shopentryitem_shopentryid"); - - b.ToTable("shopentryitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoredrole"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoredrole_guildconfigid"); - - b.ToTable("slowmodeignoredrole", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_slowmodeignoreduser"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_slowmodeignoreduser_guildconfigid"); - - b.ToTable("slowmodeignoreduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("RoleIds") - .HasColumnType("text") - .HasColumnName("roleids"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_stickyroles"); - - b.HasIndex("GuildId", "UserId") - .IsUnique() - .HasDatabaseName("ix_stickyroles_guildid_userid"); - - b.ToTable("stickyroles", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("channelid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("MessageId") - .HasColumnType("numeric(20,0)") - .HasColumnName("messageid"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.HasKey("Id") - .HasName("pk_streamonlinemessages"); - - b.ToTable("streamonlinemessages", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamroleblacklisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamroleblacklisteduser_streamrolesettingsid"); - - b.ToTable("streamroleblacklisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AddRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("addroleid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Enabled") - .HasColumnType("boolean") - .HasColumnName("enabled"); - - b.Property("FromRoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("fromroleid"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("Keyword") - .HasColumnType("text") - .HasColumnName("keyword"); - - b.HasKey("Id") - .HasName("pk_streamrolesettings"); - - b.HasIndex("GuildConfigId") - .IsUnique() - .HasDatabaseName("ix_streamrolesettings_guildconfigid"); - - b.ToTable("streamrolesettings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("integer") - .HasColumnName("streamrolesettingsid"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Username") - .HasColumnType("text") - .HasColumnName("username"); - - b.HasKey("Id") - .HasName("pk_streamrolewhitelisteduser"); - - b.HasIndex("StreamRoleSettingsId") - .HasDatabaseName("ix_streamrolewhitelisteduser_streamrolesettingsid"); - - b.ToTable("streamrolewhitelisteduser", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ArchiveId") - .HasColumnType("integer") - .HasColumnName("archiveid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("IsDone") - .HasColumnType("boolean") - .HasColumnName("isdone"); - - b.Property("Todo") - .HasColumnType("text") - .HasColumnName("todo"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_todos"); - - b.HasIndex("ArchiveId") - .HasDatabaseName("ix_todos_archiveid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_todos_userid"); - - b.ToTable("todos", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unbantimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unbantimer_guildconfigid"); - - b.ToTable("unbantimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("UnmuteAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unmuteat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unmutetimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unmutetimer_guildconfigid"); - - b.ToTable("unmutetimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("UnbanAt") - .HasColumnType("timestamp without time zone") - .HasColumnName("unbanat"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_unroletimer"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_unroletimer_guildconfigid"); - - b.ToTable("unroletimer", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AwardedXp") - .HasColumnType("bigint") - .HasColumnName("awardedxp"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("integer") - .HasColumnName("notifyonlevelup"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Xp") - .HasColumnType("bigint") - .HasColumnName("xp"); - - b.HasKey("Id") - .HasName("pk_userxpstats"); - - b.HasIndex("AwardedXp") - .HasDatabaseName("ix_userxpstats_awardedxp"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_userxpstats_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_userxpstats_userid"); - - b.HasIndex("Xp") - .HasDatabaseName("ix_userxpstats_xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique() - .HasDatabaseName("ix_userxpstats_userid_guildid"); - - b.ToTable("userxpstats", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("GuildConfigId") - .HasColumnType("integer") - .HasColumnName("guildconfigid"); - - b.Property("RoleId") - .HasColumnType("numeric(20,0)") - .HasColumnName("roleid"); - - b.Property("VoiceChannelId") - .HasColumnType("numeric(20,0)") - .HasColumnName("voicechannelid"); - - b.HasKey("Id") - .HasName("pk_vcroleinfo"); - - b.HasIndex("GuildConfigId") - .HasDatabaseName("ix_vcroleinfo_guildconfigid"); - - b.ToTable("vcroleinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("AffinityId") - .HasColumnType("integer") - .HasColumnName("affinityid"); - - b.Property("ClaimerId") - .HasColumnType("integer") - .HasColumnName("claimerid"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); - - b.Property("WaifuId") - .HasColumnType("integer") - .HasColumnName("waifuid"); - - b.HasKey("Id") - .HasName("pk_waifuinfo"); - - b.HasIndex("AffinityId") - .HasDatabaseName("ix_waifuinfo_affinityid"); - - b.HasIndex("ClaimerId") - .HasDatabaseName("ix_waifuinfo_claimerid"); - - b.HasIndex("Price") - .HasDatabaseName("ix_waifuinfo_price"); - - b.HasIndex("WaifuId") - .IsUnique() - .HasDatabaseName("ix_waifuinfo_waifuid"); - - b.ToTable("waifuinfo", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("ItemEmoji") - .HasColumnType("text") - .HasColumnName("itememoji"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.Property("WaifuInfoId") - .HasColumnType("integer") - .HasColumnName("waifuinfoid"); - - b.HasKey("Id") - .HasName("pk_waifuitem"); - - b.HasIndex("WaifuInfoId") - .HasDatabaseName("ix_waifuitem_waifuinfoid"); - - b.ToTable("waifuitem", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("NewId") - .HasColumnType("integer") - .HasColumnName("newid"); - - b.Property("OldId") - .HasColumnType("integer") - .HasColumnName("oldid"); - - b.Property("UpdateType") - .HasColumnType("integer") - .HasColumnName("updatetype"); - - b.Property("UserId") - .HasColumnType("integer") - .HasColumnName("userid"); - - b.HasKey("Id") - .HasName("pk_waifuupdates"); - - b.HasIndex("NewId") - .HasDatabaseName("ix_waifuupdates_newid"); - - b.HasIndex("OldId") - .HasDatabaseName("ix_waifuupdates_oldid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_waifuupdates_userid"); - - b.ToTable("waifuupdates", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("Forgiven") - .HasColumnType("boolean") - .HasColumnName("forgiven"); - - b.Property("ForgivenBy") - .HasColumnType("text") - .HasColumnName("forgivenby"); - - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); - - b.Property("Moderator") - .HasColumnType("text") - .HasColumnName("moderator"); - - b.Property("Reason") - .HasColumnType("text") - .HasColumnName("reason"); - - b.Property("UserId") - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("bigint") - .HasDefaultValue(1L) - .HasColumnName("weight"); - - b.HasKey("Id") - .HasName("pk_warnings"); - - b.HasIndex("DateAdded") - .HasDatabaseName("ix_warnings_dateadded"); - - b.HasIndex("GuildId") - .HasDatabaseName("ix_warnings_guildid"); - - b.HasIndex("UserId") - .HasDatabaseName("ix_warnings_userid"); - - b.ToTable("warnings", (string)null); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("integer") - .HasColumnName("count"); - - b.Property("DateAdded") - .HasColumnType("timestamp without time zone") - .HasColumnName("dateadded"); - - b.Property("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"); - }); - - 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/20241102022956_no-discrim-and-flag-translate.cs b/src/EllieBot/Migrations/PostgreSql/20241102022956_no-discrim-and-flag-translate.cs deleted file mode 100644 index ca32adb..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20241102022956_no-discrim-and-flag-translate.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - /// - public partial class nodiscrimandflagtranslate : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - MigrationQueries.UpdateUsernames(migrationBuilder); - - migrationBuilder.DropColumn( - name: "discriminator", - table: "discorduser"); - - migrationBuilder.CreateTable( - name: "flagtranslatechannel", - columns: table => new - { - id = table.Column(type: "integer", nullable: false) - .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), - guildid = table.Column(type: "numeric(20,0)", nullable: false), - channelid = table.Column(type: "numeric(20,0)", nullable: false), - dateadded = table.Column(type: "timestamp without time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_flagtranslatechannel", x => x.id); - }); - - migrationBuilder.CreateIndex( - name: "ix_flagtranslatechannel_guildid_channelid", - table: "flagtranslatechannel", - columns: new[] { "guildid", "channelid" }, - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "flagtranslatechannel"); - - migrationBuilder.AddColumn( - name: "discriminator", - table: "discorduser", - type: "text", - nullable: true); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/20241105024753_betstats.cs b/src/EllieBot/Migrations/PostgreSql/20241105024753_betstats.cs deleted file mode 100644 index 91a9dde..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20241105024753_betstats.cs +++ /dev/null @@ -1,48 +0,0 @@ -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/20241107051622_rakeback.Designer.cs b/src/EllieBot/Migrations/PostgreSql/20241107051622_rakeback.Designer.cs deleted file mode 100644 index 013b589..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20241107051622_rakeback.Designer.cs +++ /dev/null @@ -1,3919 +0,0 @@ -// -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("20241107051622_rakeback")] - partial class rakeback - { - /// - 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.Rakeback", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.HasKey("UserId") - .HasName("pk_rakeback"); - - b.ToTable("rakeback", (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/20241107051622_rakeback.cs b/src/EllieBot/Migrations/PostgreSql/20241107051622_rakeback.cs deleted file mode 100644 index 0781acb..0000000 --- a/src/EllieBot/Migrations/PostgreSql/20241107051622_rakeback.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations.PostgreSql -{ - /// - public partial class rakeback : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "rakeback", - columns: table => new - { - userid = table.Column(type: "numeric(20,0)", nullable: false), - amount = table.Column(type: "numeric", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_rakeback", x => x.userid); - }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "rakeback"); - } - } -} diff --git a/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs b/src/EllieBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs index d7e5362..bb87c9c 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 @@ -17,7 +17,7 @@ namespace EllieBot.Migrations.PostgreSql { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.8") + .HasAnnotation("ProductVersion", "8.0.4") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); @@ -751,6 +751,10 @@ namespace EllieBot.Migrations.PostgreSql .HasColumnType("timestamp without time zone") .HasColumnName("dateadded"); + b.Property("Discriminator") + .HasColumnType("text") + .HasColumnName("discriminator"); + b.Property("IsClubAdmin") .ValueGeneratedOnAdd() .HasColumnType("boolean") @@ -795,63 +799,9 @@ namespace EllieBot.Migrations.PostgreSql 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") @@ -1045,37 +995,6 @@ namespace EllieBot.Migrations.PostgreSql 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") @@ -1301,10 +1220,42 @@ namespace EllieBot.Migrations.PostgreSql .HasColumnType("text") .HasColumnName("autoassignroleids"); + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("integer") + .HasColumnName("autodeletebyemessagestimer"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("integer") + .HasColumnName("autodeletegreetmessagestimer"); + b.Property("AutoDeleteSelfAssignedRoleMessages") .HasColumnType("boolean") .HasColumnName("autodeleteselfassignedrolemessages"); + b.Property("BoostMessage") + .HasColumnType("text") + .HasColumnName("boostmessage"); + + b.Property("BoostMessageChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("boostmessagechannelid"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("integer") + .HasColumnName("boostmessagedeleteafter"); + + b.Property("ByeMessageChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("byemessagechannelid"); + + b.Property("ChannelByeMessageText") + .HasColumnType("text") + .HasColumnName("channelbyemessagetext"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("text") + .HasColumnName("channelgreetmessagetext"); + b.Property("CleverbotEnabled") .HasColumnType("boolean") .HasColumnName("cleverbotenabled"); @@ -1325,6 +1276,10 @@ namespace EllieBot.Migrations.PostgreSql .HasColumnType("boolean") .HasColumnName("disableglobalexpressions"); + b.Property("DmGreetMessageText") + .HasColumnType("text") + .HasColumnName("dmgreetmessagetext"); + b.Property("ExclusiveSelfAssignedRoles") .HasColumnType("boolean") .HasColumnName("exclusiveselfassignedroles"); @@ -1345,6 +1300,10 @@ namespace EllieBot.Migrations.PostgreSql .HasColumnType("numeric(20,0)") .HasColumnName("gamevoicechannel"); + b.Property("GreetMessageChannelId") + .HasColumnType("numeric(20,0)") + .HasColumnName("greetmessagechannelid"); + b.Property("GuildId") .HasColumnType("numeric(20,0)") .HasColumnName("guildid"); @@ -1369,6 +1328,22 @@ namespace EllieBot.Migrations.PostgreSql .HasColumnType("text") .HasColumnName("prefix"); + b.Property("SendBoostMessage") + .HasColumnType("boolean") + .HasColumnName("sendboostmessage"); + + b.Property("SendChannelByeMessage") + .HasColumnType("boolean") + .HasColumnName("sendchannelbyemessage"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("boolean") + .HasColumnName("sendchannelgreetmessage"); + + b.Property("SendDmGreetMessage") + .HasColumnType("boolean") + .HasColumnName("senddmgreetmessage"); + b.Property("StickyRoles") .HasColumnType("boolean") .HasColumnName("stickyroles"); @@ -1708,7 +1683,7 @@ namespace EllieBot.Migrations.PostgreSql b.ToTable("muteduserid", (string)null); }); - modelBuilder.Entity("EllieBot.Db.Models.NCPixel", b => + modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -1717,38 +1692,46 @@ namespace EllieBot.Migrations.PostgreSql NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("Color") - .HasColumnType("bigint") - .HasColumnName("color"); + b.Property("AllowTarget") + .HasColumnType("boolean") + .HasColumnName("allowtarget"); - b.Property("OwnerId") + 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("ownerid"); + .HasColumnName("guildid"); - b.Property("Position") - .HasColumnType("integer") - .HasColumnName("position"); + b.Property("Reactions") + .HasColumnType("text") + .HasColumnName("reactions"); - b.Property("Price") - .HasColumnType("bigint") - .HasColumnName("price"); + b.Property("Response") + .HasColumnType("text") + .HasColumnName("response"); - b.Property("Text") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("text"); + b.Property("Trigger") + .HasColumnType("text") + .HasColumnName("trigger"); b.HasKey("Id") - .HasName("pk_ncpixel"); + .HasName("pk_expressions"); - b.HasAlternateKey("Position") - .HasName("ak_ncpixel_position"); - - b.HasIndex("OwnerId") - .HasDatabaseName("ix_ncpixel_ownerid"); - - b.ToTable("ncpixel", (string)null); + b.ToTable("expressions", (string)null); }); modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => @@ -3011,9 +2994,9 @@ namespace EllieBot.Migrations.PostgreSql .HasColumnType("timestamp without time zone") .HasColumnName("dateadded"); - b.Property("GuildId") - .HasColumnType("numeric(20,0)") - .HasColumnName("guildid"); + b.Property("GuildConfigId") + .HasColumnType("integer") + .HasColumnName("guildconfigid"); b.Property("Punishment") .HasColumnType("integer") @@ -3030,8 +3013,8 @@ namespace EllieBot.Migrations.PostgreSql b.HasKey("Id") .HasName("pk_warningpunishment"); - b.HasAlternateKey("GuildId", "Count") - .HasName("ak_warningpunishment_guildid_count"); + b.HasIndex("GuildConfigId") + .HasDatabaseName("ix_warningpunishment_guildconfigid"); b.ToTable("warningpunishment", (string)null); }); @@ -3180,121 +3163,6 @@ namespace EllieBot.Migrations.PostgreSql 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.Rakeback", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("numeric(20,0)") - .HasColumnName("userid"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.HasKey("UserId") - .HasName("pk_rakeback"); - - b.ToTable("rakeback", (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) @@ -3757,6 +3625,15 @@ namespace EllieBot.Migrations.PostgreSql b.Navigation("User"); }); + modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_warningpunishment_guildconfigs_guildconfigid"); + }); + modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => { b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") @@ -3872,6 +3749,8 @@ namespace EllieBot.Migrations.PostgreSql b.Navigation("VcRoleInfos"); + b.Navigation("WarnPunishments"); + b.Navigation("XpSettings"); }); diff --git a/src/EllieBot/Migrations/Sqlite/20210621042359_squash.cs b/src/EllieBot/Migrations/Sqlite/20210621042359_squash.cs index 4273df4..c54a634 100644 --- a/src/EllieBot/Migrations/Sqlite/20210621042359_squash.cs +++ b/src/EllieBot/Migrations/Sqlite/20210621042359_squash.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; namespace EllieBot.Migrations { diff --git a/src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.cs b/src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.cs index 1d2dc92..b9cea6d 100644 --- a/src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.cs +++ b/src/EllieBot/Migrations/Sqlite/20210707002343_cleanup.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; namespace EllieBot.Migrations { diff --git a/src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.cs b/src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.cs index 5dfbf73..3e1ca4a 100644 --- a/src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.cs +++ b/src/EllieBot/Migrations/Sqlite/20210914180026_image-only-channels.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; namespace EllieBot.Migrations { diff --git a/src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.cs b/src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.cs index 760e27f..b1f5b4f 100644 --- a/src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.cs +++ b/src/EllieBot/Migrations/Sqlite/20211015232708_nsfw-blacklist-tags.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; namespace EllieBot.Migrations { diff --git a/src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.cs b/src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.cs index bb7df2b..c602c24 100644 --- a/src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.cs +++ b/src/EllieBot/Migrations/Sqlite/20211213145407_atl-rework.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; namespace EllieBot.Migrations { diff --git a/src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.cs b/src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.cs index 0920046..f247be4 100644 --- a/src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.cs +++ b/src/EllieBot/Migrations/Sqlite/20220110105942_filter-settings-cleanup.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.cs b/src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.cs index 1dc81f7..3c863ab 100644 --- a/src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.cs +++ b/src/EllieBot/Migrations/Sqlite/20220409170828_clubs-refactor.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220428051304_bank.cs b/src/EllieBot/Migrations/Sqlite/20220428051304_bank.cs index b3efa7e..3ac27ac 100644 --- a/src/EllieBot/Migrations/Sqlite/20220428051304_bank.cs +++ b/src/EllieBot/Migrations/Sqlite/20220428051304_bank.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.cs b/src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.cs index dce2e4b..acb4e12 100644 --- a/src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.cs +++ b/src/EllieBot/Migrations/Sqlite/20220503234243_new-rero.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.cs b/src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.cs index fd1100f..b752b3c 100644 --- a/src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.cs +++ b/src/EllieBot/Migrations/Sqlite/20220614071359_patronage-system.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.cs b/src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.cs index efce911..06eb71d 100644 --- a/src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.cs +++ b/src/EllieBot/Migrations/Sqlite/20220623073903_stondel-db-cache.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.cs b/src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.cs index ef8d9c4..84d2b74 100644 --- a/src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.cs +++ b/src/EllieBot/Migrations/Sqlite/20220725112348_xpitemshop.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.cs b/src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.cs index 8ef5757..c26f711 100644 --- a/src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.cs +++ b/src/EllieBot/Migrations/Sqlite/20220808141842_remove-obsolete-xp-columns.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20220916191702_autopub.cs b/src/EllieBot/Migrations/Sqlite/20220916191702_autopub.cs index f3d98db..d974254 100644 --- a/src/EllieBot/Migrations/Sqlite/20220916191702_autopub.cs +++ b/src/EllieBot/Migrations/Sqlite/20220916191702_autopub.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.cs b/src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.cs index 6ebf812..cdff8c1 100644 --- a/src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.cs +++ b/src/EllieBot/Migrations/Sqlite/20221003111019_gambling-stats.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20240502233144_v5.cs b/src/EllieBot/Migrations/Sqlite/20240502233144_v5.cs index da4fdd7..c6f46b5 100644 --- a/src/EllieBot/Migrations/Sqlite/20240502233144_v5.cs +++ b/src/EllieBot/Migrations/Sqlite/20240502233144_v5.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.cs b/src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.cs index 33418e2..cc33c61 100644 --- a/src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.cs +++ b/src/EllieBot/Migrations/Sqlite/20240518221424_guidlconfig-cleanup.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using System; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/src/EllieBot/Migrations/Sqlite/20240912124710_greet-settings.Designer.cs b/src/EllieBot/Migrations/Sqlite/20240912124710_greet-settings.Designer.cs deleted file mode 100644 index a7edabe..0000000 --- a/src/EllieBot/Migrations/Sqlite/20240912124710_greet-settings.Designer.cs +++ /dev/null @@ -1,2929 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20240912124710_greet-settings")] - partial class greetsettings - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.8"); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("TodosArchive"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("AutoPublishChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Bet") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("PaidOut") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Feature") - .IsUnique(); - - b.ToTable("GamblingStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("EndsAt") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("GiveawayModel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("GiveawayId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique(); - - b.ToTable("GiveawayUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("INTEGER"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("StickyRoles") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("GuildId"); - - b.ToTable("HoneyPotChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadDeletedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("RoleIds") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "UserId") - .IsUnique(); - - b.ToTable("StickyRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ArchiveId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsDone") - .HasColumnType("INTEGER"); - - b.Property("Todo") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ArchiveId"); - - b.HasIndex("UserId"); - - b.ToTable("Todos"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Punishment") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("Time") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("WarningPunishment"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("XpCurrencyReward"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Level") - .HasColumnType("INTEGER"); - - b.Property("Remove") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId", "Level") - .IsUnique(); - - b.ToTable("XpRoleReward"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("ServerExcluded") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpShopOwnedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsUsing") - .HasColumnType("INTEGER"); - - b.Property("ItemKey") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId", "ItemType", "ItemKey") - .IsUnique(); - - b.ToTable("XpShopOwnedItem"); - }); - - modelBuilder.Entity("EllieBot.Services.GreetSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTimer") - .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"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("ExclusionList") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("FeedSubs") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterInvitesChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterLinksChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilterWordsChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FilteredWords") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("FollowedStreams") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("GenerateCurrencyChannelIds") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.HasOne("EllieBot.Db.Models.GiveawayModel", null) - .WithMany("Participants") - .HasForeignKey("GiveawayId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithMany("SelfAssignableRoleGroupNames") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.HasOne("EllieBot.Db.Models.LogSetting", "LogSetting") - .WithMany("LogIgnores") - .HasForeignKey("LogSettingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("LogSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("MutedUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("Permissions") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.HasOne("EllieBot.Db.Models.MusicPlaylist", null) - .WithMany("Songs") - .HasForeignKey("MusicPlaylistId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("ShopEntries") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.HasOne("EllieBot.Db.Models.ShopEntry", null) - .WithMany("Items") - .HasForeignKey("ShopEntryId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredRoles") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("SlowmodeIgnoredUsers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Blacklist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("StreamRole") - .HasForeignKey("EllieBot.Db.Models.StreamRoleSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.HasOne("EllieBot.Db.Models.StreamRoleSettings", "StreamRoleSettings") - .WithMany("Whitelist") - .HasForeignKey("StreamRoleSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.HasOne("EllieBot.Db.Models.ArchivedTodoListModel", null) - .WithMany("Items") - .HasForeignKey("ArchiveId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnbanTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnmuteTimers") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("UnroleTimer") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("VcRoleInfos") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "Affinity") - .WithMany() - .HasForeignKey("AffinityId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Claimer") - .WithMany() - .HasForeignKey("ClaimerId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Waifu") - .WithOne() - .HasForeignKey("EllieBot.Db.Models.WaifuInfo", "WaifuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Affinity"); - - b.Navigation("Claimer"); - - b.Navigation("Waifu"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.HasOne("EllieBot.Db.Models.WaifuInfo", "WaifuInfo") - .WithMany("Items") - .HasForeignKey("WaifuInfoId"); - - b.Navigation("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.HasOne("EllieBot.Db.Models.DiscordUser", "New") - .WithMany() - .HasForeignKey("NewId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "Old") - .WithMany() - .HasForeignKey("OldId"); - - b.HasOne("EllieBot.Db.Models.DiscordUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("New"); - - b.Navigation("Old"); - - b.Navigation("User"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", null) - .WithMany("WarnPunishments") - .HasForeignKey("GuildConfigId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("CurrencyRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpRoleReward", b => - { - b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") - .WithMany("RoleRewards") - .HasForeignKey("XpSettingsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.HasOne("EllieBot.Db.Models.GuildConfig", "GuildConfig") - .WithOne("XpSettings") - .HasForeignKey("EllieBot.Db.Models.XpSettings", "GuildConfigId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GuildConfig"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Navigation("IgnoredChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Navigation("Users"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Navigation("Applicants"); - - b.Navigation("Bans"); - - b.Navigation("Members"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Navigation("Participants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Navigation("AntiAltSetting"); - - b.Navigation("AntiRaidSetting"); - - b.Navigation("AntiSpamSetting"); - - b.Navigation("CommandAliases"); - - b.Navigation("CommandCooldowns"); - - b.Navigation("DelMsgOnCmdChannels"); - - b.Navigation("FeedSubs"); - - b.Navigation("FilterInvitesChannelIds"); - - b.Navigation("FilterLinksChannelIds"); - - b.Navigation("FilterWordsChannelIds"); - - b.Navigation("FilteredWords"); - - b.Navigation("FollowedStreams"); - - b.Navigation("GenerateCurrencyChannelIds"); - - b.Navigation("MutedUsers"); - - b.Navigation("Permissions"); - - b.Navigation("SelfAssignableRoleGroupNames"); - - b.Navigation("ShopEntries"); - - b.Navigation("SlowmodeIgnoredRoles"); - - b.Navigation("SlowmodeIgnoredUsers"); - - b.Navigation("StreamRole"); - - b.Navigation("UnbanTimer"); - - b.Navigation("UnmuteTimers"); - - b.Navigation("UnroleTimer"); - - b.Navigation("VcRoleInfos"); - - b.Navigation("WarnPunishments"); - - b.Navigation("XpSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Navigation("LogIgnores"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Navigation("Songs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Navigation("Blacklist"); - - b.Navigation("Whitelist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.XpSettings", b => - { - b.Navigation("CurrencyRewards"); - - b.Navigation("ExclusionList"); - - b.Navigation("RoleRewards"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20240912124710_greet-settings.cs b/src/EllieBot/Migrations/Sqlite/20240912124710_greet-settings.cs deleted file mode 100644 index 978c129..0000000 --- a/src/EllieBot/Migrations/Sqlite/20240912124710_greet-settings.cs +++ /dev/null @@ -1,197 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - /// - public partial class greetsettings : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "GreetSettings", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - GreetType = table.Column(type: "INTEGER", nullable: false), - MessageText = table.Column(type: "TEXT", nullable: true), - IsEnabled = table.Column(type: "INTEGER", nullable: false, defaultValue: false), - ChannelId = table.Column(type: "INTEGER", nullable: true), - AutoDeleteTimer = table.Column(type: "INTEGER", nullable: false, defaultValue: 0) - }, - constraints: table => - { - table.PrimaryKey("PK_GreetSettings", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_GreetSettings_GuildId_GreetType", - table: "GreetSettings", - columns: new[] { "GuildId", "GreetType" }, - unique: true); - - MigrationQueries.GreetSettingsCopy(migrationBuilder); - - migrationBuilder.DropColumn( - name: "AutoDeleteByeMessagesTimer", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "AutoDeleteGreetMessagesTimer", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "BoostMessage", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "BoostMessageChannelId", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "BoostMessageDeleteAfter", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "ByeMessageChannelId", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "ChannelByeMessageText", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "ChannelGreetMessageText", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "DmGreetMessageText", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "GreetMessageChannelId", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "SendBoostMessage", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "SendChannelByeMessage", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "SendChannelGreetMessage", - table: "GuildConfigs"); - - migrationBuilder.DropColumn( - name: "SendDmGreetMessage", - table: "GuildConfigs"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "GreetSettings"); - - migrationBuilder.AddColumn( - name: "AutoDeleteByeMessagesTimer", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "AutoDeleteGreetMessagesTimer", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "BoostMessage", - table: "GuildConfigs", - type: "TEXT", - nullable: true); - - migrationBuilder.AddColumn( - name: "BoostMessageChannelId", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "BoostMessageDeleteAfter", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "ByeMessageChannelId", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "ChannelByeMessageText", - table: "GuildConfigs", - type: "TEXT", - nullable: true); - - migrationBuilder.AddColumn( - name: "ChannelGreetMessageText", - table: "GuildConfigs", - type: "TEXT", - nullable: true); - - migrationBuilder.AddColumn( - name: "DmGreetMessageText", - table: "GuildConfigs", - type: "TEXT", - nullable: true); - - migrationBuilder.AddColumn( - name: "GreetMessageChannelId", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - migrationBuilder.AddColumn( - name: "SendBoostMessage", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "SendChannelByeMessage", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "SendChannelGreetMessage", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "SendDmGreetMessage", - table: "GuildConfigs", - type: "INTEGER", - nullable: false, - defaultValue: false); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Migrations/Sqlite/20241018004612_warn-split.Designer.cs b/src/EllieBot/Migrations/Sqlite/20241018004612_warn-split.Designer.cs deleted file mode 100644 index 3fbae50..0000000 --- a/src/EllieBot/Migrations/Sqlite/20241018004612_warn-split.Designer.cs +++ /dev/null @@ -1,2919 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20241018004612_warn-split")] - partial class warnsplit - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.8"); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("TodosArchive"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("AutoPublishChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.ToTable("DiscordUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ExcludedItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("XpSettingsId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("XpSettingsId"); - - b.ToTable("ExcludedItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FeedSub", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Url") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("GuildConfigId", "Url"); - - b.ToTable("FeedSub"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterLinksChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterLinksChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilterWordsChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilterWordsChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FilteredWord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Word") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FilteredWord"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.FollowedStream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("FollowedStream"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GCChannelId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("GCChannelId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GamblingStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Bet") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Feature") - .HasColumnType("TEXT"); - - b.Property("PaidOut") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("Feature") - .IsUnique(); - - b.ToTable("GamblingStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("EndsAt") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("GiveawayModel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GiveawayUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("GiveawayId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GiveawayId", "UserId") - .IsUnique(); - - b.ToTable("GiveawayUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GroupName", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Number") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId", "Number") - .IsUnique(); - - b.ToTable("GroupName"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.GuildConfig", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoAssignRoleIds") - .HasColumnType("TEXT"); - - b.Property("AutoDeleteSelfAssignedRoleMessages") - .HasColumnType("INTEGER"); - - b.Property("CleverbotEnabled") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DeleteMessageOnCommand") - .HasColumnType("INTEGER"); - - b.Property("DeleteStreamOnlineMessage") - .HasColumnType("INTEGER"); - - b.Property("DisableGlobalExpressions") - .HasColumnType("INTEGER"); - - b.Property("ExclusiveSelfAssignedRoles") - .HasColumnType("INTEGER"); - - b.Property("FilterInvites") - .HasColumnType("INTEGER"); - - b.Property("FilterLinks") - .HasColumnType("INTEGER"); - - b.Property("FilterWords") - .HasColumnType("INTEGER"); - - b.Property("GameVoiceChannel") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Locale") - .HasColumnType("TEXT"); - - b.Property("MuteRoleName") - .HasColumnType("TEXT"); - - b.Property("NotifyStreamOffline") - .HasColumnType("INTEGER"); - - b.Property("PermissionRole") - .HasColumnType("TEXT"); - - b.Property("Prefix") - .HasColumnType("TEXT"); - - b.Property("StickyRoles") - .HasColumnType("INTEGER"); - - b.Property("TimeZoneId") - .HasColumnType("TEXT"); - - b.Property("VerboseErrors") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(true); - - b.Property("VerbosePermissions") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireAction") - .HasColumnType("INTEGER"); - - b.Property("WarnExpireHours") - .HasColumnType("INTEGER"); - - b.Property("WarningsInitialized") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.HasIndex("WarnExpireHours"); - - b.ToTable("GuildConfigs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.HoneypotChannel", b => - { - b.Property("GuildId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("GuildId"); - - b.ToTable("HoneyPotChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.IgnoredLogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemType") - .HasColumnType("INTEGER"); - - b.Property("LogItemId") - .HasColumnType("INTEGER"); - - b.Property("LogSettingId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("LogSettingId", "LogItemId", "ItemType") - .IsUnique(); - - b.ToTable("IgnoredLogChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ImageOnlyChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.ToTable("ImageOnlyChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.LogSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelDestroyedId") - .HasColumnType("INTEGER"); - - b.Property("ChannelUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LogOtherId") - .HasColumnType("INTEGER"); - - b.Property("LogUserPresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceId") - .HasColumnType("INTEGER"); - - b.Property("LogVoicePresenceTTSId") - .HasColumnType("INTEGER"); - - b.Property("LogWarnsId") - .HasColumnType("INTEGER"); - - b.Property("MessageDeletedId") - .HasColumnType("INTEGER"); - - b.Property("MessageUpdatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadCreatedId") - .HasColumnType("INTEGER"); - - b.Property("ThreadDeletedId") - .HasColumnType("INTEGER"); - - b.Property("UserBannedId") - .HasColumnType("INTEGER"); - - b.Property("UserJoinedId") - .HasColumnType("INTEGER"); - - b.Property("UserLeftId") - .HasColumnType("INTEGER"); - - b.Property("UserMutedId") - .HasColumnType("INTEGER"); - - b.Property("UserUnbannedId") - .HasColumnType("INTEGER"); - - b.Property("UserUpdatedId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("LogSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlayerSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDisconnect") - .HasColumnType("INTEGER"); - - b.Property("AutoPlay") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MusicChannelId") - .HasColumnType("INTEGER"); - - b.Property("PlayerRepeat") - .HasColumnType("INTEGER"); - - b.Property("QualityPreset") - .HasColumnType("INTEGER"); - - b.Property("Volume") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(100); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("MusicPlayerSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MusicPlaylist", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Author") - .HasColumnType("TEXT"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("MusicPlaylists"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.MutedUserId", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("MutedUserId"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("RoleIds") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "UserId") - .IsUnique(); - - b.ToTable("StickyRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ArchiveId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsDone") - .HasColumnType("INTEGER"); - - b.Property("Todo") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ArchiveId"); - - b.HasIndex("UserId"); - - b.ToTable("Todos"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("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"); - }); - - 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/20241018004612_warn-split.cs b/src/EllieBot/Migrations/Sqlite/20241018004612_warn-split.cs deleted file mode 100644 index f2ae5a3..0000000 --- a/src/EllieBot/Migrations/Sqlite/20241018004612_warn-split.cs +++ /dev/null @@ -1,72 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata.Internal; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - /// - public partial class warnsplit : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "GuildId", - table: "WarningPunishment", - type: "INTEGER", - nullable: false, - defaultValue: 0ul); - - MigrationQueries.AddGuildIdsToWarningPunishment(migrationBuilder); - - migrationBuilder.DropForeignKey( - name: "FK_WarningPunishment_GuildConfigs_GuildConfigId", - table: "WarningPunishment"); - - migrationBuilder.DropIndex( - name: "IX_WarningPunishment_GuildConfigId", - table: "WarningPunishment"); - - migrationBuilder.DropColumn( - name: "GuildConfigId", - table: "WarningPunishment"); - - migrationBuilder.AddUniqueConstraint( - name: "AK_WarningPunishment_GuildId_Count", - table: "WarningPunishment", - columns: new[] { "GuildId", "Count" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropUniqueConstraint( - name: "AK_WarningPunishment_GuildId_Count", - table: "WarningPunishment"); - - migrationBuilder.DropColumn( - name: "GuildId", - table: "WarningPunishment"); - - migrationBuilder.AddColumn( - name: "GuildConfigId", - table: "WarningPunishment", - type: "INTEGER", - nullable: true); - - migrationBuilder.CreateIndex( - name: "IX_WarningPunishment_GuildConfigId", - table: "WarningPunishment", - column: "GuildConfigId"); - - migrationBuilder.AddForeignKey( - name: "FK_WarningPunishment_GuildConfigs_GuildConfigId", - table: "WarningPunishment", - column: "GuildConfigId", - principalTable: "GuildConfigs", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Migrations/Sqlite/20241028033656_ncanvas.Designer.cs b/src/EllieBot/Migrations/Sqlite/20241028033656_ncanvas.Designer.cs deleted file mode 100644 index d85e305..0000000 --- a/src/EllieBot/Migrations/Sqlite/20241028033656_ncanvas.Designer.cs +++ /dev/null @@ -1,2953 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20241028033656_ncanvas")] - partial class ncanvas - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.8"); - - modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("ActionDurationMinutes") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MinAge") - .HasColumnType("TEXT"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiAltSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiRaidSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("PunishDuration") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.Property("UserThreshold") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiRaidSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamIgnore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AntiSpamSettingId") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("AntiSpamSettingId"); - - b.ToTable("AntiSpamIgnore"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AntiSpamSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Action") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("MessageThreshold") - .HasColumnType("INTEGER"); - - b.Property("MuteTime") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("AntiSpamSetting"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ArchivedTodoListModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("TodosArchive"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoCommand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("ChannelName") - .HasColumnType("TEXT"); - - b.Property("CommandText") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("GuildName") - .HasColumnType("TEXT"); - - b.Property("Interval") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelName") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("AutoCommands"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoPublishChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("AutoPublishChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AutoDelete") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId") - .IsUnique(); - - b.HasIndex("GuildId"); - - b.ToTable("AutoTranslateChannels"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.AutoTranslateUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Source") - .HasColumnType("TEXT"); - - b.Property("Target") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasAlternateKey("ChannelId", "UserId"); - - b.ToTable("AutoTranslateUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("PruneDays") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId") - .IsUnique(); - - b.ToTable("BanTemplates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BankUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Balance") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId") - .IsUnique(); - - b.ToTable("BankUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.BlacklistEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("Blacklist"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubApplicants", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubApplicants"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubBans", b => - { - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("ClubId", "UserId"); - - b.HasIndex("UserId"); - - b.ToTable("ClubBans"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ClubInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Description") - .HasColumnType("TEXT"); - - b.Property("ImageUrl") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasMaxLength(20) - .HasColumnType("TEXT"); - - b.Property("OwnerId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.HasIndex("OwnerId") - .IsUnique(); - - b.ToTable("Clubs"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandAlias", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Mapping") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandAlias"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CommandCooldown", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("CommandName") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Seconds") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("CommandCooldown"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.CurrencyTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Extra") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Note") - .HasColumnType("TEXT"); - - b.Property("OtherId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValueSql("NULL"); - - b.Property("Type") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("CurrencyTransactions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DelMsgOnCmdChannel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("DelMsgOnCmdChannel"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordPermOverride", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Perm") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "Command") - .IsUnique(); - - b.ToTable("DiscordPermOverrides"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.DiscordUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AvatarId") - .HasColumnType("TEXT"); - - b.Property("ClubId") - .HasColumnType("INTEGER"); - - b.Property("CurrencyAmount") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Discriminator") - .HasColumnType("TEXT"); - - b.Property("IsClubAdmin") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(false); - - b.Property("NotifyOnLevelUp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("TotalXp") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0L); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasAlternateKey("UserId"); - - b.HasIndex("ClubId"); - - b.HasIndex("CurrencyAmount"); - - b.HasIndex("TotalXp"); - - b.HasIndex("UserId"); - - b.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.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.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("RoleIds") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "UserId") - .IsUnique(); - - b.ToTable("StickyRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ArchiveId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsDone") - .HasColumnType("INTEGER"); - - b.Property("Todo") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ArchiveId"); - - b.HasIndex("UserId"); - - b.ToTable("Todos"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("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"); - }); - - 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/20241028033656_ncanvas.cs b/src/EllieBot/Migrations/Sqlite/20241028033656_ncanvas.cs deleted file mode 100644 index e99fb10..0000000 --- a/src/EllieBot/Migrations/Sqlite/20241028033656_ncanvas.cs +++ /dev/null @@ -1,53 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - /// - public partial class ncanvas : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "NCPixel", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Position = table.Column(type: "INTEGER", nullable: false), - Price = table.Column(type: "INTEGER", nullable: false), - OwnerId = table.Column(type: "INTEGER", nullable: false), - Color = table.Column(type: "INTEGER", nullable: false), - Text = table.Column(type: "TEXT", maxLength: 256, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_NCPixel", x => x.Id); - table.UniqueConstraint("AK_NCPixel_Position", x => x.Position); - }); - - migrationBuilder.CreateIndex( - name: "IX_DiscordUser_Username", - table: "DiscordUser", - column: "Username"); - - migrationBuilder.CreateIndex( - name: "IX_NCPixel_OwnerId", - table: "NCPixel", - column: "OwnerId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "NCPixel"); - - migrationBuilder.DropIndex( - name: "IX_DiscordUser_Username", - table: "DiscordUser"); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Migrations/Sqlite/20241102022949_no-discrim-and-flag-translate.Designer.cs b/src/EllieBot/Migrations/Sqlite/20241102022949_no-discrim-and-flag-translate.Designer.cs deleted file mode 100644 index 0547dac..0000000 --- a/src/EllieBot/Migrations/Sqlite/20241102022949_no-discrim-and-flag-translate.Designer.cs +++ /dev/null @@ -1,2973 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using EllieBot.Db; - -#nullable disable - -namespace EllieBot.Migrations -{ - [DbContext(typeof(SqliteContext))] - [Migration("20241102022949_no-discrim-and-flag-translate")] - partial class nodiscrimandflagtranslate - { - /// - 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.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.EllieExpression", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AllowTarget") - .HasColumnType("INTEGER"); - - b.Property("AutoDeleteTrigger") - .HasColumnType("INTEGER"); - - b.Property("ContainsAnywhere") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("DmResponse") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Reactions") - .HasColumnType("TEXT"); - - b.Property("Response") - .HasColumnType("TEXT"); - - b.Property("Trigger") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Expressions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountCents") - .HasColumnType("INTEGER"); - - b.Property("LastCharge") - .HasColumnType("TEXT"); - - b.Property("UniquePlatformUserId") - .HasColumnType("TEXT"); - - b.Property("ValidThru") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.HasIndex("UniquePlatformUserId") - .IsUnique(); - - b.ToTable("Patrons"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Permissionv2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("IsCustomCommand") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTarget") - .HasColumnType("INTEGER"); - - b.Property("PrimaryTargetId") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTarget") - .HasColumnType("INTEGER"); - - b.Property("SecondaryTargetName") - .HasColumnType("TEXT"); - - b.Property("State") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("Permissions"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlantedCurrency", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Password") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ChannelId"); - - b.HasIndex("MessageId") - .IsUnique(); - - b.ToTable("PlantedCurrency"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.PlaylistSong", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MusicPlaylistId") - .HasColumnType("INTEGER"); - - b.Property("Provider") - .HasColumnType("TEXT"); - - b.Property("ProviderType") - .HasColumnType("INTEGER"); - - b.Property("Query") - .HasColumnType("TEXT"); - - b.Property("Title") - .HasColumnType("TEXT"); - - b.Property("Uri") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("MusicPlaylistId"); - - b.ToTable("PlaylistSong"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Quote", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("AuthorName") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("Text") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("Keyword"); - - b.ToTable("Quotes"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ReactionRoleV2", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Emote") - .HasMaxLength(100) - .HasColumnType("TEXT"); - - b.Property("Group") - .HasColumnType("INTEGER"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelReq") - .HasColumnType("INTEGER"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId"); - - b.HasIndex("MessageId", "Emote") - .IsUnique(); - - b.ToTable("ReactionRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Reminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsPrivate") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("ServerId") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("When") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("When"); - - b.ToTable("Reminders"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Repeater", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Interval") - .HasColumnType("TEXT"); - - b.Property("LastMessageId") - .HasColumnType("INTEGER"); - - b.Property("Message") - .HasColumnType("TEXT"); - - b.Property("NoRedundant") - .HasColumnType("INTEGER"); - - b.Property("StartTimeOfDay") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.ToTable("Repeaters"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RewardedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AmountRewardedThisMonth") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("LastReward") - .HasColumnType("TEXT"); - - b.Property("PlatformUserId") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("PlatformUserId") - .IsUnique(); - - b.ToTable("RewardedUsers"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.RotatingPlayingStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Status") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("RotatingStatus"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SelfAssignedRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Group") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(0); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("LevelRequirement") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "RoleId") - .IsUnique(); - - b.ToTable("SelfAssignableRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AuthorId") - .HasColumnType("INTEGER"); - - b.Property("Command") - .HasColumnType("TEXT"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Index") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("RoleName") - .HasColumnType("TEXT"); - - b.Property("RoleRequirement") - .HasColumnType("INTEGER"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("ShopEntry"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.ShopEntryItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ShopEntryId") - .HasColumnType("INTEGER"); - - b.Property("Text") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("ShopEntryId"); - - b.ToTable("ShopEntryItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredRole"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.SlowmodeIgnoredUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("SlowmodeIgnoredUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StickyRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("RoleIds") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildId", "UserId") - .IsUnique(); - - b.ToTable("StickyRoles"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamOnlineMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ChannelId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("MessageId") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("Type") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.ToTable("StreamOnlineMessages"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleBlacklistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleBlacklistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AddRoleId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Enabled") - .HasColumnType("INTEGER"); - - b.Property("FromRoleId") - .HasColumnType("INTEGER"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("Keyword") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId") - .IsUnique(); - - b.ToTable("StreamRoleSettings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.StreamRoleWhitelistedUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("StreamRoleSettingsId") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Username") - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("StreamRoleSettingsId"); - - b.ToTable("StreamRoleWhitelistedUser"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.TodoModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("ArchiveId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("IsDone") - .HasColumnType("INTEGER"); - - b.Property("Todo") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("ArchiveId"); - - b.HasIndex("UserId"); - - b.ToTable("Todos"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnbanTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnbanTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnmuteTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("UnmuteAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnmuteTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UnroleTimer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("UnbanAt") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("UnroleTimer"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.UserXpStats", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AwardedXp") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("NotifyOnLevelUp") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Xp") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AwardedXp"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.HasIndex("Xp"); - - b.HasIndex("UserId", "GuildId") - .IsUnique(); - - b.ToTable("UserXpStats"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.VcRoleInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("GuildConfigId") - .HasColumnType("INTEGER"); - - b.Property("RoleId") - .HasColumnType("INTEGER"); - - b.Property("VoiceChannelId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("GuildConfigId"); - - b.ToTable("VcRoleInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuInfo", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AffinityId") - .HasColumnType("INTEGER"); - - b.Property("ClaimerId") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Price") - .HasColumnType("INTEGER"); - - b.Property("WaifuId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("AffinityId"); - - b.HasIndex("ClaimerId"); - - b.HasIndex("Price"); - - b.HasIndex("WaifuId") - .IsUnique(); - - b.ToTable("WaifuInfo"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("ItemEmoji") - .HasColumnType("TEXT"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("WaifuInfoId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("WaifuInfoId"); - - b.ToTable("WaifuItem"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WaifuUpdate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("NewId") - .HasColumnType("INTEGER"); - - b.Property("OldId") - .HasColumnType("INTEGER"); - - b.Property("UpdateType") - .HasColumnType("INTEGER"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.HasKey("Id"); - - b.HasIndex("NewId"); - - b.HasIndex("OldId"); - - b.HasIndex("UserId"); - - b.ToTable("WaifuUpdates"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.Warning", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("Forgiven") - .HasColumnType("INTEGER"); - - b.Property("ForgivenBy") - .HasColumnType("TEXT"); - - b.Property("GuildId") - .HasColumnType("INTEGER"); - - b.Property("Moderator") - .HasColumnType("TEXT"); - - b.Property("Reason") - .HasColumnType("TEXT"); - - b.Property("UserId") - .HasColumnType("INTEGER"); - - b.Property("Weight") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasDefaultValue(1L); - - b.HasKey("Id"); - - b.HasIndex("DateAdded"); - - b.HasIndex("GuildId"); - - b.HasIndex("UserId"); - - b.ToTable("Warnings"); - }); - - modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Count") - .HasColumnType("INTEGER"); - - b.Property("DateAdded") - .HasColumnType("TEXT"); - - b.Property("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"); - }); - - 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/20241102022949_no-discrim-and-flag-translate.cs b/src/EllieBot/Migrations/Sqlite/20241102022949_no-discrim-and-flag-translate.cs deleted file mode 100644 index f9ddda7..0000000 --- a/src/EllieBot/Migrations/Sqlite/20241102022949_no-discrim-and-flag-translate.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - /// - public partial class nodiscrimandflagtranslate : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - MigrationQueries.UpdateUsernames(migrationBuilder); - - migrationBuilder.DropColumn( - name: "Discriminator", - table: "DiscordUser"); - - migrationBuilder.CreateTable( - name: "FlagTranslateChannel", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - GuildId = table.Column(type: "INTEGER", nullable: false), - ChannelId = table.Column(type: "INTEGER", nullable: false), - DateAdded = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_FlagTranslateChannel", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_FlagTranslateChannel_GuildId_ChannelId", - table: "FlagTranslateChannel", - columns: new[] { "GuildId", "ChannelId" }, - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "FlagTranslateChannel"); - - migrationBuilder.AddColumn( - name: "Discriminator", - table: "DiscordUser", - type: "TEXT", - nullable: true); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/20241105024653_betstats.Designer.cs b/src/EllieBot/Migrations/Sqlite/20241105024653_betstats.Designer.cs deleted file mode 100644 index 3151283..0000000 --- a/src/EllieBot/Migrations/Sqlite/20241105024653_betstats.Designer.cs +++ /dev/null @@ -1,3011 +0,0 @@ -// -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 deleted file mode 100644 index 609c3f3..0000000 --- a/src/EllieBot/Migrations/Sqlite/20241105024653_betstats.cs +++ /dev/null @@ -1,47 +0,0 @@ -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/20241107051525_rakeback.Designer.cs b/src/EllieBot/Migrations/Sqlite/20241107051525_rakeback.Designer.cs deleted file mode 100644 index 08669ff..0000000 --- a/src/EllieBot/Migrations/Sqlite/20241107051525_rakeback.Designer.cs +++ /dev/null @@ -1,3025 +0,0 @@ -// -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("20241107051525_rakeback")] - partial class rakeback - { - /// - 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.Rakeback", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.ToTable("Rakeback"); - }); - - 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/20241107051525_rakeback.cs b/src/EllieBot/Migrations/Sqlite/20241107051525_rakeback.cs deleted file mode 100644 index 2d6979f..0000000 --- a/src/EllieBot/Migrations/Sqlite/20241107051525_rakeback.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EllieBot.Migrations -{ - /// - public partial class rakeback : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Rakeback", - columns: table => new - { - UserId = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Amount = table.Column(type: "TEXT", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Rakeback", x => x.UserId); - }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Rakeback"); - } - } -} diff --git a/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs b/src/EllieBot/Migrations/Sqlite/EllieSqliteContextModelSnapshot.cs index 66f5132..0b6c04d 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 @@ -15,7 +15,7 @@ namespace EllieBot.Migrations protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "8.0.8"); + modelBuilder.HasAnnotation("ProductVersion", "8.0.4"); modelBuilder.Entity("EllieBot.Db.Models.AntiAltSetting", b => { @@ -560,6 +560,9 @@ namespace EllieBot.Migrations b.Property("DateAdded") .HasColumnType("TEXT"); + b.Property("Discriminator") + .HasColumnType("TEXT"); + b.Property("IsClubAdmin") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") @@ -593,49 +596,9 @@ namespace EllieBot.Migrations 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") @@ -778,29 +741,6 @@ namespace EllieBot.Migrations 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") @@ -967,9 +907,33 @@ namespace EllieBot.Migrations b.Property("AutoAssignRoleIds") .HasColumnType("TEXT"); + b.Property("AutoDeleteByeMessagesTimer") + .HasColumnType("INTEGER"); + + b.Property("AutoDeleteGreetMessagesTimer") + .HasColumnType("INTEGER"); + b.Property("AutoDeleteSelfAssignedRoleMessages") .HasColumnType("INTEGER"); + b.Property("BoostMessage") + .HasColumnType("TEXT"); + + b.Property("BoostMessageChannelId") + .HasColumnType("INTEGER"); + + b.Property("BoostMessageDeleteAfter") + .HasColumnType("INTEGER"); + + b.Property("ByeMessageChannelId") + .HasColumnType("INTEGER"); + + b.Property("ChannelByeMessageText") + .HasColumnType("TEXT"); + + b.Property("ChannelGreetMessageText") + .HasColumnType("TEXT"); + b.Property("CleverbotEnabled") .HasColumnType("INTEGER"); @@ -985,6 +949,9 @@ namespace EllieBot.Migrations b.Property("DisableGlobalExpressions") .HasColumnType("INTEGER"); + b.Property("DmGreetMessageText") + .HasColumnType("TEXT"); + b.Property("ExclusiveSelfAssignedRoles") .HasColumnType("INTEGER"); @@ -1000,6 +967,9 @@ namespace EllieBot.Migrations b.Property("GameVoiceChannel") .HasColumnType("INTEGER"); + b.Property("GreetMessageChannelId") + .HasColumnType("INTEGER"); + b.Property("GuildId") .HasColumnType("INTEGER"); @@ -1018,6 +988,18 @@ namespace EllieBot.Migrations b.Property("Prefix") .HasColumnType("TEXT"); + b.Property("SendBoostMessage") + .HasColumnType("INTEGER"); + + b.Property("SendChannelByeMessage") + .HasColumnType("INTEGER"); + + b.Property("SendChannelGreetMessage") + .HasColumnType("INTEGER"); + + b.Property("SendDmGreetMessage") + .HasColumnType("INTEGER"); + b.Property("StickyRoles") .HasColumnType("INTEGER"); @@ -1273,36 +1255,42 @@ namespace EllieBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("EllieBot.Db.Models.NCPixel", b => + modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); - b.Property("Color") + b.Property("AllowTarget") .HasColumnType("INTEGER"); - b.Property("OwnerId") + b.Property("AutoDeleteTrigger") .HasColumnType("INTEGER"); - b.Property("Position") + b.Property("ContainsAnywhere") .HasColumnType("INTEGER"); - b.Property("Price") + b.Property("DateAdded") + .HasColumnType("TEXT"); + + b.Property("DmResponse") .HasColumnType("INTEGER"); - b.Property("Text") - .IsRequired() - .HasMaxLength(256) + b.Property("GuildId") + .HasColumnType("INTEGER"); + + b.Property("Reactions") + .HasColumnType("TEXT"); + + b.Property("Response") + .HasColumnType("TEXT"); + + b.Property("Trigger") .HasColumnType("TEXT"); b.HasKey("Id"); - b.HasAlternateKey("Position"); - - b.HasIndex("OwnerId"); - - b.ToTable("NCPixel"); + b.ToTable("Expressions"); }); modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b => @@ -2237,7 +2225,7 @@ namespace EllieBot.Migrations b.Property("DateAdded") .HasColumnType("TEXT"); - b.Property("GuildId") + b.Property("GuildConfigId") .HasColumnType("INTEGER"); b.Property("Punishment") @@ -2251,7 +2239,7 @@ namespace EllieBot.Migrations b.HasKey("Id"); - b.HasAlternateKey("GuildId", "Count"); + b.HasIndex("GuildConfigId"); b.ToTable("WarningPunishment"); }); @@ -2363,94 +2351,6 @@ namespace EllieBot.Migrations 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.Rakeback", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("Amount") - .HasColumnType("TEXT"); - - b.HasKey("UserId"); - - b.ToTable("Rakeback"); - }); - - 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) @@ -2866,6 +2766,14 @@ namespace EllieBot.Migrations b.Navigation("User"); }); + modelBuilder.Entity("EllieBot.Db.Models.WarningPunishment", b => + { + b.HasOne("EllieBot.Db.Models.GuildConfig", null) + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + modelBuilder.Entity("EllieBot.Db.Models.XpCurrencyReward", b => { b.HasOne("EllieBot.Db.Models.XpSettings", "XpSettings") @@ -2978,6 +2886,8 @@ namespace EllieBot.Migrations b.Navigation("VcRoleInfos"); + b.Navigation("WarnPunishments"); + b.Navigation("XpSettings"); }); diff --git a/src/EllieBot/Modules/Administration/AdministrationService.cs b/src/EllieBot/Modules/Administration/AdministrationService.cs index b1bec59..de037bd 100644 --- a/src/EllieBot/Modules/Administration/AdministrationService.cs +++ b/src/EllieBot/Modules/Administration/AdministrationService.cs @@ -1,5 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; +using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Administration._common.results; diff --git a/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleCommands.cs b/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleCommands.cs index 7ff09d9..dc687cc 100644 --- a/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleCommands.cs +++ b/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleCommands.cs @@ -25,13 +25,6 @@ public partial class Administration return; } - // the user can't aar the role which is greater or equal to the bot's highest role - if (role.Position >= ((SocketGuild)ctx.Guild).CurrentUser.GetRoles().Max(x => x.Position)) - { - await Response().Error(strs.hierarchy).SendAsync(); - return; - } - var roles = await _service.ToggleAarAsync(ctx.Guild.Id, role.Id); if (roles.Count == 0) await Response().Confirm(strs.aar_disabled).SendAsync(); diff --git a/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs b/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs index 5e232f8..f373d45 100644 --- a/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs +++ b/src/EllieBot/Modules/Administration/AutoAssignableRoles/AutoAssignRoleService.cs @@ -4,6 +4,7 @@ using System.Net; using System.Threading.Channels; using LinqToDB; using Microsoft.EntityFrameworkCore; +using EllieBot.Db; namespace EllieBot.Modules.Administration.Services; diff --git a/src/EllieBot/Modules/Administration/AutoPublishService.cs b/src/EllieBot/Modules/Administration/AutoPublishService.cs index 2e877bb..8f29495 100644 --- a/src/EllieBot/Modules/Administration/AutoPublishService.cs +++ b/src/EllieBot/Modules/Administration/AutoPublishService.cs @@ -1,3 +1,4 @@ +#nullable disable using LinqToDB; using LinqToDB.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; @@ -10,7 +11,7 @@ public class AutoPublishService : IExecNoCommand, IReadyExecutor, IEService private readonly DbService _db; private readonly DiscordSocketClient _client; private readonly IBotCredsProvider _creds; - private ConcurrentDictionary _enabled = new(); + private ConcurrentDictionary _enabled; public AutoPublishService(DbService db, DiscordSocketClient client, IBotCredsProvider creds) { @@ -19,7 +20,7 @@ public class AutoPublishService : IExecNoCommand, IReadyExecutor, IEService _creds = creds; } - public async Task ExecOnNoCommandAsync(IGuild? guild, IUserMessage msg) + public async Task ExecOnNoCommandAsync(IGuild guild, IUserMessage msg) { if (guild is null) return; @@ -42,31 +43,19 @@ public class AutoPublishService : IExecNoCommand, IReadyExecutor, IEService await using var ctx = _db.GetDbContext(); var items = await ctx.GetTable() - .Where(x => Linq2DbExpressions.GuildOnShard(x.GuildId, creds.TotalShards, _client.ShardId)) - .ToListAsyncLinqToDB(); + .Where(x => Linq2DbExpressions.GuildOnShard(x.GuildId, creds.TotalShards, _client.ShardId)) + .ToListAsyncLinqToDB(); _enabled = items - .ToDictionary(x => x.GuildId, x => x.ChannelId) - .ToConcurrent(); - - _client.LeftGuild += ClientOnLeftGuild; + .ToDictionary(x => x.GuildId, x => x.ChannelId) + .ToConcurrent(); } - - public async Task ClientOnLeftGuild(SocketGuild guild) - { - await using var ctx = _db.GetDbContext(); - _enabled.TryRemove(guild.Id, out _); - - await ctx.GetTable() - .Where(x => x.GuildId == guild.Id) - .DeleteAsync(); - } - + public async Task ToggleAutoPublish(ulong guildId, ulong channelId) { await using var ctx = _db.GetDbContext(); var deleted = await ctx.GetTable() - .DeleteAsync(x => x.GuildId == guildId && x.ChannelId == channelId); + .DeleteAsync(x => x.GuildId == guildId && x.ChannelId == channelId); if (deleted != 0) { @@ -75,22 +64,22 @@ public class AutoPublishService : IExecNoCommand, IReadyExecutor, IEService } await ctx.GetTable() - .InsertOrUpdateAsync(() => new() - { - GuildId = guildId, - ChannelId = channelId, - DateAdded = DateTime.UtcNow, - }, - old => new() - { - ChannelId = channelId, - DateAdded = DateTime.UtcNow, - }, - () => new() - { - GuildId = guildId - }); - + .InsertOrUpdateAsync(() => new() + { + GuildId = guildId, + ChannelId = channelId, + DateAdded = DateTime.UtcNow, + }, + old => new() + { + ChannelId = channelId, + DateAdded = DateTime.UtcNow, + }, + () => new() + { + GuildId = guildId + }); + _enabled[guildId] = channelId; return true; diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs index 742e869..e4e8e76 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs @@ -1,20 +1,14 @@ -using EllieBot.Modules.Administration.DangerousCommands; +namespace EllieBot.Modules.Administration.DangerousCommands; -namespace EllieBot.Modules.Administration; - -public partial class Administration +public partial class Administration { [Group] - public partial class CleanupCommands : CleanupModuleBase + public class CleanupCommands : CleanupModuleBase { private readonly ICleanupService _svc; - private readonly IBotCredsProvider _creds; - public CleanupCommands(ICleanupService svc, IBotCredsProvider creds) - { - _svc = svc; - _creds = creds; - } + public CleanupCommands(ICleanupService svc) + => _svc = svc; [Cmd] [OwnerOnly] @@ -43,32 +37,5 @@ public partial class Administration await Response().Text("This guild's bot data will be saved.").SendAsync(); } - - [Cmd] - [OwnerOnly] - public async Task LeaveUnkeptServers(int startShardId, int shardMultiplier = 3000) - { - var keptGuildCount = await _svc.GetKeptGuildCount(); - - var response = await PromptUserConfirmAsync(new EmbedBuilder() - .WithDescription($""" - Do you want the bot to leave all unkept servers? - - There are currently {keptGuildCount} kept servers. - - **This is a highly destructive and irreversible action.** - """)); - - if (!response) - return; - - for (var shardId = startShardId; shardId < _creds.GetCreds().TotalShards; shardId++) - { - await _svc.StartLeavingUnkeptServers(shardId); - await Task.Delay(shardMultiplier * 1000); - } - - await ctx.OkAsync(); - } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs index fcf5612..7bf7128 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs @@ -9,12 +9,9 @@ namespace EllieBot.Modules.Administration.DangerousCommands; public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService { - private TypedKey _cleanupReportKey = new("cleanup:report"); - private TypedKey _cleanupTriggerKey = new("cleanup:trigger"); - - private TypedKey _keepTriggerKey = new("keep:trigger"); - private readonly IPubSub _pubSub; + private TypedKey _keepReportKey = new("cleanup:report"); + private TypedKey _keepTriggerKey = new("cleanup:trigger"); private readonly DiscordSocketClient _client; private ConcurrentDictionary guildIds = new(); private readonly IBotCredsProvider _creds; @@ -32,90 +29,11 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService _db = db; } - public async Task OnReadyAsync() - { - await _pubSub.Sub(_cleanupTriggerKey, OnCleanupTrigger); - await _pubSub.Sub(_keepTriggerKey, InternalTriggerKeep); - - _client.JoinedGuild += ClientOnJoinedGuild; - - if (_client.ShardId == 0) - await _pubSub.Sub(_cleanupReportKey, OnKeepReport); - } - - private bool keepTriggered = false; - - private async ValueTask InternalTriggerKeep(int shardId) - { - if (_client.ShardId != shardId) - return; - - if (keepTriggered) - return; - - keepTriggered = true; - try - { - var allGuildIds = _client.Guilds.Select(x => x.Id).ToArray(); - - HashSet dontDelete; - await using (var db = _db.GetDbContext()) - { - await using var ctx = db.CreateLinqToDBContext(); - var table = ctx.CreateTable(tableOptions: TableOptions.CheckExistence); - - var dontDeleteList = await table - .Where(x => allGuildIds.Contains(x.GuildId)) - .Select(x => x.GuildId) - .ToListAsyncLinqToDB(); - - dontDelete = dontDeleteList.ToHashSet(); - } - - Log.Information("Leaving {RemainingCount} guilds, 1 every second. {DontDeleteCount} will remain", - allGuildIds.Length - dontDelete.Count, - dontDelete.Count); - - foreach (var guildId in allGuildIds) - { - if (dontDelete.Contains(guildId)) - continue; - - await Task.Delay(1016); - - SocketGuild? guild = null; - try - { - guild = _client.GetGuild(guildId); - - if (guild is null) - { - Log.Warning("Unable to find guild {GuildId}", guildId); - continue; - } - - await guild.LeaveAsync(); - } - catch (Exception ex) - { - Log.Warning("Unable to leave guild {GuildName} [{GuildId}]: {ErrorMessage}", - guild?.Name, - guildId, - ex.Message); - } - } - } - finally - { - keepTriggered = false; - } - } - public async Task DeleteMissingGuildDataAsync() { guildIds = new(); var totalShards = _creds.GetCreds().TotalShards; - await _pubSub.Pub(_cleanupTriggerKey, true); + await _pubSub.Pub(_keepTriggerKey, true); var counter = 0; while (guildIds.Keys.Count < totalShards) { @@ -207,18 +125,6 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService .Contains(x.GuildId)) .DeleteAsync(); - // delete autopublish channels - await ctx.GetTable() - .Where(x => !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId)) - .DeleteAsync(); - - // delete greet settings - await ctx.GetTable() - .Where(x => !tempTable.Select(x => x.GuildId) - .Contains(x.GuildId)) - .DeleteAsync(); - return new() { GuildCount = guildIds.Keys.Count, @@ -229,7 +135,9 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService { await using var db = _db.GetDbContext(); await using var ctx = db.CreateLinqToDBContext(); + var table = ctx.CreateTable(tableOptions: TableOptions.CheckExistence); + if (await table.AnyAsyncLinqToDB(x => x.GuildId == guildId)) return false; @@ -241,31 +149,30 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService return true; } - public async Task GetKeptGuildCount() - { - await using var db = _db.GetDbContext(); - await using var ctx = db.CreateLinqToDBContext(); - var table = ctx.CreateTable(tableOptions: TableOptions.CheckExistence); - return await table.CountAsync(); - } - - public async Task StartLeavingUnkeptServers(int shardId) - => await _pubSub.Pub(_keepTriggerKey, shardId); - private ValueTask OnKeepReport(KeepReport report) { guildIds[report.ShardId] = report.GuildIds; return default; } + public async Task OnReadyAsync() + { + await _pubSub.Sub(_keepTriggerKey, OnKeepTrigger); + + _client.JoinedGuild += ClientOnJoinedGuild; + + if (_client.ShardId == 0) + await _pubSub.Sub(_keepReportKey, OnKeepReport); + } + private async Task ClientOnJoinedGuild(SocketGuild arg) { await KeepGuild(arg.Id); } - private ValueTask OnCleanupTrigger(bool arg) + private ValueTask OnKeepTrigger(bool arg) { - _pubSub.Pub(_cleanupReportKey, + _pubSub.Pub(_keepReportKey, new KeepReport() { ShardId = _client.ShardId, diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/DangerousCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/DangerousCommands.cs index 2e6444f..80484c3 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/DangerousCommands.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/DangerousCommands.cs @@ -139,6 +139,7 @@ public partial class Administration public Task DeleteXp() => ConfirmActionInternalAsync("Delete Xp", () => _xcs.DeleteXp()); + [Cmd] [OwnerOnly] public Task DeleteWaifus() diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs index 8988f32..5d4a720 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs @@ -4,6 +4,4 @@ public interface ICleanupService { Task DeleteMissingGuildDataAsync(); Task KeepGuild(ulong guildId); - Task GetKeptGuildCount(); - Task StartLeavingUnkeptServers(int shardId); } \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelService.cs b/src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelService.cs index e83e5a3..54f9870 100644 --- a/src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelService.cs +++ b/src/EllieBot/Modules/Administration/GameVoiceChannel/GameVoiceChannelService.cs @@ -1,4 +1,6 @@ #nullable disable +using EllieBot.Db; + namespace EllieBot.Modules.Administration.Services; public class GameVoiceChannelService : IEService diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs index fa404db..104e4e7 100644 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs +++ b/src/EllieBot/Modules/Administration/GreetBye/GreetCommands.cs @@ -8,240 +8,236 @@ public partial class Administration [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.ManageGuild)] - public Task Boost() - => Toggle(GreetType.Boost); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task BoostDel(int timer = 30) - => SetDel(GreetType.Boost, timer); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task BoostMsg([Leftover] string? text = null) - => SetMsg(GreetType.Boost, text); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task Greet() - => Toggle(GreetType.Greet); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetDel(int timer = 30) - => SetDel(GreetType.Greet, timer); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetMsg([Leftover] string? text = null) - => SetMsg(GreetType.Greet, text); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetDm() - => Toggle(GreetType.GreetDm); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetDmMsg([Leftover] string? text = null) - => SetMsg(GreetType.GreetDm, text); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task Bye() - => Toggle(GreetType.Bye); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task ByeDel(int timer = 30) - => SetDel(GreetType.Bye, timer); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task ByeMsg([Leftover] string? text = null) - => SetMsg(GreetType.Bye, text); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetTest([Leftover] IGuildUser? user = null) - => Test(GreetType.Greet, user); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - public Task GreetDmTest([Leftover] IGuildUser? user = null) - => Test(GreetType.GreetDm, user); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - [Ratelimit(5)] - public Task ByeTest([Leftover] IGuildUser? user = null) - => Test(GreetType.Bye, user); - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.ManageGuild)] - [Ratelimit(5)] - public Task BoostTest([Leftover] IGuildUser? user = null) - => Test(GreetType.Boost, user); - - - public async Task Toggle(GreetType type) + public async Task Boost() { - var enabled = await _service.SetGreet(ctx.Guild.Id, ctx.Channel.Id, type); + var enabled = await _service.ToggleBoost(ctx.Guild.Id, ctx.Channel.Id); if (enabled) - await Response() - .Confirm( - type switch - { - GreetType.Boost => strs.boost_on, - GreetType.Greet => strs.greet_on, - GreetType.Bye => strs.bye_on, - GreetType.GreetDm => strs.greetdm_on, - _ => strs.error - } - ) - .SendAsync(); + await Response().Confirm(strs.boost_on).SendAsync(); else - await Response() - .Pending( - type switch - { - GreetType.Boost => strs.boost_off, - GreetType.Greet => strs.greet_off, - GreetType.Bye => strs.bye_off, - GreetType.GreetDm => strs.greetdm_off, - _ => strs.error - } - ) - .SendAsync(); + await Response().Pending(strs.boost_off).SendAsync(); } - - public async Task SetDel(GreetType type, int timer) + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public async Task BoostDel(int timer = 30) { if (timer is < 0 or > 600) return; - await _service.SetDeleteTimer(ctx.Guild.Id, type, timer); + await _service.SetBoostDel(ctx.Guild.Id, timer); if (timer > 0) - await Response() - .Confirm( - type switch - { - GreetType.Boost => strs.boostdel_on(timer), - GreetType.Greet => strs.greetdel_on(timer), - GreetType.Bye => strs.byedel_on(timer), - _ => strs.error - } - ) - .SendAsync(); + await Response().Confirm(strs.boostdel_on(timer)).SendAsync(); else - await Response() - .Pending( - type switch - { - GreetType.Boost => strs.boostdel_off, - GreetType.Greet => strs.greetdel_off, - GreetType.Bye => strs.byedel_off, - _ => strs.error - }) - .SendAsync(); + await Response().Pending(strs.boostdel_off).SendAsync(); } - - public async Task SetMsg(GreetType type, string? text = null) + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public async Task BoostMsg([Leftover] string? text = null) { if (string.IsNullOrWhiteSpace(text)) { - var conf = await _service.GetGreetSettingsAsync(ctx.Guild.Id, type); - var msg = conf?.MessageText ?? GreetService.GetDefaultGreet(type); - await Response() - .Confirm( - type switch - { - GreetType.Boost => strs.boostmsg_cur(msg), - GreetType.Greet => strs.greetmsg_cur(msg), - GreetType.Bye => strs.byemsg_cur(msg), - GreetType.GreetDm => strs.greetdmmsg_cur(msg), - _ => strs.error - }) - .SendAsync(); + var boostMessage = _service.GetBoostMessage(ctx.Guild.Id); + await Response().Confirm(strs.boostmsg_cur(boostMessage?.SanitizeMentions())).SendAsync(); return; } - var isEnabled = await _service.SetMessage(ctx.Guild.Id, type, text); + var sendBoostEnabled = _service.SetBoostMessage(ctx.Guild.Id, ref text); - await Response() - .Confirm(type switch - { - GreetType.Boost => strs.boostmsg_new, - GreetType.Greet => strs.greetmsg_new, - GreetType.Bye => strs.byemsg_new, - GreetType.GreetDm => strs.greetdmmsg_new, - _ => strs.error - }) - .SendAsync(); - - - if (!isEnabled) - { - await SendGreetEnableHint(type); - } + await Response().Confirm(strs.boostmsg_new).SendAsync(); + if (!sendBoostEnabled) + await Response().Pending(strs.boostmsg_enable($"`{prefix}boost`")).SendAsync(); } - private static string GetCmdName(GreetType type) + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public async Task GreetDel(int timer = 30) { - var cmdName = type switch - { - GreetType.Greet => "greet", - GreetType.Bye => "bye", - GreetType.Boost => "boost", - GreetType.GreetDm => "greetdm", - _ => "unknown_command" - }; - return cmdName; + if (timer is < 0 or > 600) + return; + + await _service.SetGreetDel(ctx.Guild.Id, timer); + + if (timer > 0) + await Response().Confirm(strs.greetdel_on(timer)).SendAsync(); + else + await Response().Pending(strs.greetdel_off).SendAsync(); } - public async Task Test(GreetType type, IGuildUser? user = null) + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public async Task Greet() + { + var enabled = await _service.SetGreet(ctx.Guild.Id, ctx.Channel.Id); + + if (enabled) + await Response().Confirm(strs.greet_on).SendAsync(); + else + await Response().Pending(strs.greet_off).SendAsync(); + } + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public async Task GreetMsg([Leftover] string? text = null) + { + if (string.IsNullOrWhiteSpace(text)) + { + var greetMsg = _service.GetGreetMsg(ctx.Guild.Id); + await Response().Confirm(strs.greetmsg_cur(greetMsg?.SanitizeMentions())).SendAsync(); + return; + } + + var sendGreetEnabled = _service.SetGreetMessage(ctx.Guild.Id, ref text); + + await Response().Confirm(strs.greetmsg_new).SendAsync(); + + if (!sendGreetEnabled) + await Response().Pending(strs.greetmsg_enable($"`{prefix}greet`")).SendAsync(); + } + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public async Task GreetDm() + { + var enabled = await _service.SetGreetDm(ctx.Guild.Id); + + if (enabled) + await Response().Confirm(strs.greetdm_on).SendAsync(); + else + await Response().Confirm(strs.greetdm_off).SendAsync(); + } + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public async Task GreetDmMsg([Leftover] string? text = null) + { + if (string.IsNullOrWhiteSpace(text)) + { + var dmGreetMsg = _service.GetDmGreetMsg(ctx.Guild.Id); + await Response().Confirm(strs.greetdmmsg_cur(dmGreetMsg?.SanitizeMentions())).SendAsync(); + return; + } + + var sendGreetEnabled = _service.SetGreetDmMessage(ctx.Guild.Id, ref text); + + await Response().Confirm(strs.greetdmmsg_new).SendAsync(); + if (!sendGreetEnabled) + await Response().Pending(strs.greetdmmsg_enable($"`{prefix}greetdm`")).SendAsync(); + } + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public async Task Bye() + { + var enabled = await _service.SetBye(ctx.Guild.Id, ctx.Channel.Id); + + if (enabled) + await Response().Confirm(strs.bye_on).SendAsync(); + else + await Response().Confirm(strs.bye_off).SendAsync(); + } + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public async Task ByeMsg([Leftover] string? text = null) + { + if (string.IsNullOrWhiteSpace(text)) + { + var byeMsg = _service.GetByeMessage(ctx.Guild.Id); + await Response().Confirm(strs.byemsg_cur(byeMsg?.SanitizeMentions())).SendAsync(); + return; + } + + var sendByeEnabled = _service.SetByeMessage(ctx.Guild.Id, ref text); + + await Response().Confirm(strs.byemsg_new).SendAsync(); + if (!sendByeEnabled) + await Response().Pending(strs.byemsg_enable($"`{prefix}bye`")).SendAsync(); + } + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + public async Task ByeDel(int timer = 30) + { + await _service.SetByeDel(ctx.Guild.Id, timer); + + if (timer > 0) + await Response().Confirm(strs.byedel_on(timer)).SendAsync(); + else + await Response().Pending(strs.byedel_off).SendAsync(); + } + + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + [Ratelimit(5)] + public async Task ByeTest([Leftover] IGuildUser? user = null) { user ??= (IGuildUser)ctx.User; - await _service.Test(ctx.Guild.Id, type, (ITextChannel)ctx.Channel, user); - var conf = await _service.GetGreetSettingsAsync(ctx.Guild.Id, type); - - if (conf?.IsEnabled is not true) - await SendGreetEnableHint(type); + await _service.ByeTest((ITextChannel)ctx.Channel, user); + var enabled = _service.GetByeEnabled(ctx.Guild.Id); + if (!enabled) + await Response().Pending(strs.byemsg_enable($"`{prefix}bye`")).SendAsync(); } - private async Task SendGreetEnableHint(GreetType type) + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + [Ratelimit(5)] + public async Task GreetTest([Leftover] IGuildUser? user = null) { - var cmd = $"`{prefix}{GetCmdName(type)}`"; + user ??= (IGuildUser)ctx.User; - var str = type switch - { - GreetType.Greet => strs.greetmsg_enable(cmd), - GreetType.Bye => strs.byemsg_enable(cmd), - GreetType.Boost => strs.boostmsg_enable(cmd), - GreetType.GreetDm => strs.greetdmmsg_enable(cmd), - _ => strs.error - }; - - await Response().Pending(str).SendAsync(); + await _service.GreetTest((ITextChannel)ctx.Channel, user); + var enabled = _service.GetGreetEnabled(ctx.Guild.Id); + if (!enabled) + await Response().Pending(strs.greetmsg_enable($"`{prefix}greet`")).SendAsync(); + } + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + [Ratelimit(5)] + public async Task GreetDmTest([Leftover] IGuildUser? user = null) + { + user ??= (IGuildUser)ctx.User; + + var success = await _service.GreetDmTest(user); + if (success) + await ctx.OkAsync(); + else + await ctx.WarningAsync(); + var enabled = _service.GetGreetDmEnabled(ctx.Guild.Id); + if (!enabled) + await Response().Pending(strs.greetdmmsg_enable($"`{prefix}greetdm`")).SendAsync(); + } + + [Cmd] + [RequireContext(ContextType.Guild)] + [UserPerm(GuildPerm.ManageGuild)] + [Ratelimit(5)] + public async Task BoostTest([Leftover] IGuildUser? user = null) + { + user ??= (IGuildUser)ctx.User; + + await _service.BoostTest((ITextChannel)ctx.Channel, user); + var enabled = _service.GetBoostEnabled(ctx.Guild.Id); + if (!enabled) + await Response().Pending(strs.boostmsg_enable($"`{prefix}boost`")).SendAsync(); } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetGrouper.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetGrouper.cs new file mode 100644 index 0000000..a92256e --- /dev/null +++ b/src/EllieBot/Modules/Administration/GreetBye/GreetGrouper.cs @@ -0,0 +1,71 @@ +namespace EllieBot.Services; + +public class GreetGrouper +{ + private readonly Dictionary> _group; + private readonly object _locker = new(); + + public GreetGrouper() + => _group = new(); + + + /// + /// Creates a group, if group already exists, adds the specified user + /// + /// Id of the server for which to create group for + /// User to add if group already exists + /// + public bool CreateOrAdd(ulong guildId, T toAddIfExists) + { + lock (_locker) + { + if (_group.TryGetValue(guildId, out var list)) + { + list.Add(toAddIfExists); + return false; + } + + _group[guildId] = new(); + return true; + } + } + + /// + /// Remove the specified amount of items from the group. If all items are removed, group will be removed. + /// + /// Id of the group + /// Maximum number of items to retrieve + /// Items retrieved + /// Whether the group has no more items left and is deleted + public bool ClearGroup(ulong guildId, int count, out IReadOnlyCollection items) + { + lock (_locker) + { + if (_group.TryGetValue(guildId, out var set)) + { + // if we want more than there are, return everything + if (count >= set.Count) + { + items = set; + _group.Remove(guildId); + return true; + } + + // if there are more in the group than what's needed + // take the requested number, remove them from the set + // and return them + var toReturn = set.TakeWhile(_ => count-- != 0).ToList(); + foreach (var item in toReturn) + set.Remove(item); + + items = toReturn; + // returning falsemeans group is not yet deleted + // because there are items left + return false; + } + + items = Array.Empty(); + return true; + } + } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs index ee51fe9..1511913 100644 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs +++ b/src/EllieBot/Modules/Administration/GreetBye/GreetService.cs @@ -1,101 +1,64 @@ -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using LinqToDB.Tools; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; +using EllieBot.Db.Models; using System.Threading.Channels; namespace EllieBot.Services; public class GreetService : IEService, IReadyExecutor { + public bool GroupGreets + => _bss.Data.GroupGreets; + private readonly DbService _db; - private ConcurrentDictionary> _enabled = new(); - + private readonly ConcurrentDictionary _guildConfigsCache; private readonly DiscordSocketClient _client; + private readonly GreetGrouper _greets = new(); + private readonly GreetGrouper _byes = new(); + private readonly BotConfigService _bss; private readonly IReplacementService _repSvc; - private readonly IBotCache _cache; private readonly IMessageSenderService _sender; - private readonly Channel<(GreetSettings, IUser, ITextChannel?)> _greetQueue = - Channel.CreateBounded<(GreetSettings, IUser, ITextChannel?)>( - new BoundedChannelOptions(60) - { - FullMode = BoundedChannelFullMode.DropOldest - }); - public GreetService( DiscordSocketClient client, + IBot bot, DbService db, + BotConfigService bss, IMessageSenderService sender, - IReplacementService repSvc, - IBotCache cache - ) + IReplacementService repSvc) { _db = db; _client = client; + _bss = bss; _repSvc = repSvc; - _cache = cache; _sender = sender; - - foreach (var type in Enum.GetValues()) - { - _enabled[type] = new(); - } - } - - public async Task OnReadyAsync() - { - // cache all enabled guilds - await using (var uow = _db.GetDbContext()) - { - var guilds = _client.Guilds.Select(x => x.Id).ToList(); - var enabled = await uow.GetTable() - .Where(x => x.GuildId.In(guilds)) - .Where(x => x.IsEnabled) - .Select(x => new - { - x.GuildId, - x.GreetType - }) - .ToListAsync(); - - foreach (var e in enabled) - { - _enabled[e.GreetType].Add(e.GuildId); - } - } + _guildConfigsCache = new(bot.AllGuildConfigs.ToDictionary(g => g.GuildId, GreetSettings.Create)); _client.UserJoined += OnUserJoined; _client.UserLeft += OnUserLeft; + bot.JoinedGuild += OnBotJoinedGuild; _client.LeftGuild += OnClientLeftGuild; _client.GuildMemberUpdated += ClientOnGuildMemberUpdated; + } + public async Task OnReadyAsync() + { while (true) { - try - { - var (conf, user, ch) = await _greetQueue.Reader.ReadAsync(); - await GreetUsers(conf, ch, user); - } - catch (Exception ex) - { - Log.Error(ex, "Greet Loop almost crashed. Please report this!"); - } - - await Task.Delay(2016); + var (conf, user, compl) = await _greetDmQueue.Reader.ReadAsync(); + var res = await GreetDmUserInternal(conf, user); + compl.TrySetResult(res); + await Task.Delay(2000); } } private Task ClientOnGuildMemberUpdated(Cacheable optOldUser, SocketGuildUser newUser) { - if (!_enabled[GreetType.Boost].Contains(newUser.Guild.Id)) - return Task.CompletedTask; - // if user is a new booster // or boosted again the same server if ((optOldUser.Value is { PremiumSince: null } && newUser is { PremiumSince: not null }) @@ -103,74 +66,60 @@ public class GreetService : IEService, IReadyExecutor && newUser.PremiumSince is { } newDate && newDate > oldDate)) { - _ = Task.Run(async () => - { - var conf = await GetGreetSettingsAsync(newUser.Guild.Id, GreetType.Boost); + var conf = GetOrAddSettingsForGuild(newUser.Guild.Id); + if (!conf.SendBoostMessage) + return Task.CompletedTask; - if (conf is null || !conf.IsEnabled) - return; - - ITextChannel? channel = null; - if (conf.ChannelId is { } cid) - channel = newUser.Guild.GetTextChannel(cid); - - if (channel is null) - return; - - await GreetUsers(conf, channel, newUser); - }); + _ = Task.Run(TriggerBoostMessage(conf, newUser)); } return Task.CompletedTask; } - private async Task OnClientLeftGuild(SocketGuild guild) - { - foreach (var gt in Enum.GetValues()) + private Func TriggerBoostMessage(GreetSettings conf, SocketGuildUser user) + => async () => { - _enabled[gt].TryRemove(guild.Id); + var channel = user.Guild.GetTextChannel(conf.BoostMessageChannelId); + if (channel is null) + return; + + await SendBoostMessage(conf, user, channel); + }; + + private async Task SendBoostMessage(GreetSettings conf, IGuildUser user, ITextChannel channel) + { + if (string.IsNullOrWhiteSpace(conf.BoostMessage)) + return false; + + var toSend = SmartText.CreateFrom(conf.BoostMessage); + + try + { + var newContent = await _repSvc.ReplaceAsync(toSend, + new(client: _client, guild: user.Guild, channel: channel, users: user)); + var toDelete = await _sender.Response(channel).Text(newContent).Sanitize(false).SendAsync(); + if (conf.BoostMessageDeleteAfter > 0) + toDelete.DeleteAfter(conf.BoostMessageDeleteAfter); + + return true; + } + catch (Exception ex) + { + Log.Error(ex, "Error sending boost message"); } - await using var uow = _db.GetDbContext(); - await uow.GetTable() - .Where(x => x.GuildId == guild.Id) - .DeleteAsync(); + return false; } - private Task OnUserJoined(IGuildUser user) + private Task OnClientLeftGuild(SocketGuild arg) { - _ = Task.Run(async () => - { - try - { - if (_enabled[GreetType.Greet].Contains(user.GuildId)) - { - var conf = await GetGreetSettingsAsync(user.GuildId, GreetType.Greet); - if (conf?.ChannelId is ulong cid) - { - var channel = await user.Guild.GetTextChannelAsync(cid); - if (channel is not null) - { - await _greetQueue.Writer.WriteAsync((conf, user, channel)); - } - } - } + _guildConfigsCache.TryRemove(arg.Id, out _); + return Task.CompletedTask; + } - - if (_enabled[GreetType.GreetDm].Contains(user.GuildId)) - { - var confDm = await GetGreetSettingsAsync(user.GuildId, GreetType.GreetDm); - if (confDm is not null) - { - await _greetQueue.Writer.WriteAsync((confDm, user, null)); - } - } - } - catch (Exception ex) - { - Log.Error(ex, "Error in GreetService.OnUserJoined. This should not happen. Please report it"); - } - }); + private Task OnBotJoinedGuild(GuildConfig gc) + { + _guildConfigsCache[gc.GuildId] = GreetSettings.Create(gc); return Task.CompletedTask; } @@ -178,27 +127,37 @@ public class GreetService : IEService, IReadyExecutor { _ = Task.Run(async () => { - if (!_enabled[GreetType.Bye].Contains(guild.Id)) - return; - try { - var conf = await GetGreetSettingsAsync(guild.Id, GreetType.Bye); + var conf = GetOrAddSettingsForGuild(guild.Id); - if (conf?.ChannelId is not { } cid) + if (!conf.SendChannelByeMessage) return; + var channel = guild.TextChannels.FirstOrDefault(c => c.Id == conf.ByeMessageChannelId); - var channel = guild.GetChannel(cid) as ITextChannel; if (channel is null) //maybe warn the server owner that the channel is missing - { - Log.Warning("Channel {ChannelId} in {GuildId} was not found. Bye message will be disabled", - conf.ChannelId, - conf.GuildId); - await SetGreet(guild.Id, null, GreetType.Bye, false); return; - } - await _greetQueue.Writer.WriteAsync((conf, user, channel)); + if (GroupGreets) + { + // if group is newly created, greet that user right away, + // but any user which joins in the next 5 seconds will + // be greeted in a group greet + if (_byes.CreateOrAdd(guild.Id, user)) + { + // greet single user + await ByeUsers(conf, channel, new[] { user }); + var groupClear = false; + while (!groupClear) + { + await Task.Delay(5000); + groupClear = _byes.ClearGroup(guild.Id, 5, out var toBye); + await ByeUsers(conf, channel, toBye); + } + } + } + else + await ByeUsers(conf, channel, new[] { user }); } catch { @@ -208,63 +167,98 @@ public class GreetService : IEService, IReadyExecutor return Task.CompletedTask; } - private TypedKey GreetSettingsKey(ulong gid, GreetType type) - => new($"greet_settings:{gid}:{type}"); - - public async Task GetGreetSettingsAsync(ulong gid, GreetType type) - => await _cache.GetOrAddAsync(GreetSettingsKey(gid, type), - () => InternalGetGreetSettingsAsync(gid, type), - TimeSpan.FromSeconds(3)); - - private async Task InternalGetGreetSettingsAsync(ulong gid, GreetType type) + public string? GetDmGreetMsg(ulong id) { - await using var uow = _db.GetDbContext(); - var res = await uow.GetTable() - .Where(x => x.GuildId == gid && x.GreetType == type) - .FirstOrDefaultAsync(); - - if (res is not null) - res.MessageText ??= GetDefaultGreet(type); - - return res; + using var uow = _db.GetDbContext(); + return uow.GuildConfigsForId(id, set => set).DmGreetMessageText; } - private async Task GreetUsers(GreetSettings conf, ITextChannel? channel, IUser user) + public string? GetGreetMsg(ulong gid) { - if (conf.GreetType == GreetType.GreetDm) - { - if (user is not IGuildUser gu) - return; + using var uow = _db.GetDbContext(); + return uow.GuildConfigsForId(gid, set => set).ChannelGreetMessageText; + } - await GreetDmUserInternal(conf, gu); - return; - } + public string? GetBoostMessage(ulong gid) + { + using var uow = _db.GetDbContext(); + return uow.GuildConfigsForId(gid, set => set).BoostMessage; + } - if (channel is null) + public GreetSettings GetGreetSettings(ulong gid) + { + if (_guildConfigsCache.TryGetValue(gid, out var gs)) + return gs; + + using var uow = _db.GetDbContext(); + return GreetSettings.Create(uow.GuildConfigsForId(gid, set => set)); + } + + private Task ByeUsers(GreetSettings conf, ITextChannel channel, IUser user) + => ByeUsers(conf, channel, new[] { user }); + + private async Task ByeUsers(GreetSettings conf, ITextChannel channel, IReadOnlyCollection users) + { + if (!users.Any()) return; var repCtx = new ReplacementContext(client: _client, guild: channel.Guild, channel: channel, - user: user); + users: users.ToArray()); - var text = SmartText.CreateFrom(conf.MessageText); + var text = SmartText.CreateFrom(conf.ChannelByeMessageText); text = await _repSvc.ReplaceAsync(text, repCtx); try { var toDelete = await _sender.Response(channel).Text(text).Sanitize(false).SendAsync(); - if (conf.AutoDeleteTimer > 0) - toDelete.DeleteAfter(conf.AutoDeleteTimer); + if (conf.AutoDeleteByeMessagesTimer > 0) + toDelete.DeleteAfter(conf.AutoDeleteByeMessagesTimer); } - catch (HttpException ex) when (ex.DiscordCode is DiscordErrorCode.InsufficientPermissions - or DiscordErrorCode.MissingPermissions - or DiscordErrorCode.UnknownChannel) + catch (HttpException ex) when (ex.DiscordCode == DiscordErrorCode.InsufficientPermissions + || ex.DiscordCode == DiscordErrorCode.MissingPermissions + || ex.DiscordCode == DiscordErrorCode.UnknownChannel) { Log.Warning(ex, - "Missing permissions to send a {GreetType} message, it will be disabled on server: {GuildId}", - conf.GreetType, + "Missing permissions to send a bye message, the bye message will be disabled on server: {GuildId}", channel.GuildId); - await SetGreet(channel.GuildId, channel.Id, conf.GreetType, false); + await SetBye(channel.GuildId, channel.Id, false); + } + catch (Exception ex) + { + Log.Warning(ex, "Error embeding bye message"); + } + } + + private Task GreetUsers(GreetSettings conf, ITextChannel channel, IGuildUser user) + => GreetUsers(conf, channel, new[] { user }); + + private async Task GreetUsers(GreetSettings conf, ITextChannel channel, IReadOnlyCollection users) + { + if (users.Count == 0) + return; + + var repCtx = new ReplacementContext(client: _client, + guild: channel.Guild, + channel: channel, + users: users.ToArray()); + + var text = SmartText.CreateFrom(conf.ChannelGreetMessageText); + text = await _repSvc.ReplaceAsync(text, repCtx); + try + { + var toDelete = await _sender.Response(channel).Text(text).Sanitize(false).SendAsync(); + if (conf.AutoDeleteGreetMessagesTimer > 0) + toDelete.DeleteAfter(conf.AutoDeleteGreetMessagesTimer); + } + catch (HttpException ex) when (ex.DiscordCode == DiscordErrorCode.InsufficientPermissions + || ex.DiscordCode == DiscordErrorCode.MissingPermissions + || ex.DiscordCode == DiscordErrorCode.UnknownChannel) + { + Log.Warning(ex, + "Missing permissions to send a bye message, the greet message will be disabled on server: {GuildId}", + channel.GuildId); + await SetGreet(channel.GuildId, channel.Id, false); } catch (Exception ex) { @@ -272,12 +266,33 @@ public class GreetService : IEService, IReadyExecutor } } + private readonly Channel<(GreetSettings, IGuildUser, TaskCompletionSource)> _greetDmQueue = + Channel.CreateBounded<(GreetSettings, IGuildUser, TaskCompletionSource)>(new BoundedChannelOptions(60) + { + // The limit of 60 users should be only hit when there's a raid. In that case + // probably the best thing to do is to drop newest (raiding) users + FullMode = BoundedChannelFullMode.DropNewest + }); + + + private async Task GreetDmUser(GreetSettings conf, IGuildUser user) + { + var completionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + await _greetDmQueue.Writer.WriteAsync((conf, user, completionSource)); + return await completionSource.Task; + } + private async Task GreetDmUserInternal(GreetSettings conf, IGuildUser user) { try { - var repCtx = new ReplacementContext(client: _client, guild: user.Guild, user: user); - var smartText = SmartText.CreateFrom(conf.MessageText); + // var rep = new ReplacementBuilder() + // .WithUser(user) + // .WithServer(_client, (SocketGuild)user.Guild) + // .Build(); + + var repCtx = new ReplacementContext(client: _client, guild: user.Guild, users: user); + var smartText = SmartText.CreateFrom(conf.DmGreetMessageText); smartText = await _repSvc.ReplaceAsync(smartText, repCtx); if (smartText is SmartPlainText pt) @@ -327,9 +342,9 @@ public class GreetService : IEService, IReadyExecutor { // if there is less than 10 embeds, add an embed with footer only seta.Embeds = seta.Embeds.Append(new SmartEmbedArrayElementText() - { - Footer = CreateFooterSource(user) - }) + { + Footer = CreateFooterSource(user) + }) .ToArray(); } } @@ -337,9 +352,8 @@ public class GreetService : IEService, IReadyExecutor await _sender.Response(user).Text(smartText).Sanitize(false).SendAsync(); } - catch (Exception ex) + catch { - Log.Warning(ex, "Unable to send Greet DM. Probably the user has closed DMs"); return false; } @@ -353,156 +367,303 @@ public class GreetService : IEService, IReadyExecutor IconUrl = user.Guild.IconUrl }; - - public static string GetDefaultGreet(GreetType greetType) - => greetType switch + private Task OnUserJoined(IGuildUser user) + { + _ = Task.Run(async () => { - GreetType.Boost => "%user.mention% has boosted the server!", - GreetType.Greet => "%user.mention% has joined the server!", - GreetType.Bye => "%user.name% has left the server!", - GreetType.GreetDm => "Welcome to the server %user.name%", - _ => "%user.name% did something new!" - }; + try + { + var conf = GetOrAddSettingsForGuild(user.GuildId); - public async Task SetGreet( - ulong guildId, - ulong? channelId, - GreetType greetType, - bool? value = null) + if (conf.SendChannelGreetMessage) + { + var channel = await user.Guild.GetTextChannelAsync(conf.GreetMessageChannelId); + if (channel is not null) + { + if (GroupGreets) + { + // if group is newly created, greet that user right away, + // but any user which joins in the next 5 seconds will + // be greeted in a group greet + if (_greets.CreateOrAdd(user.GuildId, user)) + { + // greet single user + await GreetUsers(conf, channel, new[] { user }); + var groupClear = false; + while (!groupClear) + { + await Task.Delay(5000); + groupClear = _greets.ClearGroup(user.GuildId, 5, out var toGreet); + await GreetUsers(conf, channel, toGreet); + } + } + } + else + await GreetUsers(conf, channel, new[] { user }); + } + } + + if (conf.SendDmGreetMessage) + await GreetDmUser(conf, user); + } + catch + { + // ignored + } + }); + return Task.CompletedTask; + } + + public string? GetByeMessage(ulong gid) + { + using var uow = _db.GetDbContext(); + return uow.GuildConfigsForId(gid, set => set).ChannelByeMessageText; + } + + public GreetSettings GetOrAddSettingsForGuild(ulong guildId) + { + if (_guildConfigsCache.TryGetValue(guildId, out var settings)) + return settings; + + using (var uow = _db.GetDbContext()) + { + var gc = uow.GuildConfigsForId(guildId, set => set); + settings = GreetSettings.Create(gc); + } + + _guildConfigsCache.TryAdd(guildId, settings); + return settings; + } + + public async Task SetGreet(ulong guildId, ulong channelId, bool? value = null) { await using var uow = _db.GetDbContext(); - var q = uow.GetTable(); + var conf = uow.GuildConfigsForId(guildId, set => set); + var enabled = conf.SendChannelGreetMessage = value ?? !conf.SendChannelGreetMessage; + conf.GreetMessageChannelId = channelId; - if (value is null) - value = !_enabled[greetType].Contains(guildId); + var toAdd = GreetSettings.Create(conf); + _guildConfigsCache[guildId] = toAdd; - if (value is { } v) - { - await q - .InsertOrUpdateAsync(() => new() - { - GuildId = guildId, - GreetType = greetType, - IsEnabled = v, - ChannelId = channelId, - }, - (old) => new() - { - IsEnabled = v, - ChannelId = channelId, - }, - () => new() - { - GuildId = guildId, - GreetType = greetType, - }); - } - - if (value is true) - { - _enabled[greetType].Add(guildId); - return true; - } - - _enabled[greetType].TryRemove(guildId); - return false; + await uow.SaveChangesAsync(); + return enabled; } - - public async Task SetMessage(ulong guildId, GreetType greetType, string? message) + public bool SetGreetMessage(ulong guildId, ref string message) { - await using (var uow = _db.GetDbContext()) - { - await uow.GetTable() - .InsertOrUpdateAsync(() => new() - { - GuildId = guildId, - GreetType = greetType, - MessageText = message - }, - x => new() - { - MessageText = message - }, - () => new() - { - GuildId = guildId, - GreetType = greetType - }); - } + message = message.SanitizeMentions(); - var conf = await GetGreetSettingsAsync(guildId, greetType); + if (string.IsNullOrWhiteSpace(message)) + throw new ArgumentNullException(nameof(message)); - return conf?.IsEnabled ?? false; + using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); + conf.ChannelGreetMessageText = message; + var greetMsgEnabled = conf.SendChannelGreetMessage; + + var toAdd = GreetSettings.Create(conf); + _guildConfigsCache.AddOrUpdate(guildId, toAdd, (_, _) => toAdd); + + uow.SaveChanges(); + return greetMsgEnabled; } - public async Task SetDeleteTimer(ulong guildId, GreetType greetType, int timer) + public async Task SetGreetDm(ulong guildId, bool? value = null) { - if (timer < 0 || timer > 3600) + await using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); + var enabled = conf.SendDmGreetMessage = value ?? !conf.SendDmGreetMessage; + + var toAdd = GreetSettings.Create(conf); + _guildConfigsCache[guildId] = toAdd; + + await uow.SaveChangesAsync(); + return enabled; + } + + public bool SetGreetDmMessage(ulong guildId, ref string? message) + { + message = message?.SanitizeMentions(); + + if (string.IsNullOrWhiteSpace(message)) + throw new ArgumentNullException(nameof(message)); + + using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); + conf.DmGreetMessageText = message; + + var toAdd = GreetSettings.Create(conf); + _guildConfigsCache[guildId] = toAdd; + + uow.SaveChanges(); + return conf.SendDmGreetMessage; + } + + public async Task SetBye(ulong guildId, ulong channelId, bool? value = null) + { + await using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); + var enabled = conf.SendChannelByeMessage = value ?? !conf.SendChannelByeMessage; + conf.ByeMessageChannelId = channelId; + + var toAdd = GreetSettings.Create(conf); + _guildConfigsCache[guildId] = toAdd; + + await uow.SaveChangesAsync(); + return enabled; + } + + public bool SetByeMessage(ulong guildId, ref string? message) + { + message = message?.SanitizeMentions(); + + if (string.IsNullOrWhiteSpace(message)) + throw new ArgumentNullException(nameof(message)); + + using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); + conf.ChannelByeMessageText = message; + + var toAdd = GreetSettings.Create(conf); + _guildConfigsCache[guildId] = toAdd; + + uow.SaveChanges(); + return conf.SendChannelByeMessage; + } + + public async Task SetByeDel(ulong guildId, int timer) + { + if (timer is < 0 or > 600) + return; + + await using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); + conf.AutoDeleteByeMessagesTimer = timer; + + var toAdd = GreetSettings.Create(conf); + _guildConfigsCache[guildId] = toAdd; + + await uow.SaveChangesAsync(); + } + + public async Task SetGreetDel(ulong guildId, int timer) + { + if (timer is < 0 or > 600) + return; + + await using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); + conf.AutoDeleteGreetMessagesTimer = timer; + + var toAdd = GreetSettings.Create(conf); + _guildConfigsCache[guildId] = toAdd; + + await uow.SaveChangesAsync(); + } + + public bool SetBoostMessage(ulong guildId, ref string message) + { + using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); + conf.BoostMessage = message; + + var toAdd = GreetSettings.Create(conf); + _guildConfigsCache[guildId] = toAdd; + + uow.SaveChanges(); + return conf.SendBoostMessage; + } + + public async Task SetBoostDel(ulong guildId, int timer) + { + if (timer is < 0 or > 600) throw new ArgumentOutOfRangeException(nameof(timer)); - await using (var uow = _db.GetDbContext()) - { - await uow.GetTable() - .InsertOrUpdateAsync(() => new() - { - GuildId = guildId, - GreetType = greetType, - AutoDeleteTimer = timer, - }, - x => new() - { - AutoDeleteTimer = timer - }, - () => new() - { - GuildId = guildId, - GreetType = greetType - }); - } + await using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); + conf.BoostMessageDeleteAfter = timer; - var conf = await GetGreetSettingsAsync(guildId, greetType); + var toAdd = GreetSettings.Create(conf); + _guildConfigsCache[guildId] = toAdd; - return conf?.IsEnabled ?? false; + await uow.SaveChangesAsync(); } - - public async Task Test( - ulong guildId, - GreetType type, - IMessageChannel channel, - IGuildUser user) + public async Task ToggleBoost(ulong guildId, ulong channelId, bool? forceState = null) { - var conf = await GetGreetSettingsAsync(guildId, type); - if (conf is null) - { - conf = new GreetSettings() - { - ChannelId = channel.Id, - GreetType = type, - IsEnabled = false, - GuildId = guildId, - AutoDeleteTimer = 30, - MessageText = GetDefaultGreet(type) - }; - } + await using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); - await SendMessage(conf, channel, user); - return true; + if (forceState is not bool fs) + conf.SendBoostMessage = !conf.SendBoostMessage; + else + conf.SendBoostMessage = fs; + + conf.BoostMessageChannelId = channelId; + await uow.SaveChangesAsync(); + + var toAdd = GreetSettings.Create(conf); + _guildConfigsCache[guildId] = toAdd; + return conf.SendBoostMessage; } - public async Task SendMessage(GreetSettings conf, IMessageChannel channel, IGuildUser user) + #region Get Enabled Status + + public bool GetGreetDmEnabled(ulong guildId) { - if (conf.GreetType == GreetType.GreetDm) - { - await _greetQueue.Writer.WriteAsync((conf, user, null)); - return true; - } - - if (channel is not ITextChannel ch) - return false; - - await GreetUsers(conf, ch, user); - return true; + using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); + return conf.SendDmGreetMessage; } + + public bool GetGreetEnabled(ulong guildId) + { + using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); + return conf.SendChannelGreetMessage; + } + + public bool GetByeEnabled(ulong guildId) + { + using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); + return conf.SendChannelByeMessage; + } + + public bool GetBoostEnabled(ulong guildId) + { + using var uow = _db.GetDbContext(); + var conf = uow.GuildConfigsForId(guildId, set => set); + return conf.SendBoostMessage; + } + + #endregion + + #region Test Messages + + public Task ByeTest(ITextChannel channel, IGuildUser user) + { + var conf = GetOrAddSettingsForGuild(user.GuildId); + return ByeUsers(conf, channel, user); + } + + public Task GreetTest(ITextChannel channel, IGuildUser user) + { + var conf = GetOrAddSettingsForGuild(user.GuildId); + return GreetUsers(conf, channel, user); + } + + public Task GreetDmTest(IGuildUser user) + { + var conf = GetOrAddSettingsForGuild(user.GuildId); + return GreetDmUser(conf, user); + } + + public Task BoostTest(ITextChannel channel, IGuildUser user) + { + var conf = GetOrAddSettingsForGuild(user.GuildId); + return SendBoostMessage(conf, user, channel); + } + + #endregion } \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/GreetBye/GreetSettings.cs b/src/EllieBot/Modules/Administration/GreetBye/GreetSettings.cs index d798f4f..6e4f8ed 100644 --- a/src/EllieBot/Modules/Administration/GreetBye/GreetSettings.cs +++ b/src/EllieBot/Modules/Administration/GreetBye/GreetSettings.cs @@ -1,21 +1,45 @@ -namespace EllieBot.Services; +using EllieBot.Db.Models; -public enum GreetType -{ - Greet, - GreetDm, - Bye, - Boost, -} +namespace EllieBot.Services; public class GreetSettings { - public int Id { get; set; } - - public ulong GuildId { get; set; } - public GreetType GreetType { get; set; } - public string? MessageText { get; set; } - public bool IsEnabled { get; set; } - public ulong? ChannelId { get; set; } - public int AutoDeleteTimer { get; set; } + public int AutoDeleteGreetMessagesTimer { get; set; } + public int AutoDeleteByeMessagesTimer { get; set; } + + public ulong GreetMessageChannelId { get; set; } + public ulong ByeMessageChannelId { get; set; } + + public bool SendDmGreetMessage { get; set; } + public string? DmGreetMessageText { get; set; } + + public bool SendChannelGreetMessage { get; set; } + public string? ChannelGreetMessageText { get; set; } + + public bool SendChannelByeMessage { get; set; } + public string? ChannelByeMessageText { get; set; } + + public bool SendBoostMessage { get; set; } + public string? BoostMessage { get; set; } + public int BoostMessageDeleteAfter { get; set; } + public ulong BoostMessageChannelId { get; set; } + + public static GreetSettings Create(GuildConfig g) + => new() + { + AutoDeleteByeMessagesTimer = g.AutoDeleteByeMessagesTimer, + AutoDeleteGreetMessagesTimer = g.AutoDeleteGreetMessagesTimer, + GreetMessageChannelId = g.GreetMessageChannelId, + ByeMessageChannelId = g.ByeMessageChannelId, + SendDmGreetMessage = g.SendDmGreetMessage, + DmGreetMessageText = g.DmGreetMessageText, + SendChannelGreetMessage = g.SendChannelGreetMessage, + ChannelGreetMessageText = g.ChannelGreetMessageText, + SendChannelByeMessage = g.SendChannelByeMessage, + ChannelByeMessageText = g.ChannelByeMessageText, + SendBoostMessage = g.SendBoostMessage, + BoostMessage = g.BoostMessage, + BoostMessageDeleteAfter = g.BoostMessageDeleteAfter, + BoostMessageChannelId = g.BoostMessageChannelId + }; } \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/Mute/MuteService.cs b/src/EllieBot/Modules/Administration/Mute/MuteService.cs index a67610d..a3fbea3 100644 --- a/src/EllieBot/Modules/Administration/Mute/MuteService.cs +++ b/src/EllieBot/Modules/Administration/Mute/MuteService.cs @@ -1,5 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; +using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Administration.Services; diff --git a/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateCommands.cs b/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateCommands.cs index 16120f2..bf4909e 100644 --- a/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateCommands.cs +++ b/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateCommands.cs @@ -18,17 +18,11 @@ public partial class Administration await Response().Confirm(strs.ropl_disabled).SendAsync(); } - [Cmd] [OwnerOnly] - public Task AddPlaying([Leftover] string status) - => AddPlaying(ActivityType.CustomStatus, status); - - [Cmd] - [OwnerOnly] - public async Task AddPlaying(ActivityType statusType, [Leftover] string status) + public async Task AddPlaying(ActivityType t, [Leftover] string status) { - await _service.AddPlaying(statusType, status); + await _service.AddPlaying(t, status); await Response().Confirm(strs.ropl_added).SendAsync(); } diff --git a/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateService.cs b/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateService.cs index 0c9afff..edf6843 100644 --- a/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateService.cs +++ b/src/EllieBot/Modules/Administration/PlayingRotate/PlayingRotateService.cs @@ -58,7 +58,7 @@ public sealed class PlayingRotateService : IEService, IReadyExecutor : rotatingStatuses[index++]; var statusText = await _repService.ReplaceAsync(playingStatus.Status, new (client: _client)); - await _selfService.SetActivityAsync(statusText, (ActivityType)playingStatus.Type); + await _selfService.SetGameAsync(statusText, (ActivityType)playingStatus.Type); } catch (Exception ex) { diff --git a/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs b/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs index c72a941..c28d3c4 100644 --- a/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs +++ b/src/EllieBot/Modules/Administration/Protection/ProtectionService.cs @@ -1,5 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; +using EllieBot.Db; using EllieBot.Db.Models; using System.Threading.Channels; diff --git a/src/EllieBot/Modules/Administration/Prune/PruneService.cs b/src/EllieBot/Modules/Administration/Prune/PruneService.cs index b44406f..cad3d01 100644 --- a/src/EllieBot/Modules/Administration/Prune/PruneService.cs +++ b/src/EllieBot/Modules/Administration/Prune/PruneService.cs @@ -33,7 +33,7 @@ public class PruneService : IEService using var cancelSource = new CancellationTokenSource(); if (!_pruningGuilds.TryAdd(channel.GuildId, cancelSource)) return PruneResult.AlreadyRunning; - + try { if (!await _ps.LimitHitAsync(LimitedFeatureName.Prune, channel.Guild.OwnerId)) diff --git a/src/EllieBot/Modules/Administration/Role/IReactionRoleService.cs b/src/EllieBot/Modules/Administration/Role/IReactionRoleService.cs index 1f2911d..771ceb0 100644 --- a/src/EllieBot/Modules/Administration/Role/IReactionRoleService.cs +++ b/src/EllieBot/Modules/Administration/Role/IReactionRoleService.cs @@ -1,4 +1,5 @@ #nullable disable +using EllieBot.Modules.Patronage; using EllieBot.Db.Models; using OneOf; using OneOf.Types; diff --git a/src/EllieBot/Modules/Administration/Role/ReactionRolesService.cs b/src/EllieBot/Modules/Administration/Role/ReactionRolesService.cs index f8550ed..cf36457 100644 --- a/src/EllieBot/Modules/Administration/Role/ReactionRolesService.cs +++ b/src/EllieBot/Modules/Administration/Role/ReactionRolesService.cs @@ -2,6 +2,7 @@ using LinqToDB; using LinqToDB.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; using EllieBot.Modules.Patronage; using EllieBot.Db.Models; using OneOf.Types; @@ -13,7 +14,7 @@ public sealed class ReactionRolesService : IReadyExecutor, IEService, IReactionR { private readonly DbService _db; private readonly DiscordSocketClient _client; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private ConcurrentDictionary> _cache; private readonly object _cacheLock = new(); @@ -24,7 +25,7 @@ public sealed class ReactionRolesService : IReadyExecutor, IEService, IReactionR DiscordSocketClient client, IPatronageService ps, DbService db, - IBotCreds creds) + IBotCredentials creds) { _db = db; _client = client; diff --git a/src/EllieBot/Modules/Administration/Role/StickyRolesService.cs b/src/EllieBot/Modules/Administration/Role/StickyRolesService.cs index 5147daf..1fcfc15 100644 --- a/src/EllieBot/Modules/Administration/Role/StickyRolesService.cs +++ b/src/EllieBot/Modules/Administration/Role/StickyRolesService.cs @@ -3,19 +3,20 @@ using LinqToDB; using LinqToDB.EntityFrameworkCore; using EllieBot.Db.Models; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; namespace EllieBot.Modules.Administration; public sealed class StickyRolesService : IEService, IReadyExecutor { private readonly DiscordSocketClient _client; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly DbService _db; private HashSet _stickyRoles = new(); public StickyRolesService( DiscordSocketClient client, - IBotCreds creds, + IBotCredentials creds, DbService db) { _client = client; diff --git a/src/EllieBot/Modules/Administration/Self/SelfCommands.cs b/src/EllieBot/Modules/Administration/Self/SelfCommands.cs index 57f5765..d67ac93 100644 --- a/src/EllieBot/Modules/Administration/Self/SelfCommands.cs +++ b/src/EllieBot/Modules/Administration/Self/SelfCommands.cs @@ -459,7 +459,7 @@ public partial class Administration await Response().Confirm(strs.bot_name(Format.Bold(newName))).SendAsync(); } - + [Cmd] [OwnerOnly] public async Task SetStatus([Leftover] SettableUserStatus status) @@ -491,25 +491,14 @@ public partial class Administration [Cmd] [OwnerOnly] - public async Task SetActivity(ActivityType? type, [Leftover] string game = null) + public async Task SetGame(ActivityType type, [Leftover] string game = null) { // var rep = new ReplacementBuilder().WithDefault(Context).Build(); var repCtx = new ReplacementContext(ctx); - await _service.SetActivityAsync(game is null ? game : await repSvc.ReplaceAsync(game, repCtx), type); + await _service.SetGameAsync(game is null ? game : await repSvc.ReplaceAsync(game, repCtx), type); - await Response().Confirm(strs.set_activity).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public Task SetActivity([Leftover] string game = null) - => SetActivity(null, game); - - public class SetActivityOptions - { - public ActivityType? Type { get; set; } - public string Game { get; set; } + await Response().Confirm(strs.set_game).SendAsync(); } [Cmd] @@ -552,12 +541,12 @@ public partial class Administration return; } - + var repCtx = new ReplacementContext(ctx); text = await repSvc.ReplaceAsync(text, repCtx); await Response().Channel(ch).Text(text).SendAsync(); - - await ctx.OkAsync(); + + await ctx.OkAsync();; } [Cmd] diff --git a/src/EllieBot/Modules/Administration/Self/SelfService.cs b/src/EllieBot/Modules/Administration/Self/SelfService.cs index c07c16e..82eb68c 100644 --- a/src/EllieBot/Modules/Administration/Self/SelfService.cs +++ b/src/EllieBot/Modules/Administration/Self/SelfService.cs @@ -15,7 +15,7 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService private readonly IBotStrings _strings; private readonly DiscordSocketClient _client; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private ImmutableDictionary ownerChannels = new Dictionary().ToImmutableDictionary(); @@ -36,7 +36,7 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService CommandHandler cmdHandler, DbService db, IBotStrings strings, - IBotCreds creds, + IBotCredentials creds, IHttpClientFactory factory, BotConfigService bss, IPubSub pubSub, @@ -71,6 +71,7 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService if (server.OwnerId != _client.CurrentUser.Id) { await server.LeaveAsync(); + Log.Information("Left server {Name} [{Id}]", server.Name, server.Id); } else { @@ -84,14 +85,13 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService { await using var uow = _db.GetDbContext(); - autoCommands = uow.Set() - .AsNoTracking() - .Where(x => x.Interval >= 5) - .AsEnumerable() - .GroupBy(x => x.GuildId) - .ToDictionary(x => x.Key, - y => y.ToDictionary(x => x.Id, TimerFromAutoCommand).ToConcurrent()) - .ToConcurrent(); + autoCommands = uow.Set().AsNoTracking() + .Where(x => x.Interval >= 5) + .AsEnumerable() + .GroupBy(x => x.GuildId) + .ToDictionary(x => x.Key, + y => y.ToDictionary(x => x.Id, TimerFromAutoCommand).ToConcurrent()) + .ToConcurrent(); var startupCommands = uow.Set().AsNoTracking().Where(x => x.Interval == 0); foreach (var cmd in startupCommands) @@ -170,18 +170,18 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService private async Task LoadOwnerChannels() { var channels = await _creds.OwnerIds.Select(id => - { - var user = _client.GetUser(id); - if (user is null) - return Task.FromResult(null); + { + var user = _client.GetUser(id); + if (user is null) + return Task.FromResult(null); - return user.CreateDMChannelAsync(); - }) - .WhenAll(); + return user.CreateDMChannelAsync(); + }) + .WhenAll(); ownerChannels = channels.Where(x => x is not null) - .ToDictionary(x => x.Recipient.Id, x => x) - .ToImmutableDictionary(); + .ToDictionary(x => x.Recipient.Id, x => x) + .ToImmutableDictionary(); if (!ownerChannels.Any()) { @@ -400,10 +400,7 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService { try { - if (data.Type is { } activityType) - await _client.SetGameAsync(data.Name, data.Link, activityType); - else - await _client.SetCustomStatusAsync(data.Name); + await _client.SetGameAsync(data.Name, data.Link, data.Type); } catch (Exception ex) { @@ -411,7 +408,7 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService } }); - public Task SetActivityAsync(string game, ActivityType? type) + public Task SetGameAsync(string game, ActivityType type) => _pubSub.Pub(_activitySetKey, new() { @@ -433,10 +430,10 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService { public string Name { get; init; } public string Link { get; init; } - public ActivityType? Type { get; init; } + public ActivityType Type { get; init; } } - - + + /// /// Adds the specified to the database. If a database user with placeholder name /// and discriminator is present in , their name and discriminator get updated accordingly. @@ -446,43 +443,41 @@ public sealed class SelfService : IExecNoCommand, IReadyExecutor, IEService /// A tuple with the amount of new users added and old users updated. public async Task<(long UsersAdded, long UsersUpdated)> RefreshUsersAsync(List users) { - await using var ctx = _db.GetDbContext(); + await using var ctx = _db.GetDbContext(); var presentDbUsers = await ctx.GetTable() - .Select(x => new - { - x.UserId, - x.Username, - }) - .Where(x => users.Select(y => y.Id).Contains(x.UserId)) - .ToArrayAsyncEF(); + .Select(x => new { x.UserId, x.Username, x.Discriminator }) + .Where(x => users.Select(y => y.Id).Contains(x.UserId)) + .ToArrayAsyncEF(); var usersToAdd = users - .Where(x => !presentDbUsers.Select(x => x.UserId).Contains(x.Id)) - .Select(x => new DiscordUser() - { - UserId = x.Id, - AvatarId = x.AvatarId, - Username = x.Username, - }); + .Where(x => !presentDbUsers.Select(x => x.UserId).Contains(x.Id)) + .Select(x => new DiscordUser() + { + UserId = x.Id, + AvatarId = x.AvatarId, + Username = x.Username, + Discriminator = x.Discriminator + }); var added = (await ctx.BulkCopyAsync(usersToAdd)).RowsCopied; var toUpdateUserIds = presentDbUsers - .Where(x => x.Username.StartsWith("??")) - .Select(x => x.UserId) - .ToArray(); + .Where(x => x.Username == "Unknown" && x.Discriminator == "????") + .Select(x => x.UserId) + .ToArray(); foreach (var user in users.Where(x => toUpdateUserIds.Contains(x.Id))) { await ctx.GetTable() - .Where(x => x.UserId == user.Id) - .UpdateAsync(x => new DiscordUser() - { - Username = user.Username, + .Where(x => x.UserId == user.Id) + .UpdateAsync(x => new DiscordUser() + { + Username = user.Username, + Discriminator = user.Discriminator, - // .award tends to set AvatarId and DateAdded to NULL, so account for that. - AvatarId = user.AvatarId, - DateAdded = x.DateAdded ?? DateTime.UtcNow - }); + // .award tends to set AvatarId and DateAdded to NULL, so account for that. + AvatarId = user.AvatarId, + DateAdded = x.DateAdded ?? DateTime.UtcNow + }); } return (added, toUpdateUserIds.Length); diff --git a/src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesService.cs b/src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesService.cs index 505f56c..1305835 100644 --- a/src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesService.cs +++ b/src/EllieBot/Modules/Administration/SelfAssignableRoles/SelfAssignedRolesService.cs @@ -1,5 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; +using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Administration.Services; diff --git a/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs b/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs index 3b6cd3e..6ea5345 100644 --- a/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs +++ b/src/EllieBot/Modules/Administration/ServerLog/ServerLogCommandService.cs @@ -1,6 +1,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Caching.Memory; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; using EllieBot.Modules.Administration.Services; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Administration/Timezone/GuildTimezoneService.cs b/src/EllieBot/Modules/Administration/Timezone/GuildTimezoneService.cs index f36d7af..e1f2fea 100644 --- a/src/EllieBot/Modules/Administration/Timezone/GuildTimezoneService.cs +++ b/src/EllieBot/Modules/Administration/Timezone/GuildTimezoneService.cs @@ -1,4 +1,5 @@ #nullable disable +using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Common.ModuleBehaviors; diff --git a/src/EllieBot/Modules/Administration/UserPunish/UserPunishCommands.cs b/src/EllieBot/Modules/Administration/UserPunish/UserPunishCommands.cs index 85e5026..3c43b1f 100644 --- a/src/EllieBot/Modules/Administration/UserPunish/UserPunishCommands.cs +++ b/src/EllieBot/Modules/Administration/UserPunish/UserPunishCommands.cs @@ -66,10 +66,10 @@ public partial class Administration { await _sender.Response(user) .Embed(_sender.CreateEmbed() - .WithErrorColor() - .WithDescription(GetText(strs.warned_on(ctx.Guild.ToString()))) - .AddField(GetText(strs.moderator), ctx.User.ToString()) - .AddField(GetText(strs.reason), reason ?? "-")) + .WithErrorColor() + .WithDescription(GetText(strs.warned_on(ctx.Guild.ToString()))) + .AddField(GetText(strs.moderator), ctx.User.ToString()) + .AddField(GetText(strs.reason), reason ?? "-")) .SendAsync(); } catch @@ -85,9 +85,8 @@ public partial class Administration catch (Exception ex) { Log.Warning(ex, "Exception occured while warning a user"); - var errorEmbed = _sender.CreateEmbed() - .WithErrorColor() - .WithDescription(GetText(strs.cant_apply_punishment)); + var errorEmbed = _sender.CreateEmbed().WithErrorColor() + .WithDescription(GetText(strs.cant_apply_punishment)); if (dmFailed) errorEmbed.WithFooter("⚠️ " + GetText(strs.unable_to_dm_user)); @@ -118,7 +117,7 @@ public partial class Administration [Priority(1)] public async Task WarnExpire() { - var (expireDays, _) = await _service.GetWarnExpire(ctx.Guild.Id); + var expireDays = await _service.GetWarnExpire(ctx.Guild.Id); if (expireDays == 0) await Response().Confirm(strs.warns_dont_expire).SendAsync(); @@ -267,9 +266,9 @@ public partial class Administration }); return _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.warnings_list)) - .WithDescription(string.Join("\n", ws)); + .WithOkColor() + .WithTitle(GetText(strs.warnings_list)) + .WithDescription(string.Join("\n", ws)); }) .SendAsync(); } @@ -282,13 +281,13 @@ public partial class Administration [Cmd] [RequireContext(ContextType.Guild)] - [UserPerm(GuildPerm.Administrator)] + [UserPerm(GuildPermission.Administrator)] public async Task WarnDelete(ulong userId, int index) { if (--index < 0) return; - var warn = await _service.WarnDelete(ctx.Guild.Id, userId, index); + var warn = await _service.WarnDelete(userId, index); if (warn is null) { @@ -345,7 +344,7 @@ public partial class Administration return; } - var success = await _service.WarnPunish(ctx.Guild.Id, number, punish, time, role); + var success = _service.WarnPunish(ctx.Guild.Id, number, punish, time, role); if (!success) return; @@ -381,7 +380,7 @@ public partial class Administration if (punish is PunishmentAction.TimeOut && time is null) return; - var success = await _service.WarnPunish(ctx.Guild.Id, number, punish, time); + var success = _service.WarnPunish(ctx.Guild.Id, number, punish, time); if (!success) return; @@ -408,7 +407,7 @@ public partial class Administration [UserPerm(GuildPerm.BanMembers)] public async Task WarnPunish(int number) { - if (!await _service.WarnPunishRemove(ctx.Guild.Id, number)) + if (!_service.WarnPunishRemove(ctx.Guild.Id, number)) return; await Response().Confirm(strs.warn_punish_rem(Format.Bold(number.ToString()))).SendAsync(); @@ -418,7 +417,7 @@ public partial class Administration [RequireContext(ContextType.Guild)] public async Task WarnPunishList() { - var ps = await _service.WarnPunishList(ctx.Guild.Id); + var ps = _service.WarnPunishList(ctx.Guild.Id); string list; if (ps.Any()) @@ -479,13 +478,13 @@ public partial class Administration var banPrune = await _service.GetBanPruneAsync(ctx.Guild.Id) ?? 7; await _mute.TimedBan(ctx.Guild, userId, time.Time, (ctx.User + " | " + msg).TrimTo(512), banPrune); var toSend = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("⛔️ " + GetText(strs.banned_user)) - .AddField(GetText(strs.username), user?.ToString() ?? userId.ToString(), true) - .AddField("ID", userId.ToString(), true) - .AddField(GetText(strs.duration), - time.Time.ToPrettyStringHm(), - true); + .WithOkColor() + .WithTitle("⛔️ " + GetText(strs.banned_user)) + .AddField(GetText(strs.username), user?.ToString() ?? userId.ToString(), true) + .AddField("ID", userId.ToString(), true) + .AddField(GetText(strs.duration), + time.Time.ToPrettyStringHm(), + true); if (dmFailed) toSend.WithFooter("⚠️ " + GetText(strs.unable_to_dm_user)); @@ -506,12 +505,11 @@ public partial class Administration var banPrune = await _service.GetBanPruneAsync(ctx.Guild.Id) ?? 7; await ctx.Guild.AddBanAsync(userId, banPrune, (ctx.User + " | " + msg).TrimTo(512)); - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle("⛔️ " + GetText(strs.banned_user)) - .AddField("ID", userId.ToString(), true)) - .SendAsync(); + await Response().Embed(_sender.CreateEmbed() + .WithOkColor() + .WithTitle("⛔️ " + GetText(strs.banned_user)) + .AddField("ID", userId.ToString(), true)) + .SendAsync(); } else await Ban(user, msg); @@ -545,10 +543,10 @@ public partial class Administration await ctx.Guild.AddBanAsync(user, banPrune, (ctx.User + " | " + msg).TrimTo(512)); var toSend = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("⛔️ " + GetText(strs.banned_user)) - .AddField(GetText(strs.username), user.ToString(), true) - .AddField("ID", user.Id.ToString(), true); + .WithOkColor() + .WithTitle("⛔️ " + GetText(strs.banned_user)) + .AddField(GetText(strs.username), user.ToString(), true) + .AddField("ID", user.Id.ToString(), true); if (dmFailed) toSend.WithFooter("⚠️ " + GetText(strs.unable_to_dm_user)); @@ -736,15 +734,14 @@ public partial class Administration var banPrune = await _service.GetBanPruneAsync(ctx.Guild.Id) ?? 7; await ctx.Guild.AddBanAsync(user, banPrune, ("Softban | " + ctx.User + " | " + msg).TrimTo(512)); - try - { await ctx.Guild.RemoveBanAsync(user); } + try { await ctx.Guild.RemoveBanAsync(user); } catch { await ctx.Guild.RemoveBanAsync(user); } var toSend = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("☣ " + GetText(strs.sb_user)) - .AddField(GetText(strs.username), user.ToString(), true) - .AddField("ID", user.Id.ToString(), true); + .WithOkColor() + .WithTitle("☣ " + GetText(strs.sb_user)) + .AddField(GetText(strs.username), user.ToString(), true) + .AddField("ID", user.Id.ToString(), true); if (dmFailed) toSend.WithFooter("⚠️ " + GetText(strs.unable_to_dm_user)); @@ -796,10 +793,10 @@ public partial class Administration await user.KickAsync((ctx.User + " | " + msg).TrimTo(512)); var toSend = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.kicked_user)) - .AddField(GetText(strs.username), user.ToString(), true) - .AddField("ID", user.Id.ToString(), true); + .WithOkColor() + .WithTitle(GetText(strs.kicked_user)) + .AddField(GetText(strs.username), user.ToString(), true) + .AddField("ID", user.Id.ToString(), true); if (dmFailed) toSend.WithFooter("⚠️ " + GetText(strs.unable_to_dm_user)); @@ -829,8 +826,8 @@ public partial class Administration var dmMessage = GetText(strs.timeoutdm(Format.Bold(ctx.Guild.Name), msg)); await _sender.Response(user) .Embed(_sender.CreateEmbed() - .WithPendingColor() - .WithDescription(dmMessage)) + .WithPendingColor() + .WithDescription(dmMessage)) .SendAsync(); } catch @@ -841,10 +838,10 @@ public partial class Administration await user.SetTimeOutAsync(time.Time); var toSend = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("⏳ " + GetText(strs.timedout_user)) - .AddField(GetText(strs.username), user.ToString(), true) - .AddField("ID", user.Id.ToString(), true); + .WithOkColor() + .WithTitle("⏳ " + GetText(strs.timedout_user)) + .AddField(GetText(strs.username), user.ToString(), true) + .AddField("ID", user.Id.ToString(), true); if (dmFailed) toSend.WithFooter("⚠️ " + GetText(strs.unable_to_dm_user)); @@ -902,9 +899,9 @@ public partial class Administration missStr = "-"; var toSend = _sender.CreateEmbed() - .WithDescription(GetText(strs.mass_ban_in_progress(banning.Count))) - .AddField(GetText(strs.invalid(missing.Count)), missStr) - .WithPendingColor(); + .WithDescription(GetText(strs.mass_ban_in_progress(banning.Count))) + .AddField(GetText(strs.invalid(missing.Count)), missStr) + .WithPendingColor(); var banningMessage = await Response().Embed(toSend).SendAsync(); @@ -922,13 +919,11 @@ public partial class Administration } await banningMessage.ModifyAsync(x => x.Embed = _sender.CreateEmbed() - .WithDescription( - GetText(strs.mass_ban_completed( - banning.Count()))) - .AddField(GetText(strs.invalid(missing.Count)), - missStr) - .WithOkColor() - .Build()); + .WithDescription( + GetText(strs.mass_ban_completed(banning.Count()))) + .AddField(GetText(strs.invalid(missing.Count)), missStr) + .WithOkColor() + .Build()); } [Cmd] @@ -950,10 +945,10 @@ public partial class Administration //send a message but don't wait for it var banningMessageTask = Response() .Embed(_sender.CreateEmbed() - .WithDescription( - GetText(strs.mass_kill_in_progress(bans.Count()))) - .AddField(GetText(strs.invalid(missing)), missStr) - .WithPendingColor()) + .WithDescription( + GetText(strs.mass_kill_in_progress(bans.Count()))) + .AddField(GetText(strs.invalid(missing)), missStr) + .WithPendingColor()) .SendAsync(); var banPrune = await _service.GetBanPruneAsync(ctx.Guild.Id) ?? 7; @@ -971,11 +966,11 @@ public partial class Administration var banningMessage = await banningMessageTask; await banningMessage.ModifyAsync(x => x.Embed = _sender.CreateEmbed() - .WithDescription( - GetText(strs.mass_kill_completed(bans.Count()))) - .AddField(GetText(strs.invalid(missing)), missStr) - .WithOkColor() - .Build()); + .WithDescription( + GetText(strs.mass_kill_completed(bans.Count()))) + .AddField(GetText(strs.invalid(missing)), missStr) + .WithOkColor() + .Build()); } public class WarnExpireOptions : IEllieCommandOptions diff --git a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs index 7b31658..9ab0b73 100644 --- a/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs +++ b/src/EllieBot/Modules/Administration/UserPunish/UserPunishService.cs @@ -1,7 +1,10 @@ #nullable disable using LinqToDB; using LinqToDB.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Common.TypeReaders.Models; +using EllieBot.Db; using EllieBot.Modules.Permissions.Services; using EllieBot.Db.Models; using Newtonsoft.Json; @@ -81,24 +84,17 @@ public class UserPunishService : IEService, IReadyExecutor }; long previousCount; - var ps = await WarnPunishList(guildId); + List ps; await using (var uow = _db.GetDbContext()) { - previousCount = uow.GetTable() - .Where(w => w.GuildId == guildId && w.UserId == userId && !w.Forgiven) + ps = uow.GuildConfigsForId(guildId, set => set.Include(x => x.WarnPunishments)).WarnPunishments; + + previousCount = uow.Set() + .ForId(guildId, userId) + .Where(w => !w.Forgiven && w.UserId == userId) .Sum(x => x.Weight); - await uow.GetTable() - .InsertAsync(() => new() - { - UserId = userId, - GuildId = guildId, - Forgiven = false, - Reason = reason, - Moderator = modName, - Weight = weight, - DateAdded = DateTime.UtcNow, - }); + uow.Set().Add(warn); await uow.SaveChangesAsync(); } @@ -248,54 +244,43 @@ public class UserPunishService : IEService, IReadyExecutor public async Task CheckAllWarnExpiresAsync() { await using var uow = _db.GetDbContext(); - - var toClear = await uow.GetTable() - .Where(x => uow.GetTable() - .Count(y => y.GuildId == x.GuildId - && y.WarnExpireHours > 0 - && y.WarnExpireAction == WarnExpireAction.Clear) - > 0 + var cleared = await uow.Set() + .Where(x => uow.Set() + .Any(y => y.GuildId == x.GuildId + && y.WarnExpireHours > 0 + && y.WarnExpireAction == WarnExpireAction.Clear) && x.Forgiven == false && x.DateAdded - < DateTime.UtcNow.AddHours(-uow.GetTable() + < DateTime.UtcNow.AddHours(-uow.Set() .Where(y => x.GuildId == y.GuildId) .Select(y => y.WarnExpireHours) .First())) - .Select(x => x.Id) - .ToListAsyncLinqToDB(); - - var cleared = await uow.GetTable() - .Where(x => toClear.Contains(x.Id)) .UpdateAsync(_ => new() { Forgiven = true, ForgivenBy = "expiry" }); - var toDelete = await uow.GetTable() - .Where(x => uow.GetTable() - .Count(y => y.GuildId == x.GuildId - && y.WarnExpireHours > 0 - && y.WarnExpireAction == WarnExpireAction.Delete) - > 0 - && x.DateAdded - < DateTime.UtcNow.AddHours(-uow.GetTable() - .Where(y => x.GuildId == y.GuildId) - .Select(y => y.WarnExpireHours) - .First())) - .Select(x => x.Id) - .ToListAsyncLinqToDB(); - - var deleted = await uow.GetTable() - .Where(x => toDelete.Contains(x.Id)) + var deleted = await uow.Set() + .Where(x => uow.Set() + .Any(y => y.GuildId == x.GuildId + && y.WarnExpireHours > 0 + && y.WarnExpireAction == WarnExpireAction.Delete) + && x.DateAdded + < DateTime.UtcNow.AddHours(-uow.Set() + .Where(y => x.GuildId == y.GuildId) + .Select(y => y.WarnExpireHours) + .First())) .DeleteAsync(); if (cleared > 0 || deleted > 0) { Log.Information("Cleared {ClearedWarnings} warnings and deleted {DeletedWarnings} warnings due to expiry", cleared, - toDelete.Count); + deleted); } + + await uow.SaveChangesAsync(); } public async Task CheckWarnExpiresAsync(ulong guildId) @@ -329,11 +314,11 @@ public class UserPunishService : IEService, IReadyExecutor await uow.SaveChangesAsync(); } - public Task<(int, bool)> GetWarnExpire(ulong guildId) + public Task GetWarnExpire(ulong guildId) { using var uow = _db.GetDbContext(); var config = uow.GuildConfigsForId(guildId, set => set); - return Task.FromResult((config.WarnExpireHours / 24, config.WarnExpireAction == WarnExpireAction.Delete)); + return Task.FromResult(config.WarnExpireHours / 24); } public async Task WarnExpireAsync(ulong guildId, int days, bool delete) @@ -382,19 +367,18 @@ public class UserPunishService : IEService, IReadyExecutor return toReturn; } - public async Task WarnPunish( + public bool WarnPunish( ulong guildId, int number, PunishmentAction punish, - TimeSpan? time, + StoopidTime time, IRole role = null) { // these 3 don't make sense with time if (punish is PunishmentAction.Softban or PunishmentAction.Kick or PunishmentAction.RemoveRoles && time is not null) return false; - - if (number <= 0 || (time is not null && time > TimeSpan.FromDays(59))) + if (number <= 0 || (time is not null && time.Time > TimeSpan.FromDays(49))) return false; if (punish is PunishmentAction.AddRole && role is null) @@ -403,51 +387,47 @@ public class UserPunishService : IEService, IReadyExecutor if (punish is PunishmentAction.TimeOut && time is null) return false; - var timeMinutes = (int?)time?.TotalMinutes ?? 0; - var roleId = punish == PunishmentAction.AddRole ? role!.Id : default(ulong?); - await using var uow = _db.GetDbContext(); - await uow.GetTable() - .InsertOrUpdateAsync(() => new() - { - GuildId = guildId, - Count = number, - Punishment = punish, - Time = timeMinutes, - RoleId = roleId - }, - _ => new() - { - Punishment = punish, - Time = timeMinutes, - RoleId = roleId - }, - () => new() - { - GuildId = guildId, - Count = number - }); + using var uow = _db.GetDbContext(); + var ps = uow.GuildConfigsForId(guildId, set => set.Include(x => x.WarnPunishments)).WarnPunishments; + var toDelete = ps.Where(x => x.Count == number); + + uow.RemoveRange(toDelete); + + ps.Add(new() + { + Count = number, + Punishment = punish, + Time = (int?)time?.Time.TotalMinutes ?? 0, + RoleId = punish == PunishmentAction.AddRole ? role!.Id : default(ulong?) + }); + uow.SaveChanges(); return true; } - public async Task WarnPunishRemove(ulong guildId, int count) + public bool WarnPunishRemove(ulong guildId, int number) { - await using var uow = _db.GetDbContext(); - var numDeleted = await uow.GetTable() - .DeleteAsync(x => x.GuildId == guildId && x.Count == count); + if (number <= 0) + return false; - return numDeleted > 0; + using var uow = _db.GetDbContext(); + var ps = uow.GuildConfigsForId(guildId, set => set.Include(x => x.WarnPunishments)).WarnPunishments; + var p = ps.FirstOrDefault(x => x.Count == number); + + if (p is not null) + { + uow.Remove(p); + uow.SaveChanges(); + } + + return true; } - - public async Task WarnPunishList(ulong guildId) + public WarningPunishment[] WarnPunishList(ulong guildId) { - await using var uow = _db.GetDbContext(); - - var wps = uow.GetTable() - .Where(x => x.GuildId == guildId) - .OrderBy(x => x.Count) - .ToArray(); - return wps; + using var uow = _db.GetDbContext(); + return uow.GuildConfigsForId(guildId, gc => gc.Include(x => x.WarnPunishments)) + .WarnPunishments.OrderBy(x => x.Count) + .ToArray(); } public (IReadOnlyCollection<(string Original, ulong? Id, string Reason)> Bans, int Missing) MassKill( @@ -617,12 +597,12 @@ public class UserPunishService : IEService, IReadyExecutor return await _repSvc.ReplaceAsync(output, repCtx); } - public async Task WarnDelete(ulong guildId, ulong userId, int index) + public async Task WarnDelete(ulong userId, int index) { await using var uow = _db.GetDbContext(); var warn = await uow.GetTable() - .Where(x => x.GuildId == guildId && x.UserId == userId) + .Where(x => x.UserId == userId) .OrderByDescending(x => x.DateAdded) .Skip(index) .FirstOrDefaultAsyncLinqToDB(); @@ -636,73 +616,4 @@ public class UserPunishService : IEService, IReadyExecutor return warn; } - - public async Task WarnDelete(ulong guildId, int id) - { - await using var uow = _db.GetDbContext(); - - var numDeleted = await uow.GetTable() - .Where(x => x.GuildId == guildId && x.Id == id) - .DeleteAsync(); - - return numDeleted > 0; - } - - public async Task<(IReadOnlyCollection latest, int totalCount)> GetLatestWarnings( - ulong guildId, - int page = 1) - { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(page); - - await using var uow = _db.GetDbContext(); - var latest = await uow.GetTable() - .Where(x => x.GuildId == guildId) - .OrderByDescending(x => x.DateAdded) - .Skip(10 * (page - 1)) - .Take(10) - .ToListAsyncLinqToDB(); - - var totalCount = await uow.GetTable() - .Where(x => x.GuildId == guildId) - .CountAsyncLinqToDB(); - - return (latest, totalCount); - } - - public async Task ForgiveWarning(ulong requestGuildId, int warnId, string modName) - { - await using var uow = _db.GetDbContext(); - var success = await uow.GetTable() - .Where(x => x.GuildId == requestGuildId && x.Id == warnId) - .UpdateAsync(_ => new() - { - Forgiven = true, - ForgivenBy = modName, - }) - == 1; - - return success; - } - - public async Task<(IReadOnlyCollection latest, int totalCount)> GetUserWarnings( - ulong guildId, - ulong userId, - int page) - { - ArgumentOutOfRangeException.ThrowIfNegativeOrZero(page); - - await using var uow = _db.GetDbContext(); - var latest = await uow.GetTable() - .Where(x => x.GuildId == guildId && x.UserId == userId) - .OrderByDescending(x => x.DateAdded) - .Skip(10 * (page - 1)) - .Take(10) - .ToListAsyncLinqToDB(); - - var totalCount = await uow.GetTable() - .Where(x => x.GuildId == guildId && x.UserId == userId) - .CountAsyncLinqToDB(); - - return (latest, totalCount); - } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Administration/VcRole/VcRoleService.cs b/src/EllieBot/Modules/Administration/VcRole/VcRoleService.cs index 0ba9feb..c2dc60b 100644 --- a/src/EllieBot/Modules/Administration/VcRole/VcRoleService.cs +++ b/src/EllieBot/Modules/Administration/VcRole/VcRoleService.cs @@ -1,5 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; +using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Administration.Services; diff --git a/src/EllieBot/Modules/Expressions/EllieExpressionExtensions.cs b/src/EllieBot/Modules/Expressions/EllieExpressionExtensions.cs index 6d8b89c..0eeb68d 100644 --- a/src/EllieBot/Modules/Expressions/EllieExpressionExtensions.cs +++ b/src/EllieBot/Modules/Expressions/EllieExpressionExtensions.cs @@ -6,6 +6,49 @@ namespace EllieBot.Modules.EllieExpressions; public static class EllieExpressionExtensions { + private static string ResolveTriggerString(this string str, DiscordSocketClient client) + => str.Replace("%bot.mention%", client.CurrentUser.Mention, StringComparison.Ordinal); + + public static async Task Send( + this EllieExpression cr, + IUserMessage ctx, + IReplacementService repSvc, + DiscordSocketClient client, + IMessageSenderService sender) + { + var channel = cr.DmResponse ? await ctx.Author.CreateDMChannelAsync() : ctx.Channel; + + var trigger = cr.Trigger.ResolveTriggerString(client); + var substringIndex = trigger.Length; + if (cr.ContainsAnywhere) + { + var pos = ctx.Content.AsSpan().GetWordPosition(trigger); + if (pos == WordPosition.Start) + substringIndex += 1; + else if (pos == WordPosition.End) + substringIndex = ctx.Content.Length; + else if (pos == WordPosition.Middle) + substringIndex += ctx.Content.IndexOf(trigger, StringComparison.InvariantCulture); + } + + var canMentionEveryone = (ctx.Author as IGuildUser)?.GuildPermissions.MentionEveryone ?? true; + + var repCtx = new ReplacementContext(client: client, + guild: (ctx.Channel as ITextChannel)?.Guild as SocketGuild, + channel: ctx.Channel, + users: ctx.Author + ) + .WithOverride("%target%", + () => canMentionEveryone + ? ctx.Content[substringIndex..].Trim() + : ctx.Content[substringIndex..].Trim().SanitizeMentions(true)); + + var text = SmartText.CreateFrom(cr.Response); + text = await repSvc.ReplaceAsync(text, repCtx); + + return await sender.Response(channel).Text(text).Sanitize(false).SendAsync(); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static WordPosition GetWordPosition(this ReadOnlySpan str, in ReadOnlySpan word) { diff --git a/src/EllieBot/Modules/Expressions/EllieExpressions.cs b/src/EllieBot/Modules/Expressions/EllieExpressions.cs index a90b52a..b79091d 100644 --- a/src/EllieBot/Modules/Expressions/EllieExpressions.cs +++ b/src/EllieBot/Modules/Expressions/EllieExpressions.cs @@ -11,10 +11,10 @@ public partial class EllieExpressions : EllieModule All } - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly IHttpClientFactory _clientFactory; - public EllieExpressions(IBotCreds creds, IHttpClientFactory clientFactory) + public EllieExpressions(IBotCredentials creds, IHttpClientFactory clientFactory) { _creds = creds; _clientFactory = clientFactory; @@ -57,14 +57,14 @@ public partial class EllieExpressions : EllieModule [Cmd] [UserPerm(GuildPerm.Administrator)] - public async Task ExprAddServer(string trigger, [Leftover] string response) + public async Task ExprAddServer(string key, [Leftover] string message) { - if (string.IsNullOrWhiteSpace(response) || string.IsNullOrWhiteSpace(trigger)) + if (string.IsNullOrWhiteSpace(message) || string.IsNullOrWhiteSpace(key)) { return; } - await ExprAddInternalAsync(trigger, response); + await ExprAddInternalAsync(key, message); } @@ -401,9 +401,10 @@ public partial class EllieExpressions : EllieModule } [Cmd] - [Ratelimit(300)] public async Task ExprsImport([Leftover] string input = null) { + // todo cooldown on public bot for 1 day, limit 100 + if (!AdminInGuildOrOwnerInDm()) { await Response().Error(strs.expr_insuff_perms).SendAsync(); diff --git a/src/EllieBot/Modules/Expressions/EllieExpressionsService.cs b/src/EllieBot/Modules/Expressions/EllieExpressionsService.cs index 5e3561d..250c517 100644 --- a/src/EllieBot/Modules/Expressions/EllieExpressionsService.cs +++ b/src/EllieBot/Modules/Expressions/EllieExpressionsService.cs @@ -2,6 +2,7 @@ using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; using EllieBot.Common.Yml; +using EllieBot.Db; using EllieBot.Db.Models; using System.Runtime.CompilerServices; using LinqToDB.EntityFrameworkCore; @@ -67,6 +68,7 @@ public sealed class EllieExpressionsService : IExecOnMessage, IReadyExecutor // private readonly GlobalPermissionService _gperm; // private readonly CmdCdService _cmdCds; private readonly IPermissionChecker _permChecker; + private readonly ICommandHandler _cmd; private readonly IBotStrings _strings; private readonly IBot _bot; private readonly IPubSub _pubSub; @@ -83,6 +85,7 @@ public sealed class EllieExpressionsService : IExecOnMessage, IReadyExecutor IBotStrings strings, IBot bot, DiscordSocketClient client, + ICommandHandler cmd, IPubSub pubSub, IMessageSenderService sender, IReplacementService repSvc, @@ -91,6 +94,7 @@ public sealed class EllieExpressionsService : IExecOnMessage, IReadyExecutor { _db = db; _client = client; + _cmd = cmd; _strings = strings; _bot = bot; _pubSub = pubSub; @@ -246,54 +250,46 @@ public sealed class EllieExpressionsService : IExecOnMessage, IReadyExecutor try { - if (guild is not SocketGuild sg) - return false; - - var result = await _permChecker.CheckPermsAsync( - guild, - msg.Channel, - msg.Author, - "ACTUALEXPRESSIONS", - expr.Trigger - ); - - if (!result.IsAllowed) + if (guild is SocketGuild sg) { - var cache = _pc.GetCacheFor(guild.Id); - if (cache.Verbose) + var result = await _permChecker.CheckPermsAsync( + guild, + msg.Channel, + msg.Author, + "ACTUALEXPRESSIONS", + expr.Trigger + ); + + if (!result.IsAllowed) { - if (result.TryPickT3(out var disallowed, out _)) + var cache = _pc.GetCacheFor(guild.Id); + if (cache.Verbose) { - var permissionMessage = _strings.GetText(strs.perm_prevent(disallowed.PermIndex + 1, - Format.Bold(disallowed.PermText)), - sg.Id); - - try + if (result.TryPickT3(out var disallowed, out _)) { - await _sender.Response(msg.Channel) - .Error(permissionMessage) - .SendAsync(); - } - catch - { - } + var permissionMessage = _strings.GetText(strs.perm_prevent(disallowed.PermIndex + 1, + Format.Bold(disallowed.PermText)), + sg.Id); - Log.Information("{PermissionMessage}", permissionMessage); + try + { + await _sender.Response(msg.Channel) + .Error(permissionMessage) + .SendAsync(); + } + catch + { + } + + Log.Information("{PermissionMessage}", permissionMessage); + } } - } - return true; + return true; + } } - var cu = sg.CurrentUser; - - var channel = expr.DmResponse ? await msg.Author.CreateDMChannelAsync() : msg.Channel; - - // have no perms to speak in that channel - if (channel is ITextChannel tc && !cu.GetPermissions(tc).SendMessages) - return false; - - var sentMsg = await Send(expr, msg, channel); + var sentMsg = await expr.Send(msg, _repSvc, _client, _sender); var reactions = expr.GetReactions(); foreach (var reaction in reactions) @@ -341,47 +337,6 @@ public sealed class EllieExpressionsService : IExecOnMessage, IReadyExecutor return false; } - - public string ResolveTriggerString(string str) - => str.Replace("%bot.mention%", _client.CurrentUser.Mention, StringComparison.Ordinal); - - public async Task Send( - EllieExpression cr, - IUserMessage ctx, - IMessageChannel channel - ) - { - var trigger = ResolveTriggerString(cr.Trigger); - var substringIndex = trigger.Length; - if (cr.ContainsAnywhere) - { - var pos = ctx.Content.AsSpan().GetWordPosition(trigger); - if (pos == WordPosition.Start) - substringIndex += 1; - else if (pos == WordPosition.End) - substringIndex = ctx.Content.Length; - else if (pos == WordPosition.Middle) - substringIndex += ctx.Content.IndexOf(trigger, StringComparison.InvariantCulture); - } - - var canMentionEveryone = (ctx.Author as IGuildUser)?.GuildPermissions.MentionEveryone ?? true; - - var repCtx = new ReplacementContext(client: _client, - guild: (ctx.Channel as ITextChannel)?.Guild as SocketGuild, - channel: ctx.Channel, - user: ctx.Author - ) - .WithOverride("%target%", - () => canMentionEveryone - ? ctx.Content[substringIndex..].Trim() - : ctx.Content[substringIndex..].Trim().SanitizeMentions(true)); - - var text = SmartText.CreateFrom(cr.Response); - text = await _repSvc.ReplaceAsync(text, repCtx); - - return await _sender.Response(channel).Text(text).Sanitize(false).SendAsync(); - } - public async Task ResetExprReactions(ulong? maybeGuildId, int id) { EllieExpression expr; @@ -835,7 +790,7 @@ public sealed class EllieExpressionsService : IExecOnMessage, IReadyExecutor if (newguildExpressions.TryGetValue(guildId, out var exprs)) { - return (exprs.Where(x => x.Trigger.Contains(query) || x.Response.Contains(query)) + return (exprs.Where(x => x.Trigger.Contains(query)) .Skip(page * 9) .Take(9) .ToArray(), exprs.Length); diff --git a/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRace.cs b/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRace.cs index 65d7ae0..84f10d4 100644 --- a/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRace.cs +++ b/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRace.cs @@ -6,10 +6,6 @@ namespace EllieBot.Modules.Gambling.Common.AnimalRacing; public sealed class AnimalRace : IDisposable { - public const double BASE_MULTIPLIER = 0.82; - public const double MAX_MULTIPLIER = 0.94; - public const double MULTI_PER_USER = 0.01; - public enum Phase { WaitingForPlayers, @@ -104,7 +100,7 @@ public sealed class AnimalRace : IDisposable foreach (var user in _users) { if (user.Bet > 0) - await _currency.AddAsync(user.UserId, (long)(user.Bet + BASE_MULTIPLIER), new("animalrace", "refund")); + await _currency.AddAsync(user.UserId, user.Bet, new("animalrace", "refund")); } _ = OnStartingFailed?.Invoke(this); @@ -120,7 +116,7 @@ public sealed class AnimalRace : IDisposable { foreach (var user in _users) { - user.Progress += rng.Next(1, 10); + user.Progress += rng.Next(1, 11); if (user.Progress >= 60) user.Progress = 60; } @@ -130,15 +126,13 @@ public sealed class AnimalRace : IDisposable FinishedUsers.AddRange(finished); _ = OnStateUpdate?.Invoke(this); - await Task.Delay(1750); + await Task.Delay(2500); } if (FinishedUsers[0].Bet > 0) { - Multi = FinishedUsers.Count - * Math.Min(MAX_MULTIPLIER, BASE_MULTIPLIER + (MULTI_PER_USER * FinishedUsers.Count)); await _currency.AddAsync(FinishedUsers[0].UserId, - (long)(FinishedUsers[0].Bet * Multi), + FinishedUsers[0].Bet * (_users.Count - 1), new("animalrace", "win")); } @@ -146,8 +140,6 @@ public sealed class AnimalRace : IDisposable }); } - public double Multi { get; set; } = BASE_MULTIPLIER; - public void Dispose() { CurrentPhase = Phase.Ended; diff --git a/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs b/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs index 04356df..1f23cf6 100644 --- a/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs +++ b/src/EllieBot/Modules/Gambling/AnimalRacing/AnimalRacingCommands.cs @@ -12,7 +12,7 @@ namespace EllieBot.Modules.Gambling; public partial class Gambling { [Group] - public partial class AnimalRacingCommands : GamblingModule + public partial class AnimalRacingCommands : GamblingSubmodule { private readonly ICurrencyService _cs; private readonly DiscordSocketClient _client; @@ -74,14 +74,10 @@ public partial class Gambling if (race.FinishedUsers[0].Bet > 0) { return Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(strs.animal_race)) - .WithDescription(GetText(strs.animal_race_won_money( - Format.Bold(winner.Username), - winner.Animal.Icon, - N(race.FinishedUsers[0].Bet * race.Multi)))) - .WithFooter($"x{race.Multi:F2}")) + .Confirm(GetText(strs.animal_race), + GetText(strs.animal_race_won_money(Format.Bold(winner.Username), + winner.Animal.Icon, + (race.FinishedUsers[0].Bet * (race.Users.Count - 1)) + CurrencySign))) .SendAsync(); } @@ -117,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; @@ -133,10 +129,10 @@ public partial class Gambling else { await msg.ModifyAsync(x => x.Embed = _sender.CreateEmbed() - .WithTitle(GetText(strs.animal_race)) - .WithDescription(text) - .WithOkColor() - .Build()); + .WithTitle(GetText(strs.animal_race)) + .WithDescription(text) + .WithOkColor() + .Build()); } } diff --git a/src/EllieBot/Modules/Gambling/Bank/BankCommands.cs b/src/EllieBot/Modules/Gambling/Bank/BankCommands.cs index 1005763..ee66b6e 100644 --- a/src/EllieBot/Modules/Gambling/Bank/BankCommands.cs +++ b/src/EllieBot/Modules/Gambling/Bank/BankCommands.cs @@ -73,7 +73,7 @@ public partial class Gambling await Response().Error(strs.cant_dm).SendAsync(); } } - + [Cmd] [OwnerOnly] public async Task BankBalance([Leftover] IUser user) diff --git a/src/EllieBot/Modules/Gambling/BetStatsCommands.cs b/src/EllieBot/Modules/Gambling/BetStatsCommands.cs deleted file mode 100644 index 4fe5c11..0000000 --- a/src/EllieBot/Modules/Gambling/BetStatsCommands.cs +++ /dev/null @@ -1,175 +0,0 @@ -#nullable disable -using EllieBot.Modules.Gambling.Common; -using EllieBot.Modules.Gambling.Services; - -namespace EllieBot.Modules.Gambling; - -public partial class Gambling -{ - [Group] - public sealed class BetStatsCommands : GamblingModule - { - private readonly GamblingTxTracker _gamblingTxTracker; - - public BetStatsCommands( - GamblingTxTracker gamblingTxTracker, - GamblingConfigService gcs) - : base(gcs) - { - _gamblingTxTracker = gamblingTxTracker; - } - - [Cmd] - public async Task BetStatsReset(GamblingGame? game = null) - { - var price = await _service.GetResetStatsPriceAsync(ctx.User.Id, game); - - var result = await PromptUserConfirmAsync(_sender.CreateEmbed() - .WithDescription( - $""" - Are you sure you want to reset your bet stats for **{GetGameName(game)}**? - - It will cost you {N(price)} - """)); - - if (!result) - return; - - var success = await _service.ResetStatsAsync(ctx.User.Id, game); - - if (success) - { - await ctx.OkAsync(); - } - else - { - await Response() - .Error(strs.not_enough(CurrencySign)) - .SendAsync(); - } - } - - private string GetGameName(GamblingGame? game) - { - if (game is null) - return "all games"; - - return game.ToString(); - } - - [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 GambleStats() - { - var stats = await _gamblingTxTracker.GetAllAsync(); - - var eb = _sender.CreateEmbed() - .WithOkColor(); - - var str = "` Feature `|` Bet `|`Paid Out`|` RoI `\n"; - str += "――――――――――――――――――――\n"; - foreach (var stat in stats) - { - var perc = (stat.PaidOut / stat.Bet).ToString("P2", Culture); - str += $"`{stat.Feature.PadBoth(9)}`" - + $"|`{stat.Bet.ToString("N0").PadLeft(8, ' ')}`" - + $"|`{stat.PaidOut.ToString("N0").PadLeft(8, ' ')}`" - + $"|`{perc.PadLeft(6, ' ')}`\n"; - } - - var bet = stats.Sum(x => x.Bet); - var paidOut = stats.Sum(x => x.PaidOut); - - if (bet == 0) - bet = 1; - - var tPerc = (paidOut / bet).ToString("P2", Culture); - str += "――――――――――――――――――――\n"; - str += $"` {("TOTAL").PadBoth(7)}` " - + $"|**{N(bet).PadLeft(8, ' ')}**" - + $"|**{N(paidOut).PadLeft(8, ' ')}**" - + $"|`{tPerc.PadLeft(6, ' ')}`"; - - eb.WithDescription(str); - - await Response().Embed(eb).SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task GambleStatsReset() - { - if (!await PromptUserConfirmAsync(_sender.CreateEmbed() - .WithDescription( - """ - Are you sure? - This will completely reset Gambling Stats. - - This action is irreversible. - """))) - return; - - await GambleStats(); - await _service.ResetGamblingStatsAsync(); - - await ctx.OkAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/BlackJack/BlackJackCommands.cs b/src/EllieBot/Modules/Gambling/BlackJack/BlackJackCommands.cs index 14798e9..ea9c8b8 100644 --- a/src/EllieBot/Modules/Gambling/BlackJack/BlackJackCommands.cs +++ b/src/EllieBot/Modules/Gambling/BlackJack/BlackJackCommands.cs @@ -3,12 +3,13 @@ using EllieBot.Common.TypeReaders; using EllieBot.Modules.Gambling.Common; using EllieBot.Modules.Gambling.Common.Blackjack; using EllieBot.Modules.Gambling.Services; +using EllieBot.Modules.Utility; namespace EllieBot.Modules.Gambling; public partial class Gambling { - public partial class BlackJackCommands : GamblingModule + public partial class BlackJackCommands : GamblingSubmodule { public enum BjAction { diff --git a/src/EllieBot/Modules/Gambling/Connect4/Connect4.cs b/src/EllieBot/Modules/Gambling/Connect4/Connect4.cs index 0824a68..45d2e89 100644 --- a/src/EllieBot/Modules/Gambling/Connect4/Connect4.cs +++ b/src/EllieBot/Modules/Gambling/Connect4/Connect4.cs @@ -38,11 +38,11 @@ public sealed class Connect4Game : IDisposable public Phase CurrentPhase { get; private set; } = Phase.Joining; - public IReadOnlyList GameState - => _gameState.AsReadOnly(); + public ImmutableArray GameState + => _gameState.ToImmutableArray(); - public IReadOnlyCollection<(ulong UserId, string Username)?> Players - => _players.AsReadOnly(); + public ImmutableArray<(ulong UserId, string Username)?> Players + => _players.ToImmutableArray(); public (ulong UserId, string Username) CurrentPlayer => CurrentPhase == Phase.P1Move ? _players[0].Value : _players[1].Value; @@ -56,6 +56,7 @@ public sealed class Connect4Game : IDisposable private readonly SemaphoreSlim _locker = new(1, 1); private readonly Options _options; + private readonly ICurrencyService _cs; private readonly EllieRandom _rng; private Timer playerTimeoutTimer; @@ -72,11 +73,12 @@ public sealed class Connect4Game : IDisposable public Connect4Game( ulong userId, string userName, - Options options - ) + Options options, + ICurrencyService cs) { _players[0] = (userId, userName); _options = options; + _cs = cs; _rng = new(); for (var i = 0; i < NUMBER_OF_COLUMNS * NUMBER_OF_ROWS; i++) @@ -97,13 +99,14 @@ public sealed class Connect4Game : IDisposable { _ = OnGameFailedToStart?.Invoke(this); CurrentPhase = Phase.Ended; + await _cs.AddAsync(_players[0].Value.UserId, _options.Bet, new("connect4", "refund")); } } finally { _locker.Release(); } }); } - public async Task Join(ulong userId, string userName) + public async Task Join(ulong userId, string userName, int bet) { await _locker.WaitAsync(); try @@ -114,6 +117,11 @@ public sealed class Connect4Game : IDisposable if (_players[0].Value.UserId == userId) // same user can't join own game return false; + if (bet != _options.Bet) // can't join if bet amount is not the same + return false; + + if (!await _cs.RemoveAsync(userId, bet, new("connect4", "bet"))) // user doesn't have enough money to gamble + return false; if (_rng.Next(0, 2) == 0) //rolling from 0-1, if number is 0, join as first player { @@ -343,8 +351,13 @@ public sealed class Connect4Game : IDisposable if (result == Result.Draw) { + _cs.AddAsync(CurrentPlayer.UserId, _options.Bet, new("connect4", "draw")); + _cs.AddAsync(OtherPlayer.UserId, _options.Bet, new("connect4", "draw")); return; } + + if (winId is not null) + _cs.AddAsync(winId.Value, (long)(_options.Bet * 1.98), new("connect4", "win")); } private Field GetPlayerPiece(ulong userId) @@ -381,10 +394,16 @@ public sealed class Connect4Game : IDisposable HelpText = "Turn time in seconds. It has to be between 5 and 60. Default 15.")] public int TurnTimer { get; set; } = 15; + [Option('b', "bet", Required = false, Default = 0, HelpText = "Amount you bet. Default 0.")] + public int Bet { get; set; } + public void NormalizeOptions() { if (TurnTimer is < 5 or > 60) TurnTimer = 15; + + if (Bet < 0) + Bet = 0; } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Connect4/Connect4Commands.cs b/src/EllieBot/Modules/Gambling/Connect4/Connect4Commands.cs index ca2900c..8210ad4 100644 --- a/src/EllieBot/Modules/Gambling/Connect4/Connect4Commands.cs +++ b/src/EllieBot/Modules/Gambling/Connect4/Connect4Commands.cs @@ -9,7 +9,7 @@ namespace EllieBot.Modules.Gambling; public partial class Gambling { [Group] - public partial class Connect4Commands : GamblingModule + public partial class Connect4Commands : GamblingSubmodule { private static readonly string[] _numbers = [ @@ -29,15 +29,17 @@ public partial class Gambling } private readonly DiscordSocketClient _client; + private readonly ICurrencyService _cs; private IUserMessage msg; private int repostCounter; - public Connect4Commands(DiscordSocketClient client, GamblingConfigService gamb) + public Connect4Commands(DiscordSocketClient client, ICurrencyService cs, GamblingConfigService gamb) : base(gamb) { _client = client; + _cs = cs; } [Cmd] @@ -46,8 +48,10 @@ public partial class Gambling public async Task Connect4(params string[] args) { var (options, _) = OptionsParser.ParseFrom(new Connect4Game.Options(), args); + if (!await CheckBetOptional(options.Bet)) + return; - var newGame = new Connect4Game(ctx.User.Id, ctx.User.ToString(), options); + var newGame = new Connect4Game(ctx.User.Id, ctx.User.ToString(), options, _cs); Connect4Game game; if ((game = _service.Connect4Games.GetOrAdd(ctx.Channel.Id, newGame)) != newGame) { @@ -56,17 +60,31 @@ public partial class Gambling newGame.Dispose(); //means game already exists, try to join - await game.Join(ctx.User.Id, ctx.User.ToString()); + await game.Join(ctx.User.Id, ctx.User.ToString(), options.Bet); return; } + if (options.Bet > 0) + { + if (!await _cs.RemoveAsync(ctx.User.Id, options.Bet, new("connect4", "bet"))) + { + await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); + _service.Connect4Games.TryRemove(ctx.Channel.Id, out _); + game.Dispose(); + return; + } + } + game.OnGameStateUpdated += Game_OnGameStateUpdated; game.OnGameFailedToStart += GameOnGameFailedToStart; game.OnGameEnded += GameOnGameEnded; _client.MessageReceived += ClientMessageReceived; game.Initialize(); - await Response().Confirm(strs.connect4_created).SendAsync(); + if (options.Bet == 0) + await Response().Confirm(strs.connect4_created).SendAsync(); + else + await Response().Error(strs.connect4_created_bet(N(options.Bet))).SendAsync(); Task ClientMessageReceived(SocketMessage arg) { @@ -133,19 +151,19 @@ public partial class Gambling title = GetText(strs.connect4_draw); return msg.ModifyAsync(x => x.Embed = _sender.CreateEmbed() - .WithTitle(title) - .WithDescription(GetGameStateText(game)) - .WithOkColor() - .Build()); + .WithTitle(title) + .WithDescription(GetGameStateText(game)) + .WithOkColor() + .Build()); } } private async Task Game_OnGameStateUpdated(Connect4Game game) { var embed = _sender.CreateEmbed() - .WithTitle($"{game.CurrentPlayer.Username} vs {game.OtherPlayer.Username}") - .WithDescription(GetGameStateText(game)) - .WithOkColor(); + .WithTitle($"{game.CurrentPlayer.Username} vs {game.OtherPlayer.Username}") + .WithDescription(GetGameStateText(game)) + .WithOkColor(); if (msg is null) @@ -180,7 +198,7 @@ public partial class Gambling for (var i = 0; i < Connect4Game.NUMBER_OF_COLUMNS; i++) sb.Append(_numbers[i]); - + return sb.ToString(); } } diff --git a/src/EllieBot/Modules/Gambling/Draw/DrawCommands.cs b/src/EllieBot/Modules/Gambling/Draw/DrawCommands.cs index 1bf1986..e39003d 100644 --- a/src/EllieBot/Modules/Gambling/Draw/DrawCommands.cs +++ b/src/EllieBot/Modules/Gambling/Draw/DrawCommands.cs @@ -12,7 +12,7 @@ namespace EllieBot.Modules.Gambling; public partial class Gambling { [Group] - public partial class DrawCommands : GamblingModule + public partial class DrawCommands : GamblingSubmodule { private static readonly ConcurrentDictionary _allDecks = new(); private readonly IImageCache _images; diff --git a/src/EllieBot/Modules/Gambling/Events/CurrencyEventsCommands.cs b/src/EllieBot/Modules/Gambling/Events/CurrencyEventsCommands.cs index 2f959fc..c5e836c 100644 --- a/src/EllieBot/Modules/Gambling/Events/CurrencyEventsCommands.cs +++ b/src/EllieBot/Modules/Gambling/Events/CurrencyEventsCommands.cs @@ -9,7 +9,7 @@ namespace EllieBot.Modules.Gambling; public partial class Gambling { [Group] - public partial class CurrencyEventsCommands : GamblingModule + public partial class CurrencyEventsCommands : GamblingSubmodule { public CurrencyEventsCommands(GamblingConfigService gamblingConf) : base(gamblingConf) diff --git a/src/EllieBot/Modules/Gambling/Events/GameStatusEvent.cs b/src/EllieBot/Modules/Gambling/Events/GameStatusEvent.cs index 73b97c0..aeb23c0 100644 --- a/src/EllieBot/Modules/Gambling/Events/GameStatusEvent.cs +++ b/src/EllieBot/Modules/Gambling/Events/GameStatusEvent.cs @@ -27,13 +27,17 @@ public class GameStatusEvent : ICurrencyEvent private readonly string _code; + private readonly char[] _sneakyGameStatusChars = Enumerable.Range(48, 10) + .Concat(Enumerable.Range(65, 26)) + .Concat(Enumerable.Range(97, 26)) + .Select(x => (char)x) + .ToArray(); + private readonly object _stopLock = new(); private readonly object _potLock = new(); private readonly IMessageSenderService _sender; - private static readonly EllieRandom _rng = new EllieRandom(); - public GameStatusEvent( DiscordSocketClient client, ICurrencyService cs, @@ -54,8 +58,7 @@ public class GameStatusEvent : ICurrencyEvent _opts = opt; _sender = sender; // generate code - - _code = new kwum(_rng.Next(1_000_000, 10_000_000)).ToString(); + _code = new(_sneakyGameStatusChars.Shuffle().Take(5).ToArray()); _t = new(OnTimerTick, null, Timeout.InfiniteTimeSpan, TimeSpan.FromSeconds(2)); if (_opts.Hours > 0) @@ -85,9 +88,9 @@ public class GameStatusEvent : ICurrencyEvent if (_isPotLimited) { await msg.ModifyAsync(m => - { - m.Embed = GetEmbed(PotSize).Build(); - }); + { + m.Embed = GetEmbed(PotSize).Build(); + }); } Log.Information("Game status event awarded {Count} users {Amount} currency.{Remaining}", diff --git a/src/EllieBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs b/src/EllieBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs index 8f3f589..2704495 100644 --- a/src/EllieBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs +++ b/src/EllieBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs @@ -11,7 +11,7 @@ namespace EllieBot.Modules.Gambling; public partial class Gambling { [Group] - public partial class FlipCoinCommands : GamblingModule + public partial class FlipCoinCommands : GamblingSubmodule { public enum BetFlipGuess : byte { diff --git a/src/EllieBot/Modules/Gambling/Gambling.cs b/src/EllieBot/Modules/Gambling/Gambling.cs index 95f66a9..52789d0 100644 --- a/src/EllieBot/Modules/Gambling/Gambling.cs +++ b/src/EllieBot/Modules/Gambling/Gambling.cs @@ -1,7 +1,6 @@ #nullable disable using LinqToDB; using LinqToDB.EntityFrameworkCore; -using LinqToDB.Tools; using EllieBot.Db.Models; using EllieBot.Modules.Gambling.Bank; using EllieBot.Modules.Gambling.Common; @@ -14,13 +13,7 @@ using System.Text; using EllieBot.Modules.Gambling.Rps; using EllieBot.Common.TypeReaders; using EllieBot.Modules.Patronage; -using SixLabors.Fonts; -using SixLabors.Fonts.Unicode; -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.Drawing.Processing; -using SixLabors.ImageSharp.PixelFormats; -using SixLabors.ImageSharp.Processing; -using Color = SixLabors.ImageSharp.Color; +using EllieBot.Modules.Utility; namespace EllieBot.Modules.Gambling; @@ -33,12 +26,12 @@ public partial class Gambling : GamblingModule private readonly NumberFormatInfo _enUsCulture; private readonly DownloadTracker _tracker; private readonly GamblingConfigService _configService; - private readonly FontProvider _fonts; private readonly IBankService _bank; private readonly IRemindService _remind; private readonly GamblingTxTracker _gamblingTxTracker; private readonly IPatronageService _ps; - private readonly RakebackService _rb; + + private IUserMessage rdMsg; public Gambling( IGamblingService gs, @@ -47,12 +40,10 @@ public partial class Gambling : GamblingModule DiscordSocketClient client, DownloadTracker tracker, GamblingConfigService configService, - FontProvider fonts, IBankService bank, IRemindService remind, IPatronageService patronage, - GamblingTxTracker gamblingTxTracker, - RakebackService rb) + GamblingTxTracker gamblingTxTracker) : base(configService) { _gs = gs; @@ -62,16 +53,13 @@ public partial class Gambling : GamblingModule _bank = bank; _remind = remind; _gamblingTxTracker = gamblingTxTracker; - _rb = rb; _ps = patronage; - _rng = new EllieRandom(); _enUsCulture = new CultureInfo("en-US", false).NumberFormat; _enUsCulture.NumberDecimalDigits = 0; _enUsCulture.NumberGroupSeparator = " "; _tracker = tracker; _configService = configService; - _fonts = fonts; } public async Task GetBalanceStringAsync(ulong userId) @@ -80,6 +68,70 @@ public partial class Gambling : GamblingModule return N(bal); } + [Cmd] + public async Task BetStats() + { + var stats = await _gamblingTxTracker.GetAllAsync(); + + var eb = _sender.CreateEmbed() + .WithOkColor(); + + var str = "` Feature `|`   Bet  `|`Paid Out`|`  RoI  `\n"; + str += "――――――――――――――――――――\n"; + foreach (var stat in stats) + { + var perc = (stat.PaidOut / stat.Bet).ToString("P2", Culture); + str += $"`{stat.Feature.PadBoth(9)}`" + + $"|`{stat.Bet.ToString("N0").PadLeft(8, ' ')}`" + + $"|`{stat.PaidOut.ToString("N0").PadLeft(8, ' ')}`" + + $"|`{perc.PadLeft(6, ' ')}`\n"; + } + + var bet = stats.Sum(x => x.Bet); + var paidOut = stats.Sum(x => x.PaidOut); + + if (bet == 0) + bet = 1; + + var tPerc = (paidOut / bet).ToString("P2", Culture); + str += "――――――――――――――――――――\n"; + str += $"` {("TOTAL").PadBoth(7)}` " + + $"|**{N(bet).PadLeft(8, ' ')}**" + + $"|**{N(paidOut).PadLeft(8, ' ')}**" + + $"|`{tPerc.PadLeft(6, ' ')}`"; + + eb.WithDescription(str); + + await Response().Embed(eb).SendAsync(); + } + + [Cmd] + public async Task Economy() + { + var ec = await _service.GetEconomyAsync(); + decimal onePercent = 0; + + // This stops the top 1% from owning more than 100% of the money + if (ec.Cash > 0) + { + onePercent = ec.OnePercent / (ec.Cash - ec.Bot); + } + + // [21:03] Bob Page: Kinda remids me of US economy + var embed = _sender.CreateEmbed() + .WithTitle(GetText(strs.economy_state)) + .AddField(GetText(strs.currency_owned), N(ec.Cash - ec.Bot)) + .AddField(GetText(strs.currency_one_percent), (onePercent * 100).ToString("F2") + "%") + .AddField(GetText(strs.currency_planted), N(ec.Planted)) + .AddField(GetText(strs.owned_waifus_total), N(ec.Waifus)) + .AddField(GetText(strs.bot_currency), N(ec.Bot)) + .AddField(GetText(strs.bank_accounts), N(ec.Bank)) + .AddField(GetText(strs.total), N(ec.Cash + ec.Planted + ec.Waifus + ec.Bank)) + .WithOkColor(); + + // ec.Cash already contains ec.Bot as it's the total of all values in the CurrencyAmount column of the DiscordUser table + await Response().Embed(embed).SendAsync(); + } private async Task RemindTimelyAction(SocketMessageComponent smc, DateTime when) { @@ -106,7 +158,7 @@ public partial class Gambling : GamblingModule customId: "timely:remind_me"), (smc) => RemindTimelyAction(smc, DateTime.UtcNow.Add(TimeSpan.FromHours(period))) ); - + // Creates timely reminder button, parameter in milliseconds. private EllieInteractionBase CreateRemindMeInteraction(double ms) => _inter @@ -118,21 +170,7 @@ public partial class Gambling : GamblingModule (smc) => RemindTimelyAction(smc, DateTime.UtcNow.Add(TimeSpan.FromMilliseconds(ms))) ); - private EllieInteractionBase CreateTimelyInteraction() - => _inter - .Create(ctx.User.Id, - new ButtonBuilder( - label: "Timely", - emote: Emoji.Parse("💰"), - customId: "timely:" + _rng.Next(123456, 999999)), - async (smc) => - { - await smc.DeferAsync(); - await ClaimTimely(); - }); - [Cmd] - [RequireContext(ContextType.Guild)] public async Task Timely() { var val = Config.Timely.Amount; @@ -143,71 +181,6 @@ public partial class Gambling : GamblingModule return; } - if (Config.Timely.ProtType == TimelyProt.Button) - { - var interaction = CreateTimelyInteraction(); - var msg = await Response().Pending(strs.timely_button).Interaction(interaction).SendAsync(); - await msg.DeleteAsync(); - return; - } - else if (Config.Timely.ProtType == TimelyProt.Captcha) - { - var password = _service.GeneratePassword(); - - var img = new Image(70, 35); - - 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(35, 17), - 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(); - } - } - - await ClaimTimely(); - } - - private async Task ClaimTimely() - { - var period = Config.Timely.Cooldown; if (await _service.ClaimTimelyAsync(ctx.User.Id, period) is { } remainder) { // Get correct time form remainder @@ -224,31 +197,7 @@ public partial class Gambling : GamblingModule await Response().Pending(strs.timely_already_claimed(relativeTag)).Interaction(interaction).SendAsync(); return; } - - - var val = Config.Timely.Amount; - var boostGuilds = Config.BoostBonus.GuildIds ?? new(); - var guildUsers = await boostGuilds - .Select(async gid => - { - try - { - var guild = await _client.Rest.GetGuildAsync(gid, false); - var user = await _client.Rest.GetGuildUserAsync(gid, ctx.User.Id); - return (guild, user); - } - catch - { - return default; - } - }) - .WhenAll(); - - var userInfo = guildUsers.FirstOrDefault(x => x.user?.PremiumSince is not null); - var booster = userInfo != default; - - if (booster) - val += Config.BoostBonus.BaseTimelyBonus; + var patron = await _ps.GetPatronAsync(ctx.User.Id); @@ -260,21 +209,7 @@ public partial class Gambling : GamblingModule await _cs.AddAsync(ctx.User.Id, val, new("timely", "claim")); - var msg = GetText(strs.timely(N(val), period)); - if (booster || percentBonus > float.Epsilon) - { - msg += "\n\n"; - if (booster) - msg += $"*+{N(Config.BoostBonus.BaseTimelyBonus)} bonus for boosting {userInfo.guild}!*\n"; - - if (percentBonus > float.Epsilon) - msg += - $"*+{percentBonus:P0} bonus for the [Patreon](https://patreon.com/elliebot) pledge! <:hart:746995901758832712>*"; - - await Response().Confirm(msg).Interaction(inter).SendAsync(); - } - else - await Response().Confirm(strs.timely(N(val), period)).Interaction(inter).SendAsync(); + await Response().Confirm(strs.timely(N(val), period)).Interaction(inter).SendAsync(); } [Cmd] @@ -385,9 +320,8 @@ 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(); @@ -643,9 +577,7 @@ 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(); } } @@ -666,10 +598,119 @@ public partial class Gambling : GamblingModule } else { + await Response().Error(strs.take_fail(N(amount), Format.Code(usrId.ToString()), CurrencySign)).SendAsync(); + } + } + + [Cmd] + [RequireContext(ContextType.Guild)] + public async Task RollDuel(IUser u) + { + if (ctx.User.Id == u.Id) + { + return; + } + + //since the challenge is created by another user, we need to reverse the ids + //if it gets removed, means challenge is accepted + if (_service.Duels.TryRemove((ctx.User.Id, u.Id), out var game)) + { + await game.StartGame(); + } + } + + [Cmd] + [RequireContext(ContextType.Guild)] + public async Task RollDuel([OverrideTypeReader(typeof(BalanceTypeReader))] long amount, IUser u) + { + if (ctx.User.Id == u.Id) + { + return; + } + + if (amount <= 0) + { + return; + } + + var embed = _sender.CreateEmbed().WithOkColor().WithTitle(GetText(strs.roll_duel)); + + var description = string.Empty; + + var game = new RollDuelGame(_cs, _client.CurrentUser.Id, ctx.User.Id, u.Id, amount); + //means challenge is just created + if (_service.Duels.TryGetValue((ctx.User.Id, u.Id), out var other)) + { + if (other.Amount != amount) + { + await Response().Error(strs.roll_duel_already_challenged).SendAsync(); + } + else + { + await RollDuel(u); + } + + return; + } + + if (_service.Duels.TryAdd((u.Id, ctx.User.Id), game)) + { + game.OnGameTick += GameOnGameTick; + game.OnEnded += GameOnEnded; + await Response() - .Error(strs.take_fail(N(amount), Format.Code(usrId.ToString()), CurrencySign)) + .Confirm(strs.roll_duel_challenge(Format.Bold(ctx.User.ToString()), + Format.Bold(u.ToString()), + Format.Bold(N(amount)))) .SendAsync(); } + + async Task GameOnGameTick(RollDuelGame arg) + { + var rolls = arg.Rolls.Last(); + description += $@"{Format.Bold(ctx.User.ToString())} rolled **{rolls.Item1}** +{Format.Bold(u.ToString())} rolled **{rolls.Item2}** +-- +"; + embed = embed.WithDescription(description); + + if (rdMsg is null) + { + rdMsg = await Response().Embed(embed).SendAsync(); + } + else + { + await rdMsg.ModifyAsync(x => { x.Embed = embed.Build(); }); + } + } + + async Task GameOnEnded(RollDuelGame rdGame, RollDuelGame.Reason reason) + { + try + { + if (reason == RollDuelGame.Reason.Normal) + { + var winner = rdGame.Winner == rdGame.P1 ? ctx.User : u; + description += $"\n**{winner}** Won {N((long)(rdGame.Amount * 2 * 0.98))}"; + + embed = embed.WithDescription(description); + + await rdMsg.ModifyAsync(x => x.Embed = embed.Build()); + } + else if (reason == RollDuelGame.Reason.Timeout) + { + await Response().Error(strs.roll_duel_timeout).SendAsync(); + } + else if (reason == RollDuelGame.Reason.NoFunds) + { + await Response().Error(strs.roll_duel_no_funds).SendAsync(); + } + } + finally + { + _service.Duels.TryRemove((u.Id, ctx.User.Id), out _); + } + } } [Cmd] @@ -726,6 +767,8 @@ public partial class Gambling : GamblingModule var (opts, _) = OptionsParser.ParseFrom(new LbOpts(), args); + // List cleanRichest; + // it's pointless to have clean on dm context if (ctx.Guild is null) { opts.Clean = false; @@ -739,18 +782,13 @@ public partial class Gambling : GamblingModule await ctx.Channel.TriggerTypingAsync(); await _tracker.EnsureUsersDownloadedAsync(ctx.Guild); - var users = ((SocketGuild)ctx.Guild).Users.Map(x => x.Id); - var perPage = 9; - await using var uow = _db.GetDbContext(); - var cleanRichest = await uow.GetTable() - .Where(x => x.UserId.In(users)) - .OrderByDescending(x => x.CurrencyAmount) - .Skip(curPage * perPage) - .Take(perPage) - .ToListAsync(); - return cleanRichest; + var cleanRichest = await uow.Set() + .GetTopRichest(_client.CurrentUser.Id, 0, 1000); + + var sg = (SocketGuild)ctx.Guild!; + return cleanRichest.Where(x => sg.GetUser(x.UserId) is not null).ToList(); } else { @@ -759,9 +797,13 @@ public partial class Gambling : GamblingModule } } + var res = Response() + .Paginated(); + await Response() .Paginated() .PageItems(GetTopRichest) + .TotalElements(900) .PageSize(9) .CurrentPage(page) .Page((toSend, curPage) => @@ -862,8 +904,6 @@ public partial class Gambling : GamblingModule private static readonly ImmutableArray _emojis = new[] { "⬆", "↖", "⬅", "↙", "⬇", "↘", "➡", "↗" }.ToImmutableArray(); - private readonly EllieRandom _rng; - [Cmd] public async Task LuckyLadder([OverrideTypeReader(typeof(BalanceTypeReader))] long amount) @@ -1002,45 +1042,4 @@ public partial class Gambling : GamblingModule footer: $"Total Bet: {tests} | Payout: {payout:F0} | {payout * 1.0M / tests * 100}%") .SendAsync(); } - - private EllieInteractionBase CreateRakebackInteraction() - => _inter.Create(ctx.User.Id, - new ButtonBuilder( - customId: "cash:rakeback", - emote: new Emoji("💸")), - RakebackAction); - - private async Task RakebackAction(SocketMessageComponent arg) - { - var rb = await _rb.ClaimRakebackAsync(ctx.User.Id); - - if (rb == 0) - { - await arg.DeferAsync(); - return; - } - - await arg.RespondAsync(_sender, GetText(strs.rakeback_claimed(N(rb))), MsgType.Ok); - } - - [Cmd] - public async Task Rakeback() - { - var rb = await _rb.GetRakebackAsync(ctx.User.Id); - - if (rb < 1) - { - await Response() - .Error(strs.rakeback_none) - .SendAsync(); - - return; - } - - var inter = CreateRakebackInteraction(); - await Response() - .Pending(strs.rakeback_available(N(rb))) - .Interaction(inter) - .SendAsync(); - } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/GamblingConfig.cs b/src/EllieBot/Modules/Gambling/GamblingConfig.cs index 385945d..0100c88 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; } = 12; + public int Version { get; set; } = 2; [Comment("""Currency settings""")] public CurrencyConfig Currency { get; set; } @@ -20,9 +20,9 @@ public sealed partial class GamblingConfig : ICloneable public int MinBet { get; set; } = 0; [Comment(""" - Maximum amount users can bet - Set 0 for unlimited - """)] + Maximum amount users can bet + Set 0 for unlimited + """)] public int MaxBet { get; set; } = 0; [Comment("""Settings for betflip command""")] @@ -35,14 +35,14 @@ public sealed partial class GamblingConfig : ICloneable public GenerationConfig Generation { get; set; } [Comment(""" - Settings for timely command - (letting people claim X amount of currency every Y hours) - """)] + Settings for timely command + (letting people claim X amount of currency every Y hours) + """)] public TimelyConfig Timely { get; set; } [Comment("""How much will each user's owned currency decay over time.""")] public DecayConfig Decay { get; set; } - + [Comment("""What is the bot's cut on some transactions""")] public BotCutConfig BotCuts { get; set; } @@ -53,25 +53,20 @@ public sealed partial class GamblingConfig : ICloneable public WaifuConfig Waifu { get; set; } [Comment(""" - Amount of currency selfhosters will get PER pledged dollar CENT. - 1 = 100 currency per $. Used almost exclusively on public ellie. - """)] + Amount of currency selfhosters will get PER pledged dollar CENT. + 1 = 100 currency per $. Used almost exclusively on public ellie. + """)] public decimal PatreonCurrencyPerCent { get; set; } = 1; [Comment(""" - Currency reward per vote. - This will work only if you've set up VotesApi and correct credentials for topgg and/or discords voting - """)] + Currency reward per vote. + This will work only if you've set up VotesApi and correct credentials for topgg and/or discords voting + """)] public long VoteReward { get; set; } = 100; [Comment("""Slot config""")] public SlotsConfig Slots { get; set; } - [Comment(""" - Bonus config for server boosts - """)] - public BoostBonusConfig BoostBonus { get; set; } - public GamblingConfig() { BetRoll = new(); @@ -84,7 +79,6 @@ public sealed partial class GamblingConfig : ICloneable Slots = new(); LuckyLadder = new(); BotCuts = new(); - BoostBonus = new(); } } @@ -97,9 +91,9 @@ public class CurrencyConfig public string Name { get; set; } = "Ellie Money"; [Comment(""" - For how long (in days) will the transactions be kept in the database (curtrs) - Set 0 to disable cleanup (keep transactions forever) - """)] + For how long (in days) will the transactions be kept in the database (curtrs) + Set 0 to disable cleanup (keep transactions forever) + """)] public int TransactionsLifetime { get; set; } = 0; } @@ -107,29 +101,16 @@ public class CurrencyConfig public partial class TimelyConfig { [Comment(""" - How much currency will the users get every time they run .timely command - setting to 0 or less will disable this feature - """)] - public long Amount { get; set; } = 0; + How much currency will the users get every time they run .timely command + setting to 0 or less will disable this feature + """)] + public int Amount { get; set; } = 0; [Comment(""" - How often (in hours) can users claim currency with .timely command - setting to 0 or less will disable this feature - """)] + How often (in hours) can users claim currency with .timely command + setting to 0 or less will disable this feature + """)] public int Cooldown { get; set; } = 24; - - [Comment(""" - How will timely be protected? - None, Button (users have to click the button) or Captcha (users have to type the captcha from an image) - """)] - public TimelyProt ProtType { get; set; } = TimelyProt.Button; -} - -public enum TimelyProt -{ - None, - Button, - Captcha } [Cloneable] @@ -143,10 +124,10 @@ public partial class BetFlipConfig public partial class BetRollConfig { [Comment(""" - When betroll is played, user will roll a number 0-100. - This setting will describe which multiplier is used for when the roll is higher than the given number. - Doesn't have to be ordered. - """)] + When betroll is played, user will roll a number 0-100. + This setting will describe which multiplier is used for when the roll is higher than the given number. + Doesn't have to be ordered. + """)] public BetRollPair[] Pairs { get; set; } = Array.Empty(); public BetRollConfig() @@ -164,7 +145,7 @@ public partial class BetRollConfig }, new() { - WhenAbove = 65, + WhenAbove = 66, MultiplyBy = 2 } ]; @@ -174,17 +155,17 @@ public partial class BetRollConfig public partial class GenerationConfig { [Comment(""" - when currency is generated, should it also have a random password - associated with it which users have to type after the .pick command - in order to get it - """)] + when currency is generated, should it also have a random password + associated with it which users have to type after the .pick command + in order to get it + """)] public bool HasPassword { get; set; } = true; [Comment(""" - Every message sent has a certain % chance to generate the currency - specify the percentage here (1 being 100%, 0 being 0% - for example - default is 0.02, which is 2% - """)] + Every message sent has a certain % chance to generate the currency + specify the percentage here (1 being 100%, 0 being 0% - for example + default is 0.02, which is 2% + """)] public decimal Chance { get; set; } = 0.02M; [Comment("""How many seconds have to pass for the next message to have a chance to spawn currency""")] @@ -194,9 +175,9 @@ public partial class GenerationConfig public int MinAmount { get; set; } = 1; [Comment(""" - Maximum amount of currency that can spawn. - Set to the same value as MinAmount to always spawn the same amount - """)] + Maximum amount of currency that can spawn. + Set to the same value as MinAmount to always spawn the same amount + """)] public int MaxAmount { get; set; } = 1; } @@ -204,9 +185,9 @@ public partial class GenerationConfig public partial class DecayConfig { [Comment(""" - Percentage of user's current currency which will be deducted every 24h. - 0 - 1 (1 is 100%, 0.5 50%, 0 disabled) - """)] + Percentage of user's current currency which will be deducted every 24h. + 0 - 1 (1 is 100%, 0.5 50%, 0 disabled) + """)] public decimal Percent { get; set; } = 0; [Comment("""Maximum amount of user's currency that can decay at each interval. 0 for unlimited.""")] @@ -226,7 +207,7 @@ public partial class LuckyLadderSettings public decimal[] Multipliers { get; set; } public LuckyLadderSettings() - => Multipliers = [2.4M, 1.7M, 1.5M, 1.1M, 0.5M, 0.3M, 0.2M, 0.1M]; + => Multipliers = [2.4M, 1.7M, 1.5M, 1.2M, 0.5M, 0.3M, 0.2M, 0.1M]; } [Cloneable] @@ -238,15 +219,15 @@ public sealed partial class WaifuConfig public MultipliersData Multipliers { get; set; } = new(); [Comment(""" - Settings for periodic waifu price decay. - Waifu price decays only if the waifu has no claimer. - """)] + Settings for periodic waifu price decay. + Waifu price decays only if the waifu has no claimer. + """)] public WaifuDecayConfig Decay { get; set; } = new(); [Comment(""" - List of items available for gifting. - If negative is true, gift will instead reduce waifu value. - """)] + List of items available for gifting. + If negative is true, gift will instead reduce waifu value. + """)] public List Items { get; set; } = []; public WaifuConfig() @@ -293,26 +274,19 @@ public sealed partial class WaifuConfig public class WaifuDecayConfig { [Comment(""" - Unclaimed waifus will decay by this percentage (0 - 100). - Default is 0 (disabled) - For example if a waifu has a price of 500$, setting this value to 10 would reduce the waifu value by 10% (50$) - """)] - public int UnclaimedDecayPercent { get; set; } = 0; - - [Comment(""" - Claimed waifus will decay by this percentage (0 - 100). - Default is 0 (disabled) - For example if a waifu has a price of 500$, setting this value to 10 would reduce the waifu value by 10% (50$) - """)] - public int ClaimedDecayPercent { get; set; } = 0; + Percentage (0 - 100) of the waifu value to reduce. + Set 0 to disable + For example if a waifu has a price of 500$, setting this value to 10 would reduce the waifu value by 10% (50$) + """)] + public int Percent { get; set; } = 0; [Comment("""How often to decay waifu values, in hours""")] public int HourInterval { get; set; } = 24; [Comment(""" - Minimum waifu price required for the decay to be applied. - For example if this value is set to 300, any waifu with the price 300 or less will not experience decay. - """)] + Minimum waifu price required for the decay to be applied. + For example if this value is set to 300, any waifu with the price 300 or less will not experience decay. + """)] public long MinPrice { get; set; } = 300; } } @@ -321,54 +295,54 @@ public sealed partial class WaifuConfig public sealed partial class MultipliersData { [Comment(""" - Multiplier for waifureset. Default 150. - Formula (at the time of writing this): - price = (waifu_price * 1.25f) + ((number_of_divorces + changes_of_heart + 2) * WaifuReset) rounded up - """)] + Multiplier for waifureset. Default 150. + Formula (at the time of writing this): + price = (waifu_price * 1.25f) + ((number_of_divorces + changes_of_heart + 2) * WaifuReset) rounded up + """)] public int WaifuReset { get; set; } = 150; [Comment(""" - The minimum amount of currency that you have to pay - in order to buy a waifu who doesn't have a crush on you. - Default is 1.1 - Example: If a waifu is worth 100, you will have to pay at least 100 * NormalClaim currency to claim her. - (100 * 1.1 = 110) - """)] + The minimum amount of currency that you have to pay + in order to buy a waifu who doesn't have a crush on you. + Default is 1.1 + Example: If a waifu is worth 100, you will have to pay at least 100 * NormalClaim currency to claim her. + (100 * 1.1 = 110) + """)] public decimal NormalClaim { get; set; } = 1.1m; [Comment(""" - The minimum amount of currency that you have to pay - in order to buy a waifu that has a crush on you. - Default is 0.88 - Example: If a waifu is worth 100, you will have to pay at least 100 * CrushClaim currency to claim her. - (100 * 0.88 = 88) - """)] + The minimum amount of currency that you have to pay + in order to buy a waifu that has a crush on you. + Default is 0.88 + Example: If a waifu is worth 100, you will have to pay at least 100 * CrushClaim currency to claim her. + (100 * 0.88 = 88) + """)] public decimal CrushClaim { get; set; } = 0.88M; [Comment(""" - When divorcing a waifu, her new value will be her current value multiplied by this number. - Default 0.75 (meaning will lose 25% of her value) - """)] + When divorcing a waifu, her new value will be her current value multiplied by this number. + Default 0.75 (meaning will lose 25% of her value) + """)] public decimal DivorceNewValue { get; set; } = 0.75M; [Comment(""" - All gift prices will be multiplied by this number. - Default 1 (meaning no effect) - """)] + All gift prices will be multiplied by this number. + Default 1 (meaning no effect) + """)] public decimal AllGiftPrices { get; set; } = 1.0M; [Comment(""" - What percentage of the value of the gift will a waifu gain when she's gifted. - Default 0.95 (meaning 95%) - Example: If a waifu is worth 1000, and she receives a gift worth 100, her new value will be 1095) - """)] + What percentage of the value of the gift will a waifu gain when she's gifted. + Default 0.95 (meaning 95%) + Example: If a waifu is worth 1000, and she receives a gift worth 100, her new value will be 1095) + """)] public decimal GiftEffect { get; set; } = 0.95M; [Comment(""" - What percentage of the value of the gift will a waifu lose when she's gifted a gift marked as 'negative'. - Default 0.5 (meaning 50%) - Example: If a waifu is worth 1000, and she receives a negative gift worth 100, her new value will be 950) - """)] + What percentage of the value of the gift will a waifu lose when she's gifted a gift marked as 'negative'. + Default 0.5 (meaning 50%) + Example: If a waifu is worth 1000, and she receives a negative gift worth 100, her new value will be 950) + """)] public decimal NegativeGiftEffect { get; set; } = 0.50M; } @@ -427,15 +401,4 @@ 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; } = new(); - - [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 c9ed91f..6fb8ff2 100644 --- a/src/EllieBot/Modules/Gambling/GamblingConfigService.cs +++ b/src/EllieBot/Modules/Gambling/GamblingConfigService.cs @@ -144,11 +144,6 @@ public sealed class GamblingConfigService : ConfigServiceBase ConfigPrinters.ToString, val => val >= 0); - AddParsedProp("timely.prot", - gs => gs.Timely.ProtType, - ConfigParsers.InsensitiveEnum, - ConfigPrinters.ToString); - Migrate(); } @@ -172,6 +167,22 @@ public sealed class GamblingConfigService : ConfigServiceBase }); } + if (data.Version < 5) + { + ModifyConfig(c => + { + c.Version = 5; + }); + } + + if (data.Version < 6) + { + ModifyConfig(c => + { + c.Version = 6; + }); + } + if (data.Version < 7) { ModifyConfig(c => @@ -179,27 +190,5 @@ public sealed class GamblingConfigService : ConfigServiceBase c.Version = 7; }); } - - if (data.Version < 8) - { - ModifyConfig(c => - { - c.Version = 8; - c.Waifu.Decay.UnclaimedDecayPercent = 0; - }); - } - - if (data.Version < 12) - { - ModifyConfig(c => - { - c.Version = 12; - - if (c.BetRoll.Pairs.Length == 3 && c.BetRoll.Pairs[2].WhenAbove == 66) - { - c.BetRoll.Pairs[2].WhenAbove = 65; - } - }); - } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/GamblingService.cs b/src/EllieBot/Modules/Gambling/GamblingService.cs index da76900..a324437 100644 --- a/src/EllieBot/Modules/Gambling/GamblingService.cs +++ b/src/EllieBot/Modules/Gambling/GamblingService.cs @@ -2,6 +2,7 @@ using LinqToDB; using LinqToDB.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Gambling.Common; using EllieBot.Modules.Gambling.Common.Connect4; @@ -16,7 +17,6 @@ public class GamblingService : IEService, IReadyExecutor private readonly DiscordSocketClient _client; private readonly IBotCache _cache; private readonly GamblingConfigService _gss; - private readonly EllieRandom _rng; private static readonly TypedKey _curDecayKey = new("currency:last_decay"); @@ -30,19 +30,11 @@ public class GamblingService : IEService, IReadyExecutor _client = client; _cache = cache; _gss = gss; - _rng = new EllieRandom(); } public Task OnReadyAsync() => Task.WhenAll(CurrencyDecayLoopAsync(), TransactionClearLoopAsync()); - - public string GeneratePassword() - { - var num = _rng.Next((int)Math.Pow(31, 2), (int)Math.Pow(32, 3)); - return new kwum(num).ToString(); - } - private async Task TransactionClearLoopAsync() { if (_client.ShardId != 0) @@ -61,7 +53,7 @@ public class GamblingService : IEService, IReadyExecutor var days = TimeSpan.FromDays(lifetime); await using var uow = _db.GetDbContext(); await uow.Set() - .DeleteAsync(ct => ct.DateAdded == null || now - ct.DateAdded < days); + .DeleteAsync(ct => ct.DateAdded == null || now - ct.DateAdded < days); } catch (Exception ex) { @@ -99,11 +91,11 @@ public class GamblingService : IEService, IReadyExecutor } Log.Information(""" - --- Decaying users' currency --- - | decay: {ConfigDecayPercent}% - | max: {MaxDecay} - | threshold: {DecayMinTreshold} - """, + --- Decaying users' currency --- + | decay: {ConfigDecayPercent}% + | max: {MaxDecay} + | threshold: {DecayMinTreshold} + """, config.Decay.Percent * 100, maxDecay, config.Decay.MinThreshold); @@ -113,14 +105,14 @@ public class GamblingService : IEService, IReadyExecutor var decay = (double)config.Decay.Percent; await uow.Set() - .Where(x => x.CurrencyAmount > config.Decay.MinThreshold && x.UserId != _client.CurrentUser.Id) - .UpdateAsync(old => new() - { - CurrencyAmount = - maxDecay > Sql.Round((old.CurrencyAmount * decay) - 0.5) - ? (long)(old.CurrencyAmount - Sql.Round((old.CurrencyAmount * decay) - 0.5)) - : old.CurrencyAmount - maxDecay - }); + .Where(x => x.CurrencyAmount > config.Decay.MinThreshold && x.UserId != _client.CurrentUser.Id) + .UpdateAsync(old => new() + { + CurrencyAmount = + maxDecay > Sql.Round((old.CurrencyAmount * decay) - 0.5) + ? (long)(old.CurrencyAmount - Sql.Round((old.CurrencyAmount * decay) - 0.5)) + : old.CurrencyAmount - maxDecay + }); await uow.SaveChangesAsync(); @@ -137,6 +129,38 @@ public class GamblingService : IEService, IReadyExecutor private static readonly TypedKey _ecoKey = new("ellie:economy"); + public async Task GetEconomyAsync() + { + var data = await _cache.GetOrAddAsync(_ecoKey, + async () => + { + await using var uow = _db.GetDbContext(); + var cash = uow.Set().GetTotalCurrency(); + var onePercent = uow.Set().GetTopOnePercentCurrency(_client.CurrentUser.Id); + decimal planted = uow.Set().AsQueryable().Sum(x => x.Amount); + var waifus = uow.Set().GetTotalValue(); + var bot = await uow.Set().GetUserCurrencyAsync(_client.CurrentUser.Id); + decimal bank = await uow.GetTable() + .SumAsyncLinqToDB(x => x.Balance); + + var result = new EconomyResult + { + Cash = cash, + Planted = planted, + Bot = bot, + Waifus = waifus, + OnePercent = onePercent, + Bank = bank + }; + + return result; + }, + TimeSpan.FromMinutes(3)); + + return data; + } + + private static readonly SemaphoreSlim _timelyLock = new(1, 1); private static TypedKey> _timelyKey @@ -187,9 +211,8 @@ public class GamblingService : IEService, IReadyExecutor public bool UserHasTimelyReminder(ulong userId) { var db = _db.GetDbContext(); - return db.GetTable() - .Any(x => x.UserId == userId - && x.Type == ReminderType.Timely); + return db.GetTable().Any(x => x.UserId == userId + && x.Type == ReminderType.Timely); } public async Task RemoveAllTimelyClaimsAsync() diff --git a/src/EllieBot/Modules/Gambling/GamblingTopLevelModule.cs b/src/EllieBot/Modules/Gambling/GamblingTopLevelModule.cs index ae73908..25cbb73 100644 --- a/src/EllieBot/Modules/Gambling/GamblingTopLevelModule.cs +++ b/src/EllieBot/Modules/Gambling/GamblingTopLevelModule.cs @@ -57,4 +57,12 @@ public abstract class GamblingModule : EllieModule return Task.FromResult(true); return InternalCheckBet(amount); } +} + +public abstract class GamblingSubmodule : GamblingModule +{ + protected GamblingSubmodule(GamblingConfigService gamblingConfService) + : base(gamblingConfService) + { + } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/PlantPick/PlantAndPickCommands.cs b/src/EllieBot/Modules/Gambling/PlantPick/PlantAndPickCommands.cs index 7723a6a..67994c8 100644 --- a/src/EllieBot/Modules/Gambling/PlantPick/PlantAndPickCommands.cs +++ b/src/EllieBot/Modules/Gambling/PlantPick/PlantAndPickCommands.cs @@ -8,7 +8,7 @@ namespace EllieBot.Modules.Gambling; public partial class Gambling { [Group] - public partial class PlantPickCommands : GamblingModule + public partial class PlantPickCommands : GamblingSubmodule { private readonly ILogCommandService _logService; diff --git a/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs b/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs index 5a732a5..6b50a1e 100644 --- a/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs +++ b/src/EllieBot/Modules/Gambling/PlantPick/PlantPickService.cs @@ -1,11 +1,9 @@ #nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; using EllieBot.Db.Models; using SixLabors.Fonts; -using SixLabors.Fonts.Unicode; using SixLabors.ImageSharp; using SixLabors.ImageSharp.Drawing.Processing; using SixLabors.ImageSharp.PixelFormats; @@ -28,21 +26,20 @@ public class PlantPickService : IEService, IExecNoCommand private readonly EllieRandom _rng; private readonly DiscordSocketClient _client; private readonly GamblingConfigService _gss; - private readonly GamblingService _gs; private readonly ConcurrentHashSet _generationChannels; private readonly SemaphoreSlim _pickLock = new(1, 1); public PlantPickService( DbService db, + CommandHandler cmd, IBotStrings strings, IImageCache images, FontProvider fonts, ICurrencyService cs, CommandHandler cmdHandler, DiscordSocketClient client, - GamblingConfigService gss, - GamblingService gs) + GamblingConfigService gss) { _db = db; _strings = strings; @@ -53,8 +50,7 @@ public class PlantPickService : IEService, IExecNoCommand _rng = new(); _client = client; _gss = gss; - _gs = gs; - + using var uow = db.GetDbContext(); var guildIds = client.Guilds.Select(x => x.Id).ToList(); var configs = uow.Set() @@ -93,7 +89,6 @@ public class PlantPickService : IEService, IExecNoCommand var toDelete = guildConfig.GenerateCurrencyChannelIds.FirstOrDefault(x => x.Equals(toAdd)); if (toDelete is not null) uow.Remove(toDelete); - _generationChannels.TryRemove(cid); enabled = false; } @@ -113,22 +108,19 @@ public class PlantPickService : IEService, IExecNoCommand /// Get a random currency image stream, with an optional password sticked onto it. /// /// Optional password to add to top left corner. + /// Extension of the file, defaults to png /// Stream of the currency image public async Task<(Stream, string)> GetRandomCurrencyImageAsync(string pass) { var curImg = await _images.GetCurrencyImageAsync(); - if (curImg is null) - return (new MemoryStream(), null); - if (string.IsNullOrWhiteSpace(pass)) { // determine the extension - using var load = Image.Load(curImg); + using var load = _ = Image.Load(curImg, out var format); - var format = load.Metadata.DecodedImageFormat; // return the image - return (curImg.ToStream(), format?.FileExtensions.FirstOrDefault() ?? "png"); + return (curImg.ToStream(), format.FileExtensions.FirstOrDefault() ?? "png"); } // get the image stream and extension @@ -145,49 +137,29 @@ public class PlantPickService : IEService, IExecNoCommand { // draw lower, it looks better pass = pass.TrimTo(10, true).ToLowerInvariant(); - using var img = Image.Load(curImg); + using var img = Image.Load(curImg, out var format); // choose font size based on the image height, so that it's visible - var font = _fonts.NotoSans.CreateFont(img.Height / 11.0f, FontStyle.Bold); + var font = _fonts.NotoSans.CreateFont(img.Height / 12.0f, FontStyle.Bold); img.Mutate(x => { // measure the size of the text to be drawing - var size = TextMeasurer.MeasureSize(pass, - new RichTextOptions(font) - { - Origin = new PointF(0, 0) - }); + var size = TextMeasurer.Measure(pass, new TextOptions(font) + { + Origin = new PointF(0, 0) + }); // fill the background with black, add 5 pixels on each side to make it look better x.FillPolygon(Color.ParseHex("00000080"), - new PointF(1, 1), + new PointF(0, 0), new PointF(size.Width + 5, 0), new PointF(size.Width + 5, size.Height + 10), new PointF(0, size.Height + 10)); - var strikeoutRun = new RichTextRun - { - Start = 0, - End = pass.GetGraphemeCount(), - Font = font, - StrikeoutPen = new SolidPen(Color.White, 2), - TextDecorations = TextDecorations.Strikeout - }; - // draw the password over the background - x.DrawText(new RichTextOptions(font) - { - Origin = new(0, 0), - TextRuns = - [ - strikeoutRun - ] - }, - pass, - new SolidBrush(Color.White)); + x.DrawText(pass, font, Color.White, new(0, 0)); }); // return image as a stream for easy sending - var format = img.Metadata.DecodedImageFormat; - return (img.ToStream(format), format?.FileExtensions.FirstOrDefault() ?? "png"); + return (img.ToStream(format), format.FileExtensions.FirstOrDefault() ?? "png"); } private Task PotentialFlowerGeneration(IUserMessage imsg) @@ -233,7 +205,7 @@ public class PlantPickService : IEService, IExecNoCommand + " " + GetText(channel.GuildId, strs.pick_pl(prefix)); - var pw = config.Generation.HasPassword ? _gs.GeneratePassword().ToUpperInvariant() : null; + var pw = config.Generation.HasPassword ? GenerateCurrencyPassword().ToUpperInvariant() : null; IUserMessage sent; var (stream, ext) = await GetRandomCurrencyImageAsync(pw); @@ -257,44 +229,66 @@ public class PlantPickService : IEService, IExecNoCommand return Task.CompletedTask; } + /// + /// Generate a hexadecimal string from 1000 to ffff. + /// + /// A hexadecimal string from 1000 to ffff + private string GenerateCurrencyPassword() + { + // generate a number from 1000 to ffff + var num = _rng.Next(4096, 65536); + // convert it to hexadecimal + return num.ToString("x4"); + } + public async Task PickAsync( ulong gid, ITextChannel ch, ulong uid, string pass) { - long amount; - ulong[] ids; - await using (var uow = _db.GetDbContext()) - { - // this method will sum all plants with that password, - // remove them, and get messageids of the removed plants - - pass = pass?.Trim().TrimTo(10, true)?.ToUpperInvariant(); - // gets all plants in this channel with the same password - var entries = await uow.GetTable() - .Where(x => x.ChannelId == ch.Id && pass == x.Password) - .DeleteWithOutputAsync(); - - if (!entries.Any()) - return 0; - - amount = entries.Sum(x => x.Amount); - ids = entries.Select(x => x.MessageId).ToArray(); - } - - if (amount > 0) - await _cs.AddAsync(uid, amount, new("currency", "collect")); - - + await _pickLock.WaitAsync(); try { - _ = ch.DeleteMessagesAsync(ids); - } - catch { } + long amount; + ulong[] ids; + await using (var uow = _db.GetDbContext()) + { + // this method will sum all plants with that password, + // remove them, and get messageids of the removed plants - // return the amount of currency the user picked - return amount; + pass = pass?.Trim().TrimTo(10, true).ToUpperInvariant(); + // gets all plants in this channel with the same password + var entries = uow.Set().AsQueryable() + .Where(x => x.ChannelId == ch.Id && pass == x.Password) + .ToList(); + // sum how much currency that is, and get all of the message ids (so that i can delete them) + amount = entries.Sum(x => x.Amount); + ids = entries.Select(x => x.MessageId).ToArray(); + // remove them from the database + uow.RemoveRange(entries); + + + if (amount > 0) + // give the picked currency to the user + await _cs.AddAsync(uid, amount, new("currency", "collect")); + await uow.SaveChangesAsync(); + } + + try + { + // delete all of the plant messages which have just been picked + _ = ch.DeleteMessagesAsync(ids); + } + catch { } + + // return the amount of currency the user picked + return amount; + } + finally + { + _pickLock.Release(); + } } public async Task SendPlantMessageAsync( @@ -377,16 +371,15 @@ public class PlantPickService : IEService, IExecNoCommand string pass) { await using var uow = _db.GetDbContext(); - uow.Set() - .Add(new() - { - Amount = amount, - GuildId = gid, - ChannelId = cid, - Password = pass, - UserId = uid, - MessageId = mid - }); + uow.Set().Add(new() + { + Amount = amount, + GuildId = gid, + ChannelId = cid, + Password = pass, + UserId = uid, + MessageId = mid + }); await uow.SaveChangesAsync(); } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleCommands.cs b/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleCommands.cs new file mode 100644 index 0000000..513aa59 --- /dev/null +++ b/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleCommands.cs @@ -0,0 +1,61 @@ +#nullable disable +using EllieBot.Common.TypeReaders; +using EllieBot.Modules.Gambling.Common; +using EllieBot.Modules.Gambling.Services; + +namespace EllieBot.Modules.Gambling; + +public partial class Gambling +{ + public partial class CurrencyRaffleCommands : GamblingSubmodule + { + public enum Mixed { Mixed } + + public CurrencyRaffleCommands(GamblingConfigService gamblingConfService) + : base(gamblingConfService) + { + } + + [Cmd] + [RequireContext(ContextType.Guild)] + [Priority(0)] + public Task RaffleCur(Mixed _, [OverrideTypeReader(typeof(BalanceTypeReader))] long amount) + => RaffleCur(amount, true); + + [Cmd] + [RequireContext(ContextType.Guild)] + [Priority(1)] + public async Task RaffleCur([OverrideTypeReader(typeof(BalanceTypeReader))] long amount, bool mixed = false) + { + if (!await CheckBetMandatory(amount)) + return; + + async Task OnEnded(IUser arg, long won) + { + await Response() + .Confirm(GetText(strs.rafflecur_ended(CurrencyName, + Format.Bold(arg.ToString()), + won + CurrencySign))) + .SendAsync(); + } + + var res = await _service.JoinOrCreateGame(ctx.Channel.Id, ctx.User, amount, mixed, OnEnded); + + if (res.Item1 is not null) + { + await Response() + .Confirm(GetText(strs.rafflecur(res.Item1.GameType.ToString())), + string.Join("\n", res.Item1.Users.Select(x => $"{x.DiscordUser} ({N(x.Amount)})")), + footer: GetText(strs.rafflecur_joined(ctx.User.ToString()))) + .SendAsync(); + } + else + { + if (res.Item2 == CurrencyRaffleService.JoinErrorType.AlreadyJoinedOrInvalidAmount) + await Response().Error(strs.rafflecur_already_joined).SendAsync(); + else if (res.Item2 == CurrencyRaffleService.JoinErrorType.NotEnoughCurrency) + await Response().Error(strs.not_enough(CurrencySign)).SendAsync(); + } + } + } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleGame.cs b/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleGame.cs new file mode 100644 index 0000000..d6f5770 --- /dev/null +++ b/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleGame.cs @@ -0,0 +1,69 @@ +#nullable disable +namespace EllieBot.Modules.Gambling.Common; + +public class CurrencyRaffleGame +{ + public enum Type + { + Mixed, + Normal + } + + public IEnumerable Users + => _users; + + public Type GameType { get; } + + private readonly HashSet _users = new(); + + public CurrencyRaffleGame(Type type) + => GameType = type; + + public bool AddUser(IUser usr, long amount) + { + // if game type is normal, and someone already joined the game + // (that's the user who created it) + if (GameType == Type.Normal && _users.Count > 0 && _users.First().Amount != amount) + return false; + + if (!_users.Add(new() + { + DiscordUser = usr, + Amount = amount + })) + return false; + + return true; + } + + public User GetWinner() + { + var rng = new EllieRandom(); + if (GameType == Type.Mixed) + { + var num = rng.NextLong(0L, Users.Sum(x => x.Amount)); + var sum = 0L; + foreach (var u in Users) + { + sum += u.Amount; + if (sum > num) + return u; + } + } + + var usrs = _users.ToArray(); + return usrs[rng.Next(0, usrs.Length)]; + } + + public class User + { + public IUser DiscordUser { get; set; } + public long Amount { get; set; } + + public override int GetHashCode() + => DiscordUser.GetHashCode(); + + public override bool Equals(object obj) + => obj is User u ? u.DiscordUser == DiscordUser : false; + } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleService.cs b/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleService.cs new file mode 100644 index 0000000..743549e --- /dev/null +++ b/src/EllieBot/Modules/Gambling/Raffle/CurrencyRaffleService.cs @@ -0,0 +1,81 @@ +#nullable disable +using EllieBot.Modules.Gambling.Common; + +namespace EllieBot.Modules.Gambling.Services; + +public class CurrencyRaffleService : IEService +{ + public enum JoinErrorType + { + NotEnoughCurrency, + AlreadyJoinedOrInvalidAmount + } + + public Dictionary Games { get; } = new(); + private readonly SemaphoreSlim _locker = new(1, 1); + private readonly ICurrencyService _cs; + + public CurrencyRaffleService(ICurrencyService cs) + => _cs = cs; + + public async Task<(CurrencyRaffleGame, JoinErrorType?)> JoinOrCreateGame( + ulong channelId, + IUser user, + long amount, + bool mixed, + Func onEnded) + { + await _locker.WaitAsync(); + try + { + var newGame = false; + if (!Games.TryGetValue(channelId, out var crg)) + { + newGame = true; + crg = new(mixed ? CurrencyRaffleGame.Type.Mixed : CurrencyRaffleGame.Type.Normal); + Games.Add(channelId, crg); + } + + //remove money, and stop the game if this + // user created it and doesn't have the money + if (!await _cs.RemoveAsync(user.Id, amount, new("raffle", "join"))) + { + if (newGame) + Games.Remove(channelId); + return (null, JoinErrorType.NotEnoughCurrency); + } + + if (!crg.AddUser(user, amount)) + { + await _cs.AddAsync(user.Id, amount, new("raffle", "refund")); + return (null, JoinErrorType.AlreadyJoinedOrInvalidAmount); + } + + if (newGame) + { + _ = Task.Run(async () => + { + await Task.Delay(60000); + await _locker.WaitAsync(); + try + { + var winner = crg.GetWinner(); + var won = crg.Users.Sum(x => x.Amount); + + await _cs.AddAsync(winner.DiscordUser.Id, won, new("raffle", "win")); + Games.Remove(channelId, out _); + _ = onEnded(winner.DiscordUser, won); + } + catch { } + finally { _locker.Release(); } + }); + } + + return (crg, null); + } + finally + { + _locker.Release(); + } + } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Shop/ShopCommands.cs b/src/EllieBot/Modules/Gambling/Shop/ShopCommands.cs index 2c2dca6..a7910de 100644 --- a/src/EllieBot/Modules/Gambling/Shop/ShopCommands.cs +++ b/src/EllieBot/Modules/Gambling/Shop/ShopCommands.cs @@ -1,5 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; +using EllieBot.Db; using EllieBot.Modules.Gambling.Common; using EllieBot.Modules.Gambling.Services; using EllieBot.Db.Models; @@ -10,7 +11,7 @@ namespace EllieBot.Modules.Gambling; public partial class Gambling { [Group] - public partial class ShopCommands : GamblingModule + public partial class ShopCommands : GamblingSubmodule { public enum List { diff --git a/src/EllieBot/Modules/Gambling/Shop/ShopService.cs b/src/EllieBot/Modules/Gambling/Shop/ShopService.cs index 9e46aa0..dfe944a 100644 --- a/src/EllieBot/Modules/Gambling/Shop/ShopService.cs +++ b/src/EllieBot/Modules/Gambling/Shop/ShopService.cs @@ -1,5 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; +using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Gambling.Services; diff --git a/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs b/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs index 239b7bc..979cbae 100644 --- a/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs +++ b/src/EllieBot/Modules/Gambling/Slot/SlotCommands.cs @@ -7,7 +7,9 @@ using SixLabors.ImageSharp; using SixLabors.ImageSharp.Drawing.Processing; using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.Processing; +using EllieBot.Modules.Gambling; using EllieBot.Common.TypeReaders; +using EllieBot.Modules.Utility; using Color = SixLabors.ImageSharp.Color; using Image = SixLabors.ImageSharp.Image; @@ -21,8 +23,11 @@ public enum GamblingError public partial class Gambling { [Group] - public partial class SlotCommands : GamblingModule + public partial class SlotCommands : GamblingSubmodule { + private static decimal totalBet; + private static decimal totalPaidOut; + private readonly IImageCache _images; private readonly FontProvider _fonts; private readonly DbService _db; @@ -66,19 +71,17 @@ public partial class Gambling var eb = _sender.CreateEmbed() - .WithAuthor(ctx.User) - .WithDescription(Format.Bold(text)) - .WithImageUrl($"attachment://result.png") - .WithOkColor(); + .WithAuthor(ctx.User) + .WithDescription(Format.Bold(text)) + .WithImageUrl($"attachment://result.png") + .WithOkColor(); var bb = new ButtonBuilder(emote: Emoji.Parse("🔁"), customId: "slot:again", label: "Pull Again"); - var inter = _inter.Create(ctx.User.Id, - bb, - smc => - { - smc.DeferAsync(); - return Slot(amount); - }); + var inter = _inter.Create(ctx.User.Id, bb, smc => + { + smc.DeferAsync(); + return Slot(amount); + }); var msg = await ctx.Channel.SendFileAsync(imgStream, "result.png", @@ -158,6 +161,12 @@ public partial class Gambling { return null; } + + lock (_slotStatsLock) + { + totalBet += amount; + totalPaidOut += result.Won; + } return result; } @@ -167,19 +176,18 @@ public partial class Gambling long ownedAmount; await using (var uow = _db.GetDbContext()) { - ownedAmount = uow.Set() - .FirstOrDefault(x => x.UserId == ctx.User.Id)?.CurrencyAmount + ownedAmount = uow.Set().FirstOrDefault(x => x.UserId == ctx.User.Id)?.CurrencyAmount ?? 0; } var slotBg = await _images.GetSlotBgAsync(); - var bgImage = Image.Load(slotBg); + var bgImage = Image.Load(slotBg, out _); var numbers = new int[3]; result.Rolls.CopyTo(numbers, 0); Color fontColor = Config.Slots.CurrencyFontColor; - bgImage.Mutate(x => x.DrawText(new RichTextOptions(_fonts.DottyFont.CreateFont(65)) + bgImage.Mutate(x => x.DrawText(new TextOptions(_fonts.DottyFont.CreateFont(65)) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, @@ -191,7 +199,7 @@ public partial class Gambling var bottomFont = _fonts.DottyFont.CreateFont(50); - bgImage.Mutate(x => x.DrawText(new RichTextOptions(bottomFont) + bgImage.Mutate(x => x.DrawText(new TextOptions(bottomFont) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, @@ -205,7 +213,7 @@ public partial class Gambling { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, - Origin = new(393, 480) + Origin = new(393, 480) }, ownedAmount.ToString(), fontColor)); diff --git a/src/EllieBot/Modules/Gambling/UserBetStatsService.cs b/src/EllieBot/Modules/Gambling/UserBetStatsService.cs deleted file mode 100644 index 76f7781..0000000 --- a/src/EllieBot/Modules/Gambling/UserBetStatsService.cs +++ /dev/null @@ -1,55 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Gambling.Services; - -public sealed class UserBetStatsService : IEService -{ - private const long RESET_MIN_PRICE = 1000; - private const decimal RESET_TOTAL_MULTIPLIER = 0.002m; - - private readonly DbService _db; - private readonly ICurrencyService _cs; - - public UserBetStatsService(DbService db, ICurrencyService cs) - { - _db = db; - _cs = cs; - } - - public async Task GetResetStatsPriceAsync(ulong userId, GamblingGame? game) - { - await using var ctx = _db.GetDbContext(); - - var totalBet = await ctx.GetTable() - .Where(x => x.UserId == userId && (game == null || x.Game == game)) - .SumAsyncLinqToDB(x => x.TotalBet); - - return Math.Max(RESET_MIN_PRICE, (long)Math.Ceiling(totalBet * RESET_TOTAL_MULTIPLIER)); - } - - public async Task ResetStatsAsync(ulong userId, GamblingGame? game) - { - var price = await GetResetStatsPriceAsync(userId, game); - - if (!await _cs.RemoveAsync(userId, price, new("betstats", "reset"))) - { - return false; - } - - await using var ctx = _db.GetDbContext(); - await ctx.GetTable() - .DeleteAsync(x => x.UserId == userId && (game == null || x.Game == game)); - - return true; - } - - public async Task ResetGamblingStatsAsync() - { - await using var ctx = _db.GetDbContext(); - await ctx.GetTable() - .DeleteAsync(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/VoteRewardService.cs b/src/EllieBot/Modules/Gambling/VoteRewardService.cs index 6886102..62d861b 100644 --- a/src/EllieBot/Modules/Gambling/VoteRewardService.cs +++ b/src/EllieBot/Modules/Gambling/VoteRewardService.cs @@ -14,13 +14,13 @@ public class VoteModel public class VoteRewardService : IEService, IReadyExecutor { private readonly DiscordSocketClient _client; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly ICurrencyService _currencyService; private readonly GamblingConfigService _gamb; public VoteRewardService( DiscordSocketClient client, - IBotCreds creds, + IBotCredentials creds, ICurrencyService currencyService, GamblingConfigService gamb) { diff --git a/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs b/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs index d52a22b..19b1dc5 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/WaifuClaimCommands.cs @@ -3,14 +3,14 @@ using EllieBot.Modules.Gambling.Common; using EllieBot.Modules.Gambling.Common.Waifu; using EllieBot.Modules.Gambling.Services; using EllieBot.Db.Models; -using System.Globalization; +using TwitchLib.Api.Helix.Models.Teams; namespace EllieBot.Modules.Gambling; public partial class Gambling { [Group] - public partial class WaifuClaimCommands : GamblingModule + public partial class WaifuClaimCommands : GamblingSubmodule { public WaifuClaimCommands(GamblingConfigService gamblingConfService) : base(gamblingConfService) @@ -37,45 +37,6 @@ public partial class Gambling await Response().Error(strs.waifu_reset_fail).SendAsync(); } - [Cmd] - [RequireContext(ContextType.Guild)] - public async Task WaifuClaims() - { - await Response() - .Paginated() - .PageItems(async (page) => await _service.GetClaimsAsync(ctx.User.Id, page)) - .Page((items, page) => - { - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithTitle("Waifus"); - - if (items.Count == 0) - { - eb - .WithPendingColor() - .WithDescription(GetText(strs.empty_page)); - - return eb; - } - - for (var i = 0; i < items.Count; i++) - { - var item = items[i]; - eb.AddField($"`#{(page * 9) + 1 + i}` {N(item.Price)}", - $""" - {item.Username} - ||{item.UserId}|| - """, - true - ); - } - - return eb; - }) - .SendAsync(); - } - [Cmd] [RequireContext(ContextType.Guild)] public async Task WaifuClaim(long amount, [Leftover] IUser target) @@ -109,11 +70,7 @@ public partial class Gambling return; } - var msg = GetText(strs.waifu_claimed( - Format.Bold(ctx.User.ToString()), - Format.Bold(target.ToString()), - N(amount))); - + var msg = GetText(strs.waifu_claimed(Format.Bold(target.ToString()), N(amount))); if (w.Affinity?.UserId == ctx.User.Id) msg += "\n" + GetText(strs.waifu_fulfilled(target, N(w.Price))); else @@ -183,7 +140,7 @@ public partial class Gambling if (targetId == ctx.User.Id) return; - var (w, result, amount) = await _service.DivorceWaifuAsync(ctx.User, targetId); + var (w, result, amount, remaining) = await _service.DivorceWaifuAsync(ctx.User, targetId); if (result == DivorceResult.SucessWithPenalty) { @@ -196,6 +153,14 @@ public partial class Gambling await Response().Confirm(strs.waifu_divorced_notlike(N(amount))).SendAsync(); else if (result == DivorceResult.NotYourWife) await Response().Error(strs.waifu_not_yours).SendAsync(); + else + { + await Response() + .Error(strs.waifu_recent_divorce( + Format.Bold(((int)remaining?.TotalHours).ToString()), + Format.Bold(remaining?.Minutes.ToString()))) + .SendAsync(); + } } [Cmd] @@ -226,21 +191,13 @@ public partial class Gambling } if (user is null) - { await Response().Confirm(strs.waifu_affinity_reset).SendAsync(); - } else if (oldAff is null) - { - await Response() - .Confirm(strs.waifu_affinity_set(Format.Bold(ctx.User.ToString()), Format.Bold(user.ToString()))) - .SendAsync(); - } + await Response().Confirm(strs.waifu_affinity_set(Format.Bold(user.ToString()))).SendAsync(); else { await Response() - .Confirm(strs.waifu_affinity_changed( - Format.Bold(ctx.User.ToString()), - Format.Bold(oldAff.ToString()), + .Confirm(strs.waifu_affinity_changed(Format.Bold(oldAff.ToString()), Format.Bold(user.ToString()))) .SendAsync(); } @@ -258,7 +215,7 @@ public partial class Gambling if (page > 100) page = 100; - var waifus = await _service.GetTopWaifusAtPage(page); + var waifus = _service.GetTopWaifusAtPage(page).ToList(); if (waifus.Count == 0) { @@ -281,20 +238,20 @@ public partial class Gambling private string GetLbString(WaifuLbResult w) { var claimer = "no one"; - string status; + var status = string.Empty; - var waifuUsername = w.WaifuName.TrimTo(20); - var claimerUsername = w.ClaimerName?.TrimTo(20); + var waifuUsername = w.Username.TrimTo(20); + var claimerUsername = w.Claimer?.TrimTo(20); - if (w.ClaimerName is not null) - claimer = $"{claimerUsername}"; + if (w.Claimer is not null) + claimer = $"{claimerUsername}#{w.ClaimerDiscrim}"; if (w.Affinity is null) status = $"... but {waifuUsername}'s heart is empty"; - else if (w.Affinity == w.ClaimerName) + else if (w.Affinity + w.AffinityDiscrim == w.Claimer + w.ClaimerDiscrim) status = $"... and {waifuUsername} likes {claimerUsername} too <3"; else - status = $"... but {waifuUsername}'s heart belongs to {w.Affinity.TrimTo(20)}"; - return $"**{waifuUsername}** - claimed by **{claimer}**\n\t{status}"; + status = $"... but {waifuUsername}'s heart belongs to {w.Affinity.TrimTo(20)}#{w.AffinityDiscrim}"; + return $"**{waifuUsername}#{w.Discrim}** - claimed by **{claimer}**\n\t{status}"; } [Cmd] @@ -420,8 +377,7 @@ public partial class Gambling if (sucess) { await Response() - .Confirm(strs.waifu_gift( - Format.Bold($"{GetCountString(items)}{items.Item} {items.Item.ItemEmoji}"), + .Confirm(strs.waifu_gift(Format.Bold($"{GetCountString(items)}{items.Item} {items.Item.ItemEmoji}"), Format.Bold(waifu.ToString()))) .SendAsync(); } diff --git a/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs b/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs index e929ce9..ab5e021 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/WaifuService.cs @@ -3,9 +3,11 @@ using LinqToDB; using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Gambling.Common; using EllieBot.Modules.Gambling.Common.Waifu; +using SixLabors.ImageSharp; namespace EllieBot.Modules.Gambling.Services; @@ -15,7 +17,7 @@ public class WaifuService : IEService, IReadyExecutor private readonly ICurrencyService _cs; private readonly IBotCache _cache; private readonly GamblingConfigService _gss; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly DiscordSocketClient _client; public WaifuService( @@ -23,7 +25,7 @@ public class WaifuService : IEService, IReadyExecutor ICurrencyService cs, IBotCache cache, GamblingConfigService gss, - IBotCreds creds, + IBotCredentials creds, DiscordSocketClient client) { _db = db; @@ -300,10 +302,10 @@ public class WaifuService : IEService, IReadyExecutor return (oldAff, success, remaining); } - public async Task> GetTopWaifusAtPage(int page, int perPage = 9) + public IEnumerable GetTopWaifusAtPage(int page, int perPage = 9) { - await using var uow = _db.GetDbContext(); - return await uow.Set().GetTop(perPage, page * perPage); + using var uow = _db.GetDbContext(); + return uow.Set().GetTop(perPage, page * perPage); } public ulong GetWaifuUserId(ulong ownerId, string name) @@ -318,20 +320,25 @@ public class WaifuService : IEService, IReadyExecutor private static TypedKey GetAffinityKey(ulong userId) => new($"waifu:affinity:{userId}"); - public async Task<(WaifuInfo, DivorceResult, long)> DivorceWaifuAsync(IUser user, ulong targetId) + public async Task<(WaifuInfo, DivorceResult, long, TimeSpan?)> DivorceWaifuAsync(IUser user, ulong targetId) { DivorceResult result; + TimeSpan? remaining = null; long amount = 0; WaifuInfo w; await using (var uow = _db.GetDbContext()) { w = uow.Set().ByWaifuUserId(targetId); if (w?.Claimer is null || w.Claimer.UserId != user.Id) - { result = DivorceResult.NotYourWife; - } else { + remaining = await _cache.GetRatelimitAsync(GetDivorceKey(user.Id), 6.Hours()); + if (remaining is TimeSpan rem) + { + result = DivorceResult.Cooldown; + return (w, result, amount, rem); + } amount = w.Price / 2; @@ -364,7 +371,7 @@ public class WaifuService : IEService, IReadyExecutor await uow.SaveChangesAsync(); } - return (w, result, amount); + return (w, result, amount, remaining); } public async Task GiftWaifuAsync( @@ -526,18 +533,11 @@ public class WaifuService : IEService, IReadyExecutor { try { - var decay = _gss.Data.Waifu.Decay; + var multi = _gss.Data.Waifu.Decay.Percent / 100f; + var minPrice = _gss.Data.Waifu.Decay.MinPrice; + var decayInterval = _gss.Data.Waifu.Decay.HourInterval; - var unclaimedMulti = 1 - (decay.UnclaimedDecayPercent / 100f); - var claimedMulti = 1 - (decay.ClaimedDecayPercent / 100f); - - var minPrice = decay.MinPrice; - var decayInterval = decay.HourInterval; - - if (decayInterval <= 0) - continue; - - if ((unclaimedMulti < 0 || unclaimedMulti > 1) && (claimedMulti < 0 || claimedMulti > 1)) + if (multi is < 0f or > 1f || decayInterval < 0) continue; var now = DateTime.UtcNow; @@ -556,28 +556,14 @@ public class WaifuService : IEService, IReadyExecutor await _cache.AddAsync(_waifuDecayKey, nowB); - if (unclaimedMulti is > 0 and <= 1) - { - await using var uow = _db.GetDbContext(); + await using var uow = _db.GetDbContext(); - await uow.GetTable() - .Where(x => x.Price > minPrice && x.ClaimerId == null) - .UpdateAsync(old => new() - { - Price = (long)(old.Price * unclaimedMulti) - }); - } - - if (claimedMulti is > 0 and <= 1) - { - await using var uow = _db.GetDbContext(); - await uow.GetTable() - .Where(x => x.Price > minPrice && x.ClaimerId != null) - .UpdateAsync(old => new() - { - Price = (long)(old.Price * claimedMulti) - }); - } + await uow.GetTable() + .Where(x => x.Price > minPrice && x.ClaimerId == null) + .UpdateAsync(old => new() + { + Price = (long)(old.Price * multi) + }); } catch (Exception ex) { @@ -598,7 +584,7 @@ public class WaifuService : IEService, IReadyExecutor .Where(wi => wi.ClaimerId == waifuId) .Select(wi => wi.WaifuId) .Contains(x.Id)) - .Select(x => x.Username) + .Select(x => $"{x.Username}#{x.Discriminator}") .ToListAsyncEF(); } @@ -610,7 +596,7 @@ public class WaifuService : IEService, IReadyExecutor .Where(wi => wi.AffinityId == waifuId) .Select(wi => wi.WaifuId) .Contains(x.Id)) - .Select(x => x.Username) + .Select(x => $"{x.Username}#{x.Discriminator}") .ToListAsyncEF(); } @@ -625,38 +611,4 @@ public class WaifuService : IEService, IReadyExecutor .FirstOrDefault()) .ToListAsyncEF(); } - - public async Task> GetClaimsAsync(ulong userId, int page) - { - await using var ctx = _db.GetDbContext(); - - var wid = ctx.GetTable() - .Where(x => x.UserId == userId) - .Select(x => x.Id) - .FirstOrDefault(); - - if (wid == 0) - return []; - - return await ctx.GetTable() - .Where(x => x.ClaimerId == wid) - .LeftJoin(ctx.GetTable(), - (wi, du) => wi.WaifuId == du.Id, - (wi, du) => new WaifuClaimsResult( - du.Username, - du.UserId, - wi.Price - )) - .OrderByDescending(x => x.Price) - .Skip(page * 9) - .Take(9) - .ToListAsyncLinqToDB(); - } -} - -public sealed class WaifuClaimsResult(string username, ulong userId, long price) -{ - public string Username { get; } = username; - public ulong UserId { get; } = userId; - public long Price { get; } = price; } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItemsTypeReader.cs b/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItemsTypeReader.cs index 21b4c60..bac72c1 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItemsTypeReader.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/_common/MultipleWaifuItemsTypeReader.cs @@ -8,7 +8,7 @@ namespace EllieBot.Modules.Gambling; public partial class MultipleWaifuItemsTypeReader : EllieTypeReader { private readonly WaifuService _service; - + [GeneratedRegex(@"(?:(?\d+)[x*])?(?.+)")] private static partial Regex ItemRegex(); @@ -33,7 +33,7 @@ public partial class MultipleWaifuItemsTypeReader : EllieTypeReader x.Name.ToLowerInvariant() == itemName); @@ -41,7 +41,7 @@ public partial class MultipleWaifuItemsTypeReader : EllieTypeReader wi.Waifu.UserId == userId); } - public static async Task> GetTop(this DbSet waifus, int count, int skip = 0) + public static IEnumerable GetTop(this DbSet waifus, int count, int skip = 0) { ArgumentOutOfRangeException.ThrowIfNegative(count); if (count == 0) return []; - return await waifus.Include(wi => wi.Waifu) - .Include(wi => wi.Affinity) - .Include(wi => wi.Claimer) - .OrderByDescending(wi => wi.Price) - .Skip(skip) - .Take(count) - .Select(x => new WaifuLbResult - { - Affinity = x.Affinity == null - ? null - : x.Affinity.Username, - ClaimerName = - x.Claimer == null - ? null - : x.Claimer.Username, - WaifuName = x.Waifu.Username, - Price = x.Price - }) - .ToListAsyncEF(); + return waifus.Include(wi => wi.Waifu) + .Include(wi => wi.Affinity) + .Include(wi => wi.Claimer) + .OrderByDescending(wi => wi.Price) + .Skip(skip) + .Take(count) + .Select(x => new WaifuLbResult + { + Affinity = x.Affinity == null ? null : x.Affinity.Username, + AffinityDiscrim = x.Affinity == null ? null : x.Affinity.Discriminator, + Claimer = x.Claimer == null ? null : x.Claimer.Username, + ClaimerDiscrim = x.Claimer == null ? null : x.Claimer.Discriminator, + Username = x.Waifu.Username, + Discrim = x.Waifu.Discriminator, + Price = x.Price + }) + .ToList(); } public static decimal GetTotalValue(this DbSet waifus) @@ -59,14 +57,12 @@ public static class WaifuExtensions public static ulong GetWaifuUserId(this DbSet waifus, ulong ownerId, string name) => waifus.AsQueryable() .AsNoTracking() - .Where(x => x.Claimer.UserId == ownerId && x.Waifu.Username == name) + .Where(x => x.Claimer.UserId == ownerId && x.Waifu.Username + "#" + x.Waifu.Discriminator == name) .Select(x => x.Waifu.UserId) .FirstOrDefault(); public static async Task GetWaifuInfoAsync(this DbContext ctx, ulong userId) { - await ctx.EnsureUserCreatedAsync(userId); - await ctx.Set() .ToLinqToDBTable() .InsertOrUpdateAsync(() => new() @@ -82,8 +78,7 @@ public static class WaifuExtensions WaifuId = ctx.Set().Where(x => x.UserId == userId).Select(x => x.Id).First() }); - var toReturn = ctx.Set() - .AsQueryable() + var toReturn = ctx.Set().AsQueryable() .Where(w => w.WaifuId == ctx.Set() .AsQueryable() @@ -97,7 +92,7 @@ public static class WaifuExtensions ctx.Set() .AsQueryable() .Where(u => u.UserId == userId) - .Select(u => u.Username) + .Select(u => u.Username + "#" + u.Discriminator) .FirstOrDefault(), AffinityCount = ctx.Set() @@ -109,14 +104,14 @@ public static class WaifuExtensions ctx.Set() .AsQueryable() .Where(u => u.Id == w.AffinityId) - .Select(u => u.Username) + .Select(u => u.Username + "#" + u.Discriminator) .FirstOrDefault(), ClaimCount = ctx.Set().AsQueryable().Count(x => x.ClaimerId == w.WaifuId), ClaimerName = ctx.Set() .AsQueryable() .Where(u => u.Id == w.ClaimerId) - .Select(u => u.Username) + .Select(u => u.Username + "#" + u.Discriminator) .FirstOrDefault(), DivorceCount = ctx.Set() diff --git a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuItem.cs b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuItem.cs index 8012b02..5b8630f 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuItem.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuItem.cs @@ -7,4 +7,4 @@ public class WaifuItem : DbEntity public int? WaifuInfoId { get; set; } public string ItemEmoji { get; set; } public string Name { get; set; } -} +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuLbResult.cs b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuLbResult.cs index 02c83f2..f83af4f 100644 --- a/src/EllieBot/Modules/Gambling/Waifus/db/WaifuLbResult.cs +++ b/src/EllieBot/Modules/Gambling/Waifus/db/WaifuLbResult.cs @@ -3,11 +3,14 @@ namespace EllieBot.Db.Models; public class WaifuLbResult { - public string WaifuName { get; set; } + public string Username { get; set; } + public string Discrim { get; set; } - public string ClaimerName { get; set; } + public string Claimer { get; set; } + public string ClaimerDiscrim { get; set; } public string Affinity { get; set; } + public string AffinityDiscrim { get; set; } public long Price { get; set; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/_common/IGamblingService.cs b/src/EllieBot/Modules/Gambling/_common/IGamblingService.cs index 087950a..4ed31c9 100644 --- a/src/EllieBot/Modules/Gambling/_common/IGamblingService.cs +++ b/src/EllieBot/Modules/Gambling/_common/IGamblingService.cs @@ -1,4 +1,5 @@ #nullable disable +using EllieBot.Modules.Gambling; using EllieBot.Modules.Gambling.Betdraw; using EllieBot.Modules.Gambling.Rps; using OneOf; @@ -13,10 +14,5 @@ public interface IGamblingService Task> SlotAsync(ulong userId, long amount); Task FlipAsync(int count); Task> RpsAsync(ulong userId, long amount, byte pick); - - Task> BetDrawAsync( - ulong userId, - long amount, - byte? maybeGuessValue, - byte? maybeGuessColor); + Task> BetDrawAsync(ulong userId, long amount, byte? maybeGuessValue, byte? maybeGuessColor); } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs b/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs index 613cfae..2412503 100644 --- a/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs +++ b/src/EllieBot/Modules/Gambling/_common/NewGamblingService.cs @@ -1,6 +1,5 @@ #nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; +using EllieBot.Modules.Gambling; using EllieBot.Modules.Gambling.Betdraw; using EllieBot.Modules.Gambling.Rps; using EllieBot.Modules.Gambling.Services; @@ -10,15 +9,15 @@ namespace EllieBot.Modules.Gambling; public sealed class NewGamblingService : IGamblingService, IEService { - private readonly GamblingConfigService _gcs; + private readonly GamblingConfigService _bcs; private readonly ICurrencyService _cs; - public NewGamblingService(GamblingConfigService gcs, ICurrencyService cs) + public NewGamblingService(GamblingConfigService bcs, ICurrencyService cs) { - _gcs = gcs; + _bcs = bcs; _cs = cs; } - + public async Task> LulaAsync(ulong userId, long amount) { ArgumentOutOfRangeException.ThrowIfNegative(amount); @@ -33,13 +32,13 @@ public sealed class NewGamblingService : IGamblingService, IEService } } - var game = new LulaGame(_gcs.Data.LuckyLadder.Multipliers); + var game = new LulaGame(_bcs.Data.LuckyLadder.Multipliers); var result = game.Spin(amount); - + var won = (long)result.Won; if (won > 0) { - await _cs.AddAsync(userId, won, new("lula", result.Multiplier >= 1 ? "win" : "lose")); + await _cs.AddAsync(userId, won, new("lula", "win")); } return result; @@ -59,9 +58,9 @@ public sealed class NewGamblingService : IGamblingService, IEService } } - var game = new BetrollGame(_gcs.Data.BetRoll.Pairs - .Select(x => (x.WhenAbove, (decimal)x.MultiplyBy)) - .ToList()); + var game = new BetrollGame(_bcs.Data.BetRoll.Pairs + .Select(x => (x.WhenAbove, (decimal)x.MultiplyBy)) + .ToList()); var result = game.Roll(amount); @@ -90,23 +89,19 @@ public sealed class NewGamblingService : IGamblingService, IEService } } - var game = new BetflipGame(_gcs.Data.BetFlip.Multiplier); + var game = new BetflipGame(_bcs.Data.BetFlip.Multiplier); var result = game.Flip(guess, amount); - + var won = (long)result.Won; if (won > 0) { await _cs.AddAsync(userId, won, new("betflip", "win")); } - + return result; } - - public async Task> BetDrawAsync( - ulong userId, - long amount, - byte? maybeGuessValue, - byte? maybeGuessColor) + + public async Task> BetDrawAsync(ulong userId, long amount, byte? maybeGuessValue, byte? maybeGuessColor) { ArgumentOutOfRangeException.ThrowIfNegative(amount); @@ -115,7 +110,7 @@ public sealed class NewGamblingService : IGamblingService, IEService if (maybeGuessColor > 1) throw new ArgumentOutOfRangeException(nameof(maybeGuessColor)); - + if (maybeGuessValue > 1) throw new ArgumentOutOfRangeException(nameof(maybeGuessValue)); @@ -131,13 +126,13 @@ public sealed class NewGamblingService : IGamblingService, IEService var game = new BetdrawGame(); var result = game.Draw((BetdrawValueGuess?)maybeGuessValue, (BetdrawColorGuess?)maybeGuessColor, amount); - + var won = (long)result.Won; if (won > 0) { await _cs.AddAsync(userId, won, new("betdraw", "win")); } - + return result; } @@ -161,7 +156,7 @@ public sealed class NewGamblingService : IGamblingService, IEService var won = (long)result.Won; if (won > 0) { - await _cs.AddAsync(userId, won, new("slot", "win")); + await _cs.AddAsync(userId, won, new("slot", "won")); } return result; @@ -184,7 +179,7 @@ public sealed class NewGamblingService : IGamblingService, IEService return Task.FromResult(results); } - + // // // private readonly ConcurrentDictionary _decks = new ConcurrentDictionary(); @@ -242,7 +237,7 @@ public sealed class NewGamblingService : IGamblingService, IEService { ArgumentOutOfRangeException.ThrowIfNegative(amount); ArgumentOutOfRangeException.ThrowIfGreaterThan(pick, 2); - + if (amount > 0) { var isTakeSuccess = await _cs.RemoveAsync(userId, amount, new("rps", "bet")); @@ -255,7 +250,7 @@ public sealed class NewGamblingService : IGamblingService, IEService var rps = new RpsGame(); var result = rps.Play((RpsPick)pick, amount); - + var won = (long)result.Won; if (won > 0) { @@ -271,46 +266,4 @@ public sealed class NewGamblingService : IGamblingService, IEService return result; } -} - -public sealed class RakebackService : IEService -{ - private readonly DbService _db; - private readonly ICurrencyService _cs; - - public RakebackService(DbService db, ICurrencyService cs) - { - _db = db; - _cs = cs; - } - - public async Task GetRakebackAsync(ulong userId) - { - await using var uow = _db.GetDbContext(); - - var rb = uow.GetTable() - .Where(x => x.UserId == userId) - .Select(x => x.Amount) - .FirstOrDefault(); - - return (long)rb; - } - - public async Task ClaimRakebackAsync(ulong userId) - { - await using var uow = _db.GetDbContext(); - - var rbs = await uow.GetTable() - .Where(x => x.UserId == userId) - .DeleteWithOutputAsync((x) => x.Amount); - - if (rbs.Length == 0) - return 0; - - var rb = (long)rbs[0]; - - await _cs.AddAsync(userId, rb, new("rakeback", "claim")); - - return rb; - } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Gambling/_common/TypeReaders/BaseShmartInputAmountReader.cs b/src/EllieBot/Modules/Gambling/_common/TypeReaders/BaseShmartInputAmountReader.cs index 6773b78..42c6f09 100644 --- a/src/EllieBot/Modules/Gambling/_common/TypeReaders/BaseShmartInputAmountReader.cs +++ b/src/EllieBot/Modules/Gambling/_common/TypeReaders/BaseShmartInputAmountReader.cs @@ -1,4 +1,5 @@ using System.Text.RegularExpressions; +using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Gambling.Services; using NCalc; diff --git a/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs b/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs index 194cf79..7f7f2cb 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/ChatterBotCommands.cs @@ -1,5 +1,7 @@ #nullable disable +using EllieBot.Db; using EllieBot.Modules.Games.Services; +using EllieBot.Db.Models; namespace EllieBot.Modules.Games; @@ -29,7 +31,6 @@ public partial class Games } await Response().Confirm(strs.chatbot_enabled).SendAsync(); - } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/ChatterBotService.cs b/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs similarity index 99% rename from src/EllieBot/Modules/Games/ChatterBot/ChatterBotService.cs rename to src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs index 0d2c841..e088319 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/ChatterBotService.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/ChatterbotService.cs @@ -19,7 +19,7 @@ public class ChatterBotService : IExecOnMessage private readonly DiscordSocketClient _client; private readonly IPermissionChecker _perms; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly IHttpClientFactory _httpFactory; private readonly GamesConfigService _gcs; private readonly IMessageSenderService _sender; @@ -32,7 +32,7 @@ public class ChatterBotService : IExecOnMessage IBot bot, IPatronageService ps, IHttpClientFactory factory, - IBotCreds creds, + IBotCredentials creds, GamesConfigService gcs, IMessageSenderService sender, DbService db) diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs index 9f0a028..20ee90d 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiMessage.cs @@ -6,10 +6,10 @@ public class OpenAiApiMessage { [JsonPropertyName("role")] public required string Role { get; init; } - + [JsonPropertyName("content")] public required string Content { get; init; } - + [JsonPropertyName("name")] public required string Name { get; init; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiUsageData.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiUsageData.cs index 174af3e..1525dac 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiUsageData.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiApiUsageData.cs @@ -6,10 +6,10 @@ public class OpenAiApiUsageData { [JsonPropertyName("prompt_tokens")] public int PromptTokens { get; set; } - + [JsonPropertyName("completion_tokens")] public int CompletionTokens { get; set; } - + [JsonPropertyName("total_tokens")] public int TotalTokens { get; set; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiCompletionResponse.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiCompletionResponse.cs index db0b92f..1b7bdcf 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiCompletionResponse.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/OpenAiApi/OpenAiCompletionResponse.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using System.Text.Json.Serialization; namespace EllieBot.Modules.Games.Common.ChatterBot; @@ -7,7 +7,7 @@ public class OpenAiCompletionResponse { [JsonPropertyName("choices")] public Choice[] Choices { get; set; } - + [JsonPropertyName("usage")] public OpenAiApiUsageData Usage { get; set; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResult.cs b/src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResponse.cs similarity index 82% rename from src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResult.cs rename to src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResponse.cs index 3d881e2..a5b0b5f 100644 --- a/src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResult.cs +++ b/src/EllieBot/Modules/Games/ChatterBot/_common/ThinkResponse.cs @@ -1,4 +1,6 @@ -#nullable disable +#nullable disable +using System.CodeDom; + namespace EllieBot.Modules.Games.Common.ChatterBot; public sealed class ThinkResult diff --git a/src/EllieBot/Modules/Games/GamesService.cs b/src/EllieBot/Modules/Games/GamesService.cs index 1436285..9f4f61b 100644 --- a/src/EllieBot/Modules/Games/GamesService.cs +++ b/src/EllieBot/Modules/Games/GamesService.cs @@ -1,5 +1,6 @@ #nullable disable using Microsoft.Extensions.Caching.Memory; +using EllieBot.Common.ModuleBehaviors; using EllieBot.Modules.Games.Common; using EllieBot.Modules.Games.Common.Acrophobia; using EllieBot.Modules.Games.Common.Nunchi; @@ -7,10 +8,11 @@ using Newtonsoft.Json; namespace EllieBot.Modules.Games.Services; -public class GamesService : IEService +public class GamesService : IEService, IReadyExecutor { private const string TYPING_ARTICLES_PATH = "data/typing_articles3.json"; + public ConcurrentDictionary GirlRatings { get; } = new(); public IReadOnlyList EightBallResponses => _gamesConfig.Data.EightBallResponses; @@ -23,6 +25,7 @@ public class GamesService : IEService public ConcurrentDictionary RunningContests { get; } = new(); public ConcurrentDictionary NunchiGames { get; } = new(); + public AsyncLazy Ratings { get; } private readonly GamesConfigService _gamesConfig; private readonly IHttpClientFactory _httpFactory; @@ -38,6 +41,7 @@ public class GamesService : IEService SizeLimit = 500_000 }); + Ratings = new(GetRatingTexts); _rng = new EllieRandom(); try @@ -51,6 +55,22 @@ public class GamesService : IEService } } + public async Task OnReadyAsync() + { + // reset rating once a day + using var timer = new PeriodicTimer(TimeSpan.FromDays(1)); + while (await timer.WaitForNextTickAsync()) + GirlRatings.Clear(); + } + + private async Task GetRatingTexts() + { + using var http = _httpFactory.CreateClient(); + var text = await http.GetStringAsync( + "https://nadeko-pictures.nyc3.digitaloceanspaces.com/other/rategirl/rates.json"); + return JsonConvert.DeserializeObject(text); + } + public void AddTypingArticle(IUser user, string text) { TypingArticles.Add(new() @@ -84,4 +104,15 @@ public class GamesService : IEService File.WriteAllText(TYPING_ARTICLES_PATH, JsonConvert.SerializeObject(articles)); return removed; } + + public class RatingTexts + { + public string Nog { get; set; } + public string Tra { get; set; } + public string Fun { get; set; } + public string Uni { get; set; } + public string Wif { get; set; } + public string Dat { get; set; } + public string Dan { get; set; } + } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/GirlRating.cs b/src/EllieBot/Modules/Games/GirlRating.cs new file mode 100644 index 0000000..4576216 --- /dev/null +++ b/src/EllieBot/Modules/Games/GirlRating.cs @@ -0,0 +1,61 @@ +#nullable disable +using SixLabors.ImageSharp; +using SixLabors.ImageSharp.Processing; +using Image = SixLabors.ImageSharp.Image; + +namespace EllieBot.Modules.Games.Common; + +public class GirlRating +{ + public double Crazy { get; } + public double Hot { get; } + public int Roll { get; } + public string Advice { get; } + + public AsyncLazy Stream { get; } + private readonly IImageCache _images; + + public GirlRating( + IImageCache images, + double crazy, + double hot, + int roll, + string advice) + { + _images = images; + Crazy = crazy; + Hot = hot; + Roll = roll; + Advice = advice; // convenient to have it here, even though atm there are only few different ones. + + Stream = new(async () => + { + try + { + var bgBytes = await _images.GetRategirlBgAsync(); + using var img = Image.Load(bgBytes); + const int minx = 35; + const int miny = 385; + const int length = 345; + + var pointx = (int)(minx + (length * (Hot / 10))); + var pointy = (int)(miny - (length * ((Crazy - 4) / 6))); + + var dotBytes = await _images.GetRategirlDotAsync(); + using (var pointImg = Image.Load(dotBytes)) + { + img.Mutate(x => x.DrawImage(pointImg, new(pointx - 10, pointy - 10), new GraphicsOptions())); + } + + var imgStream = new MemoryStream(); + img.SaveAsPng(imgStream); + return imgStream; + } + catch (Exception ex) + { + Log.Warning(ex, "Error getting RateGirl image"); + return null; + } + }); + } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Hangman/HangmanGame.cs b/src/EllieBot/Modules/Games/Hangman/HangmanGame.cs index 58e779b..1625b55 100644 --- a/src/EllieBot/Modules/Games/Hangman/HangmanGame.cs +++ b/src/EllieBot/Modules/Games/Hangman/HangmanGame.cs @@ -1,5 +1,4 @@ #nullable disable - namespace EllieBot.Modules.Games.Hangman; public sealed class HangmanGame diff --git a/src/EllieBot/Modules/Games/NCanvas/INCanvasService.cs b/src/EllieBot/Modules/Games/NCanvas/INCanvasService.cs deleted file mode 100644 index f1c3e02..0000000 --- a/src/EllieBot/Modules/Games/NCanvas/INCanvasService.cs +++ /dev/null @@ -1,24 +0,0 @@ -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Games; - -public interface INCanvasService -{ - Task GetCanvas(); - Task GetPixelGroup(int position); - - Task SetPixel( - int position, - uint color, - string text, - ulong userId, - long price); - - Task SetImage(uint[] img); - - Task GetPixel(int x, int y); - Task GetPixel(int position); - int GetHeight(); - int GetWidth(); - Task ResetAsync(); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/NCanvas/NCanvasCommands.cs b/src/EllieBot/Modules/Games/NCanvas/NCanvasCommands.cs deleted file mode 100644 index 6d37a5e..0000000 --- a/src/EllieBot/Modules/Games/NCanvas/NCanvasCommands.cs +++ /dev/null @@ -1,305 +0,0 @@ -using EllieBot.Modules.Gambling.Services; -using SixLabors.Fonts; -using SixLabors.ImageSharp; -using SixLabors.ImageSharp.Advanced; -using SixLabors.ImageSharp.Drawing.Processing; -using SixLabors.ImageSharp.PixelFormats; -using SixLabors.ImageSharp.Processing; -using Image = SixLabors.ImageSharp.Image; - -namespace EllieBot.Modules.Games; - -public partial class Games -{ - public sealed class NCanvasCommands : EllieModule - { - private readonly INCanvasService _service; - private readonly IHttpClientFactory _http; - private readonly FontProvider _fonts; - private readonly GamblingConfigService _gcs; - - public NCanvasCommands( - INCanvasService service, - IHttpClientFactory http, - FontProvider fonts, - GamblingConfigService gcs) - { - _service = service; - _http = http; - _fonts = fonts; - _gcs = gcs; - } - - [Cmd] - public async Task NCanvas() - { - var pixels = await _service.GetCanvas(); - var image = new Image(_service.GetWidth(), _service.GetHeight()); - - Parallel.For(0, - image.Height, - y => - { - var pixelAccessor = image.DangerousGetPixelRowMemory(y); - var row = pixelAccessor.Span; - for (int x = 0; x < image.Width; x++) - { - row[x] = new Rgba32(pixels[(y * image.Width) + x]); - } - }); - - await using var stream = await image.ToStreamAsync(); - - var hint = GetText(strs.nc_hint(prefix, _service.GetWidth(), _service.GetHeight())); - await Response() - .File(stream, "ncanvas.png") - .Embed(_sender.CreateEmbed() - .WithOkColor() -#if GLOBAL_ELLIE - .WithDescription("This is not available yet.") -#endif - .WithFooter(hint) - .WithImageUrl("attachment://ncanvas.png")) - .SendAsync(); - } - - [Cmd] - public Task NCzoom(int row, int col) - => NCzoom((col * _service.GetWidth()) + row); - - [Cmd] - public async Task NCzoom(kwum position) - { - var w = _service.GetWidth(); - var h = _service.GetHeight(); - - if (position < 0 || position >= w * h) - { - await Response().Error(strs.invalid_input).SendAsync(); - return; - } - - using var img = await GetZoomImage(position); - await using var stream = await img.ToStreamAsync(); - await ctx.Channel.SendFileAsync(stream, $"zoom_{position}.png"); - } - - private async Task> GetZoomImage(kwum position) - { - var w = _service.GetWidth(); - var pixels = await _service.GetPixelGroup(position); - - var origX = ((position % w) - 2) * 100; - var origY = ((position / w) - 2) * 100; - - var image = new Image(500, 500); - - const float fontSize = 30; - - var posFont = _fonts.NotoSans.CreateFont(fontSize, FontStyle.Bold); - var size = TextMeasurer.MeasureSize("wwww", new TextOptions(posFont)); - var scale = 100f / size.Width; - if (scale < 1) - posFont = _fonts.NotoSans.CreateFont(fontSize * scale, FontStyle.Bold); - var outlinePen = new SolidPen(SixLabors.ImageSharp.Color.Black, 1f); - - Parallel.For(0, - pixels.Length, - i => - { - var pix = pixels[i]; - var startX = pix.Position % w * 100 - origX; - var startY = pix.Position / w * 100 - origY; - - var color = new Rgba32(pix.Color); - image.Mutate(x => FillRectangleExtensions.Fill(x, - new SolidBrush(color), - new RectangleF(startX, startY, 100, 100))); - - image.Mutate(x => - { - x.DrawText(new RichTextOptions(posFont) - { - HorizontalAlignment = HorizontalAlignment.Center, - VerticalAlignment = VerticalAlignment.Center, - Origin = new(startX + 50, startY + 50) - }, - ((kwum)pix.Position).ToString().PadLeft(2, '2'), - Brushes.Solid(SixLabors.ImageSharp.Color.White), - outlinePen); - }); - }); - - // write the position on each section of the image - return image; - } - - [Cmd] - public async Task NcSetPixel(kwum position, string colorHex, [Leftover] string text = "") - { - if (position < 0 || position >= _service.GetWidth() * _service.GetHeight()) - { - await Response().Error(strs.invalid_input).SendAsync(); - return; - } - - if (colorHex.StartsWith("0x", StringComparison.OrdinalIgnoreCase)) - colorHex = colorHex[2..]; - - if (!Rgba32.TryParseHex(colorHex, out var clr)) - { - await Response().Error(strs.invalid_color).SendAsync(); - return; - } - - var pixel = await _service.GetPixel(position); - if (pixel is null) - { - await Response().Error(strs.nc_pixel_not_found).SendAsync(); - return; - } - - var prompt = GetText(strs.nc_pixel_set_confirm(Format.Code(position.ToString()), - Format.Bold(CurrencyHelper.N(pixel.Price, - Culture, - _gcs.Data.Currency.Sign)))); - - if (!await PromptUserConfirmAsync(_sender.CreateEmbed() - .WithPendingColor() - .WithDescription(prompt))) - { - return; - } - - var result = await _service.SetPixel(position, clr.PackedValue, text, ctx.User.Id, pixel.Price); - - if (result == SetPixelResult.NotEnoughMoney) - { - await Response().Error(strs.not_enough(_gcs.Data.Currency.Sign)).SendAsync(); - return; - } - else if (result == SetPixelResult.InsufficientPayment) - { - await Response().Error(strs.nc_insuff_payment).SendAsync(); - return; - } - else if (result == SetPixelResult.InvalidInput) - { - await Response().Error(strs.invalid_input).SendAsync(); - return; - } - - using var img = await GetZoomImage(position); - await using var stream = await img.ToStreamAsync(); - - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithDescription(GetText(strs.nc_pixel_set(Format.Code(position.ToString())))) - .WithImageUrl($"attachment://zoom_{position}.png")) - .File(stream, $"zoom_{position}.png") - .SendAsync(); - } - - [Cmd] - public async Task NcPixel(int x, int y) - => await NcPixel((y * _service.GetWidth()) + x); - - [Cmd] - public async Task NcPixel(kwum position) - { - if (position < 0 || position >= _service.GetWidth() * _service.GetHeight()) - { - await Response().Error(strs.invalid_input).SendAsync(); - return; - } - - var pixel = await _service.GetPixel(position); - if (pixel is null) - { - await Response().Error(strs.nc_pixel_not_found).SendAsync(); - return; - } - - var image = new Image(100, 100); - image.Mutate(x - => x.Fill(new SolidBrush(new Rgba32(pixel.Color)), - new RectangleF(0, 0, 100, 100))); - - await using var stream = await image.ToStreamAsync(); - - var pos = new kwum(pixel.Position); - await Response() - .File(stream, $"{pixel.Position}.png") - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithDescription(string.IsNullOrWhiteSpace(pixel.Text) ? string.Empty : pixel.Text) - .WithTitle(GetText(strs.nc_pixel(pos))) - .AddField(GetText(strs.nc_position), - $"{pixel.Position % _service.GetWidth()} {pixel.Position / _service.GetWidth()}", - true) - .AddField(GetText(strs.price), pixel.Price.ToString(), true) - .AddField(GetText(strs.color), "#" + new Rgba32(pixel.Color).ToHex()) - .WithImageUrl($"attachment://{pixel.Position}.png")) - .SendAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task NcSetImg() - { - var attach = ctx.Message.Attachments.FirstOrDefault(); - if (attach is null) - { - await Response().Error(strs.no_attach_found).SendAsync(); - return; - } - - var w = _service.GetWidth(); - var h = _service.GetHeight(); - if (attach.Width != w || attach.Height != h) - { - await Response().Error(strs.invalid_img_size(w, h)).SendAsync(); - return; - } - - if (!await PromptUserConfirmAsync(_sender.CreateEmbed() - .WithDescription( - "This will reset the canvas to the specified image. All prices, text and colors will be reset.\n\n" - + "Are you sure you want to continue?"))) - return; - - using var http = _http.CreateClient(); - await using var stream = await http.GetStreamAsync(attach.Url); - using var img = await Image.LoadAsync(stream); - - var pixels = new uint[_service.GetWidth() * _service.GetHeight()]; - - Parallel.For(0, - _service.GetWidth() * _service.GetHeight(), - i => pixels[i] = img[i % _service.GetWidth(), i / _service.GetWidth()].PackedValue); - - // for (var y = 0; y < _service.GetHeight(); y++) - // for (var x = 0; x < _service.GetWidth(); x++) - // pixels[(y * _service.GetWidth()) + x] = img[x, y].PackedValue; - - await _service.SetImage(pixels); - await ctx.OkAsync(); - } - - [Cmd] - [OwnerOnly] - public async Task NcReset() - { - await _service.ResetAsync(); - - if (!await PromptUserConfirmAsync(_sender.CreateEmbed() - .WithDescription( - "This will delete all pixels and reset the canvas.\n\n" - + "Are you sure you want to continue?"))) - return; - - await ctx.OkAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/NCanvas/NCanvasService.cs b/src/EllieBot/Modules/Games/NCanvas/NCanvasService.cs deleted file mode 100644 index c0a4b1b..0000000 --- a/src/EllieBot/Modules/Games/NCanvas/NCanvasService.cs +++ /dev/null @@ -1,206 +0,0 @@ -using LinqToDB; -using LinqToDB.Data; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; -using SixLabors.ImageSharp.ColorSpaces; -using SixLabors.ImageSharp.ColorSpaces.Conversion; -using SixLabors.ImageSharp.PixelFormats; - -namespace EllieBot.Modules.Games; - -public sealed class NCanvasService : INCanvasService, IReadyExecutor, IEService -{ - private readonly TypedKey _canvasKey = new("ncanvas"); - - private readonly DbService _db; - private readonly IBotCache _cache; - private readonly DiscordSocketClient _client; - private readonly ICurrencyService _cs; - - public const int CANVAS_WIDTH = 500; - public const int CANVAS_HEIGHT = 350; - public const int INITIAL_PRICE = 3; - - public NCanvasService( - DbService db, - IBotCache cache, - DiscordSocketClient client, - ICurrencyService cs) - { - _db = db; - _cache = cache; - _client = client; - _cs = cs; - } - - public async Task OnReadyAsync() - { - if (_client.ShardId != 0) - return; - - await using var uow = _db.GetDbContext(); - - if (await uow.GetTable().CountAsyncLinqToDB() > 0) - return; - - await ResetAsync(); - } - - public async Task ResetAsync() - { - await using var uow = _db.GetDbContext(); - await uow.GetTable().DeleteAsync(); - - var toAdd = new List(); - for (var i = 0; i < CANVAS_WIDTH * CANVAS_HEIGHT; i++) - { - toAdd.Add(i); - } - - await uow.GetTable() - .BulkCopyAsync(toAdd.Select(x => - { - var clr = ColorSpaceConverter.ToRgb(new Hsv(((float)Random.Shared.NextDouble() * 360), - (float)(0.5 + (Random.Shared.NextDouble() * 0.49)), - (float)(0.4 + (Random.Shared.NextDouble() / 5 + (x % 100 * 0.2))))) - .ToVector3(); - - var packed = new Rgba32(clr).PackedValue; - return new NCPixel() - { - Color = packed, - Price = 1, - Position = x, - Text = "", - OwnerId = 0 - }; - })); - } - - - private async Task InternalGetCanvas() - { - await using var uow = _db.GetDbContext(); - var colors = await uow.GetTable() - .OrderBy(x => x.Position) - .Select(x => x.Color) - .ToArrayAsyncLinqToDB(); - - return colors; - } - - public async Task GetCanvas() - { - return await _cache.GetOrAddAsync(_canvasKey, - async () => await InternalGetCanvas(), - TimeSpan.FromSeconds(15)) - ?? []; - } - - public async Task SetPixel( - int position, - uint color, - string text, - ulong userId, - long price) - { - if (position < 0 || position >= CANVAS_WIDTH * CANVAS_HEIGHT) - return SetPixelResult.InvalidInput; - - var wallet = await _cs.GetWalletAsync(userId); - - var paid = await wallet.Take(price, new("canvas", "pixel-buy", $"Bought pixel {new kwum(position)}")); - if (!paid) - { - return SetPixelResult.NotEnoughMoney; - } - - var success = false; - try - { - await using var uow = _db.GetDbContext(); - var updates = await uow.GetTable() - .Where(x => x.Position == position && x.Price <= price) - .UpdateAsync(old => new NCPixel() - { - Position = position, - Color = color, - Text = text, - OwnerId = userId, - Price = price + 1 - }); - success = updates > 0; - } - catch - { - } - - if (!success) - { - await wallet.Add(price, new("canvas", "pixel-refund", $"Refund pixel {new kwum(position)} purchase")); - } - - return success ? SetPixelResult.Success : SetPixelResult.InsufficientPayment; - } - - public async Task SetImage(uint[] colors) - { - if (colors.Length != CANVAS_WIDTH * CANVAS_HEIGHT) - return false; - - await using var uow = _db.GetDbContext(); - await uow.GetTable().DeleteAsync(); - await uow.GetTable() - .BulkCopyAsync(colors.Select((x, i) => new NCPixel() - { - Color = x, - Price = INITIAL_PRICE, - Position = i, - Text = "", - OwnerId = 0 - })); - - return true; - } - - public Task GetPixel(int x, int y) - { - ArgumentOutOfRangeException.ThrowIfNegative(x); - ArgumentOutOfRangeException.ThrowIfNegative(y); - - if (x >= CANVAS_WIDTH || y >= CANVAS_HEIGHT) - return Task.FromResult(null); - - return GetPixel(x + (y * CANVAS_WIDTH)); - } - - public async Task GetPixel(int position) - { - ArgumentOutOfRangeException.ThrowIfNegative(position); - - await using var uow = _db.GetDbContext(); - return await uow.GetTable().FirstOrDefaultAsync(x => x.Position == position); - } - - public async Task GetPixelGroup(int position) - { - ArgumentOutOfRangeException.ThrowIfNegative(position); - ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(position, CANVAS_WIDTH * CANVAS_HEIGHT); - - await using var uow = _db.GetDbContext(); - return await uow.GetTable() - .Where(x => x.Position % CANVAS_WIDTH >= (position % CANVAS_WIDTH) - 2 - && x.Position % CANVAS_WIDTH <= (position % CANVAS_WIDTH) + 2 - && x.Position / CANVAS_WIDTH >= (position / CANVAS_WIDTH) - 2 - && x.Position / CANVAS_WIDTH <= (position / CANVAS_WIDTH) + 2) - .OrderBy(x => x.Position) - .ToArrayAsyncLinqToDB(); - } - - public int GetHeight() - => CANVAS_HEIGHT; - - public int GetWidth() - => CANVAS_WIDTH; -} diff --git a/src/EllieBot/Modules/Games/NCanvas/SetPixelResult.cs b/src/EllieBot/Modules/Games/NCanvas/SetPixelResult.cs deleted file mode 100644 index 523135e..0000000 --- a/src/EllieBot/Modules/Games/NCanvas/SetPixelResult.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EllieBot.Modules.Games; - -public enum SetPixelResult -{ - Success, - InsufficientPayment, - NotEnoughMoney, - InvalidInput -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Games/Nunchi/NunchiCommands.cs b/src/EllieBot/Modules/Games/Nunchi/NunchiCommands.cs index 0cdd8b7..80e6c42 100644 --- a/src/EllieBot/Modules/Games/Nunchi/NunchiCommands.cs +++ b/src/EllieBot/Modules/Games/Nunchi/NunchiCommands.cs @@ -29,7 +29,7 @@ public partial class Games if (!await nunchi.Join(ctx.User.Id, ctx.User.ToString())) return; - await Response().Confirm(strs.nunchi_joined(nunchi.ParticipantCount)).SendAsync(); + await Response().Error(strs.nunchi_joined(nunchi.ParticipantCount)).SendAsync(); return; } diff --git a/src/EllieBot/Modules/Games/Trivia/TriviaCommands.cs b/src/EllieBot/Modules/Games/Trivia/Games.cs similarity index 98% rename from src/EllieBot/Modules/Games/Trivia/TriviaCommands.cs rename to src/EllieBot/Modules/Games/Trivia/Games.cs index 72b4eb4..ff7ffbd 100644 --- a/src/EllieBot/Modules/Games/Trivia/TriviaCommands.cs +++ b/src/EllieBot/Modules/Games/Trivia/Games.cs @@ -107,9 +107,9 @@ public partial class Games return sb.ToString(); } - private EmbedBuilder? questionEmbed; - private IUserMessage? questionMessage; - private bool showHowToQuit; + private EmbedBuilder? questionEmbed = null; + private IUserMessage? questionMessage = null; + private bool showHowToQuit = false; private void RegisterEvents(TriviaGame trivia) { diff --git a/src/EllieBot/Modules/Games/Trivia/TriviaGame.cs b/src/EllieBot/Modules/Games/Trivia/TriviaGame.cs index 07c4ab4..4223104 100644 --- a/src/EllieBot/Modules/Games/Trivia/TriviaGame.cs +++ b/src/EllieBot/Modules/Games/Trivia/TriviaGame.cs @@ -11,19 +11,12 @@ public sealed class TriviaGame private readonly IQuestionPool _questionPool; #region Events - public event Func OnQuestion = static delegate { return Task.CompletedTask; }; public event Func OnHint = static delegate { return Task.CompletedTask; }; public event Func OnStats = static delegate { return Task.CompletedTask; }; - - public event Func OnGuess = static delegate - { - return Task.CompletedTask; - }; - + public event Func OnGuess = static delegate { return Task.CompletedTask; }; public event Func OnTimeout = static delegate { return Task.CompletedTask; }; public event Func OnEnded = static delegate { return Task.CompletedTask; }; - #endregion private bool _isStopped; @@ -31,7 +24,7 @@ public sealed class TriviaGame public TriviaQuestion? CurrentQuestion { get; set; } - private readonly ConcurrentDictionary _users = new(); + private readonly ConcurrentDictionary _users = new (); private readonly Channel<(TriviaUser User, string Input)> _inputs = Channel.CreateUnbounded<(TriviaUser, string)>(new UnboundedChannelOptions @@ -48,8 +41,8 @@ public sealed class TriviaGame _questionPool = _opts.IsPokemon ? new PokemonQuestionPool(cache) : new DefaultQuestionPool(cache); - } + } public async Task RunAsync() { await GameLoop(); @@ -57,8 +50,7 @@ public sealed class TriviaGame private async Task GameLoop() { - Task TimeOutFactory() - => Task.Delay(_opts.QuestionTimer * 1000 / 2); + Task TimeOutFactory() => Task.Delay(_opts.QuestionTimer * 1000 / 2); var errorCount = 0; var inactivity = 0; @@ -99,8 +91,7 @@ public sealed class TriviaGame { // clear out all of the past guesses while (_inputs.Reader.TryRead(out _)) - { - } + ; await OnQuestion(this, question); } @@ -130,7 +121,7 @@ public sealed class TriviaGame if (task == halfGuessTimerTask) { readCancel.Cancel(); - + // if hint is already sent, means time expired // break (end the round) if (hintSent) @@ -222,7 +213,7 @@ public sealed class TriviaGame public async Task TriggerQuestionAsync() { - if (CurrentQuestion is TriviaQuestion q) + if(CurrentQuestion is TriviaQuestion q) await OnQuestion(this, q); } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Help/CommandJsonObject.cs b/src/EllieBot/Modules/Help/CommandJsonObject.cs index 4339f7c..062a0b9 100644 --- a/src/EllieBot/Modules/Help/CommandJsonObject.cs +++ b/src/EllieBot/Modules/Help/CommandJsonObject.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable namespace EllieBot.Modules.Help; internal class CommandJsonObject diff --git a/src/EllieBot/Modules/Help/CommandsOptions.cs b/src/EllieBot/Modules/Help/CommandsOptions.cs index c8b1d6f..ecbb06c 100644 --- a/src/EllieBot/Modules/Help/CommandsOptions.cs +++ b/src/EllieBot/Modules/Help/CommandsOptions.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using CommandLine; namespace EllieBot.Modules.Help.Common; diff --git a/src/EllieBot/Modules/Help/Help.cs b/src/EllieBot/Modules/Help/Help.cs index 8b7c006..f8fe29b 100644 --- a/src/EllieBot/Modules/Help/Help.cs +++ b/src/EllieBot/Modules/Help/Help.cs @@ -1,4 +1,4 @@ -#nullable disable +#nullable disable using EllieBot.Modules.Help.Common; using EllieBot.Modules.Help.Services; using Newtonsoft.Json; @@ -10,7 +10,7 @@ namespace EllieBot.Modules.Help; public sealed partial class Help : EllieModule { public const string PATREON_URL = "https://patreon.com/elliebot"; - public const string PAYPAL_URL = "https://paypal.me/toastie_t0ast"; + public const string PAYPAL_URL = "https://paypal.me/toastiet0ast"; private readonly ICommandsUtilityService _cus; private readonly CommandService _cmds; @@ -175,6 +175,8 @@ public sealed partial class Help : EllieModule return strs.module_description_gambling; case "music": return strs.module_description_music; + case "nsfw": + return strs.module_description_nsfw; case "permissions": return strs.module_description_permissions; case "xp": @@ -209,6 +211,8 @@ public sealed partial class Help : EllieModule return "💰"; case "music": return "🎶"; + case "nsfw": + return "😳"; case "permissions": return "🚓"; case "xp": @@ -505,7 +509,6 @@ public sealed partial class Help : EllieModule // send the indented file to chat await using var rDataStream = new MemoryStream(Encoding.ASCII.GetBytes(readableData)); - await File.WriteAllTextAsync("data/commandlist.json", readableData); await ctx.Channel.SendFileAsync(rDataStream, "cmds.json", GetText(strs.commandlist_regen)); } @@ -513,13 +516,34 @@ public sealed partial class Help : EllieModule public async Task Guide() => await Response() .Confirm(strs.guide("https://commands.elliebot.net", - "https://docs.elliebot.net")) + "https://docs.elliebot.net/")) .SendAsync(); + + private Task SelfhostAction(SocketMessageComponent smc) + => smc.RespondConfirmAsync(_sender, + """ + - In case you don't want or cannot Donate to EllieBot project, but you + - EllieBot is a free and [open source](https://toastielab.dev/Emotions-stuff/elliebot) project which means you can run your own "selfhosted" instance on your computer. + + *Keep in mind that running the bot on your computer means that the bot will be offline when you turn off your computer* + + - You can find the selfhosting guides by using the `.guide` command and clicking on the second link that pops up. + - If you decide to selfhost the bot, still consider [supporting the project](https://patreon.com/join/elliebot) to keep the development going :) + """, + true); + [Cmd] [OnlyPublicBot] public async Task Donate() { + var selfhostInter = _inter.Create(ctx.User.Id, + new ButtonBuilder( + emote: new Emoji("🖥️"), + customId: "donate:selfhosting", + label: "Selfhosting"), + SelfhostAction); + var eb = _sender.CreateEmbed() .WithOkColor() .WithTitle("Thank you for considering to donate to the EllieBot project!"); @@ -556,6 +580,7 @@ public sealed partial class Help : EllieModule await Response() .Channel(await ctx.User.CreateDMChannelAsync()) .Embed(eb) + .Interaction(selfhostInter) .SendAsync(); _ = ctx.OkAsync(); diff --git a/src/EllieBot/Modules/Help/HelpService.cs b/src/EllieBot/Modules/Help/HelpService.cs index 1f9a045..5904c03 100644 --- a/src/EllieBot/Modules/Help/HelpService.cs +++ b/src/EllieBot/Modules/Help/HelpService.cs @@ -1,4 +1,4 @@ -using EllieBot.Common.ModuleBehaviors; +using EllieBot.Common.ModuleBehaviors; namespace EllieBot.Modules.Help.Services; @@ -31,7 +31,7 @@ public class HelpService : IExecNoCommand, IEService return; } - var repCtx = new ReplacementContext(guild: guild, channel: msg.Channel, user: msg.Author) + var repCtx = new ReplacementContext(guild: guild, channel: msg.Channel, users: msg.Author) .WithOverride("%prefix%", () => _bss.Data.Prefix) .WithOverride("%bot.prefix%", () => _bss.Data.Prefix); diff --git a/src/EllieBot/Modules/Music/Music.cs b/src/EllieBot/Modules/Music/Music.cs index 3b1393c..a36c440 100644 --- a/src/EllieBot/Modules/Music/Music.cs +++ b/src/EllieBot/Modules/Music/Music.cs @@ -1,6 +1,7 @@ #nullable disable using EllieBot.Modules.Music.Services; using EllieBot.Db.Models; +using EllieBot.Modules.Utility; namespace EllieBot.Modules.Music; diff --git a/src/EllieBot/Modules/Music/PlaylistCommands.cs b/src/EllieBot/Modules/Music/PlaylistCommands.cs index 68a651d..259bb9e 100644 --- a/src/EllieBot/Modules/Music/PlaylistCommands.cs +++ b/src/EllieBot/Modules/Music/PlaylistCommands.cs @@ -1,5 +1,6 @@ #nullable disable using LinqToDB; +using EllieBot.Db; using EllieBot.Modules.Music.Services; using EllieBot.Db.Models; @@ -12,9 +13,9 @@ public sealed partial class Music { private static readonly SemaphoreSlim _playlistLock = new(1, 1); private readonly DbService _db; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; - public PlaylistCommands(DbService db, IBotCreds creds) + public PlaylistCommands(DbService db, IBotCredentials creds) { _db = db; _creds = creds; @@ -136,7 +137,7 @@ public sealed partial class Music Provider = s.Platform.ToString(), ProviderType = (MusicType)s.Platform, Title = s.Title, - Query = s.Url + Query = s.Platform == MusicPlatform.Local ? s.GetStreamUrl().Result!.Trim('"') : s.Url }) .ToList(); diff --git a/src/EllieBot/Modules/Music/Services/MusicService.cs b/src/EllieBot/Modules/Music/Services/MusicService.cs index 89c848d..c92d8de 100644 --- a/src/EllieBot/Modules/Music/Services/MusicService.cs +++ b/src/EllieBot/Modules/Music/Services/MusicService.cs @@ -1,5 +1,5 @@ -using EllieBot.Db.Models; -using EllieBot.Modules.Music.Resolvers; +using EllieBot.Db; +using EllieBot.Db.Models; using System.Diagnostics.CodeAnalysis; namespace EllieBot.Modules.Music.Services; @@ -9,7 +9,7 @@ public sealed class MusicService : IMusicService, IPlaceholderProvider private readonly AyuVoiceStateService _voiceStateService; private readonly ITrackResolveProvider _trackResolveProvider; private readonly DbService _db; - private readonly IYoutubeResolverFactory _ytResolver; + private readonly IYoutubeResolver _ytResolver; private readonly ILocalTrackResolver _localResolver; private readonly DiscordSocketClient _client; private readonly IBotStrings _strings; @@ -25,7 +25,7 @@ public sealed class MusicService : IMusicService, IPlaceholderProvider AyuVoiceStateService voiceStateService, ITrackResolveProvider trackResolveProvider, DbService db, - IYoutubeResolverFactory ytResolver, + IYoutubeResolver ytResolver, ILocalTrackResolver localResolver, DiscordSocketClient client, IBotStrings strings, @@ -94,7 +94,7 @@ public sealed class MusicService : IMusicService, IPlaceholderProvider public async Task EnqueueYoutubePlaylistAsync(IMusicPlayer mp, string query, string queuer) { var count = 0; - await foreach (var track in _ytResolver.GetYoutubeResolver().ResolveTracksFromPlaylistAsync(query)) + await foreach (var track in _ytResolver.ResolveTracksFromPlaylistAsync(query)) { if (mp.IsKilled) break; @@ -140,7 +140,6 @@ public sealed class MusicService : IMusicService, IPlaceholderProvider var mp = new MusicPlayer(queue, resolver, - _ytResolver, proxy, _googleApiService, settings.QualityPreset, diff --git a/src/EllieBot/Modules/Music/_common/ITrackInfo.cs b/src/EllieBot/Modules/Music/_common/ITrackInfo.cs index 3525b59..347e8fa 100644 --- a/src/EllieBot/Modules/Music/_common/ITrackInfo.cs +++ b/src/EllieBot/Modules/Music/_common/ITrackInfo.cs @@ -8,4 +8,5 @@ public interface ITrackInfo public string Thumbnail { get; } public TimeSpan Duration { get; } public MusicPlatform Platform { get; } + public ValueTask GetStreamUrl(); } \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/IYoutubeResolver.cs b/src/EllieBot/Modules/Music/_common/IYoutubeResolver.cs index e4c2f53..433012d 100644 --- a/src/EllieBot/Modules/Music/_common/IYoutubeResolver.cs +++ b/src/EllieBot/Modules/Music/_common/IYoutubeResolver.cs @@ -4,8 +4,8 @@ namespace EllieBot.Modules.Music; public interface IYoutubeResolver : IPlatformQueryResolver { + public Regex YtVideoIdRegex { get; } public Task ResolveByIdAsync(string id); IAsyncEnumerable ResolveTracksFromPlaylistAsync(string query); Task ResolveByQueryAsync(string query, bool tryExtractingId); - Task GetStreamUrl(string query); } \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Impl/MusicPlayer.cs b/src/EllieBot/Modules/Music/_common/Impl/MusicPlayer.cs index 02cb4e2..6819d4e 100644 --- a/src/EllieBot/Modules/Music/_common/Impl/MusicPlayer.cs +++ b/src/EllieBot/Modules/Music/_common/Impl/MusicPlayer.cs @@ -1,6 +1,5 @@ using EllieBot.Voice; using EllieBot.Db.Models; -using EllieBot.Modules.Music.Resolvers; using System.ComponentModel; using System.Diagnostics; using System.Runtime.CompilerServices; @@ -28,7 +27,6 @@ public sealed class MusicPlayer : IMusicPlayer private readonly IMusicQueue _queue; private readonly ITrackResolveProvider _trackResolveProvider; - private readonly IYoutubeResolverFactory _ytResolverFactory; private readonly IVoiceProxy _proxy; private readonly IGoogleApiService _googleApiService; private readonly ISongBuffer _songBuffer; @@ -43,7 +41,6 @@ public sealed class MusicPlayer : IMusicPlayer public MusicPlayer( IMusicQueue queue, ITrackResolveProvider trackResolveProvider, - IYoutubeResolverFactory ytResolverFactory, IVoiceProxy proxy, IGoogleApiService googleApiService, QualityPreset qualityPreset, @@ -51,7 +48,6 @@ public sealed class MusicPlayer : IMusicPlayer { _queue = queue; _trackResolveProvider = trackResolveProvider; - _ytResolverFactory = ytResolverFactory; _proxy = proxy; _googleApiService = googleApiService; AutoPlay = autoPlay; @@ -122,7 +118,7 @@ public sealed class MusicPlayer : IMusicPlayer // make sure song buffer is ready to be (re)used _songBuffer.Reset(); - var streamUrl = await GetStreamUrl(track); + var streamUrl = await track.GetStreamUrl(); // start up the data source using var source = FfmpegTrackDataSource.CreateAsync( _vc.BitDepth, @@ -260,7 +256,6 @@ public sealed class MusicPlayer : IMusicPlayer IsStopped = true; Log.Error("Please install ffmpeg and make sure it's added to your " + "PATH environment variable before trying again"); - } catch (OperationCanceledException) { @@ -269,7 +264,6 @@ public sealed class MusicPlayer : IMusicPlayer catch (Exception ex) { Log.Error(ex, "Unknown error in music loop: {ErrorMessage}", ex.Message); - await Task.Delay(3_000); } finally { @@ -309,14 +303,6 @@ public sealed class MusicPlayer : IMusicPlayer } } - private async Task GetStreamUrl(IQueuedTrackInfo track) - { - if (track.TrackInfo is SimpleTrackInfo sti) - return sti.StreamUrl; - - return await _ytResolverFactory.GetYoutubeResolver().GetStreamUrl(track.TrackInfo.Id); - } - private bool? CopyChunkToOutput(ISongBuffer sb, VoiceClient vc) { var data = sb.Read(vc.InputLength, out var length); diff --git a/src/EllieBot/Modules/Music/_common/Impl/MusicQueue.cs b/src/EllieBot/Modules/Music/_common/Impl/MusicQueue.cs index 9b1c7aa..1b1ce9c 100644 --- a/src/EllieBot/Modules/Music/_common/Impl/MusicQueue.cs +++ b/src/EllieBot/Modules/Music/_common/Impl/MusicQueue.cs @@ -28,6 +28,9 @@ public sealed partial class MusicQueue TrackInfo = trackInfo; Queuer = queuer; } + + public ValueTask GetStreamUrl() + => TrackInfo.GetStreamUrl(); } } diff --git a/src/EllieBot/Modules/Music/_common/Impl/RemoteTrackInfo.cs b/src/EllieBot/Modules/Music/_common/Impl/RemoteTrackInfo.cs index b846b25..b002779 100644 --- a/src/EllieBot/Modules/Music/_common/Impl/RemoteTrackInfo.cs +++ b/src/EllieBot/Modules/Music/_common/Impl/RemoteTrackInfo.cs @@ -6,4 +6,11 @@ public sealed record RemoteTrackInfo( string Url, string Thumbnail, TimeSpan Duration, - MusicPlatform Platform) : ITrackInfo; \ No newline at end of file + MusicPlatform Platform, + Func> _streamFactory) : ITrackInfo +{ + private readonly Func> _streamFactory = _streamFactory; + + public async ValueTask GetStreamUrl() + => await _streamFactory(); +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Impl/SimpleTrackInfo.cs b/src/EllieBot/Modules/Music/_common/Impl/SimpleTrackInfo.cs index c7828cc..9ae1c30 100644 --- a/src/EllieBot/Modules/Music/_common/Impl/SimpleTrackInfo.cs +++ b/src/EllieBot/Modules/Music/_common/Impl/SimpleTrackInfo.cs @@ -24,4 +24,7 @@ public sealed class SimpleTrackInfo : ITrackInfo Platform = platform; StreamUrl = streamUrl; } + + public ValueTask GetStreamUrl() + => new(StreamUrl); } \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/InvTrackInfo.cs b/src/EllieBot/Modules/Music/_common/Resolvers/InvTrackInfo.cs deleted file mode 100644 index cca2727..0000000 --- a/src/EllieBot/Modules/Music/_common/Resolvers/InvTrackInfo.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EllieBot.Modules.Music; - -public sealed class InvTrackInfo : ITrackInfo -{ - public required string Id { get; init; } - public required string Title { get; init; } - public required string Url { get; init; } - public required string Thumbnail { get; init; } - public required TimeSpan Duration { get; init; } - public required MusicPlatform Platform { get; init; } - public required string? StreamUrl { get; init; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/InvidiousYoutubeResolver.cs b/src/EllieBot/Modules/Music/_common/Resolvers/InvidiousYoutubeResolver.cs deleted file mode 100644 index fa21693..0000000 --- a/src/EllieBot/Modules/Music/_common/Resolvers/InvidiousYoutubeResolver.cs +++ /dev/null @@ -1,108 +0,0 @@ -using EllieBot.Modules.Searches; -using System.Net.Http.Json; - -namespace EllieBot.Modules.Music; - -public sealed class InvidiousYoutubeResolver : IYoutubeResolver -{ - private readonly IHttpClientFactory _httpFactory; - private readonly SearchesConfigService _sc; - private readonly EllieRandom _rng; - - private string InvidiousApiUrl - => _sc.Data.InvidiousInstances[_rng.Next(0, _sc.Data.InvidiousInstances.Count)]; - - public InvidiousYoutubeResolver(IHttpClientFactory httpFactory, SearchesConfigService sc) - { - _rng = new EllieRandom(); - _httpFactory = httpFactory; - _sc = sc; - } - - public async Task ResolveByQueryAsync(string query) - { - using var http = _httpFactory.CreateClient(); - - var items = await http.GetFromJsonAsync>( - $"{InvidiousApiUrl}/api/v1/search" - + $"?q={query}" - + $"&type=video"); - - if (items is null || items.Count == 0) - return null; - - - var res = items.First(); - - return new InvTrackInfo() - { - Id = res.VideoId, - Title = res.Title, - Url = $"https://youtube.com/watch?v={res.VideoId}", - Thumbnail = res.Thumbnails?.Select(x => x.Url).FirstOrDefault() ?? string.Empty, - Duration = TimeSpan.FromSeconds(res.LengthSeconds), - Platform = MusicPlatform.Youtube, - StreamUrl = null, - }; - } - - public async Task ResolveByIdAsync(string id) - => await InternalResolveByIdAsync(id); - - private async Task InternalResolveByIdAsync(string id) - { - using var http = _httpFactory.CreateClient(); - - var res = await http.GetFromJsonAsync( - $"{InvidiousApiUrl}/api/v1/videos/{id}"); - - if (res is null) - return null; - - return new InvTrackInfo() - { - Id = res.VideoId, - Title = res.Title, - Url = $"https://youtube.com/watch?v={res.VideoId}", - Thumbnail = res.Thumbnails?.Select(x => x.Url).FirstOrDefault() ?? string.Empty, - Duration = TimeSpan.FromSeconds(res.LengthSeconds), - Platform = MusicPlatform.Youtube, - StreamUrl = res.AdaptiveFormats.FirstOrDefault(x => x.AudioQuality == "AUDIO_QUALITY_HIGH")?.Url - ?? res.AdaptiveFormats.FirstOrDefault(x => x.AudioQuality == "AUDIO_QUALITY_MEDIUM")?.Url - ?? res.AdaptiveFormats.FirstOrDefault(x => x.AudioQuality == "AUDIO_QUALITY_LOW")?.Url - }; - } - - public async IAsyncEnumerable ResolveTracksFromPlaylistAsync(string query) - { - using var http = _httpFactory.CreateClient(); - var res = await http.GetFromJsonAsync( - $"{InvidiousApiUrl}/api/v1/search?type=video&q={query}"); - - if (res is null) - yield break; - - foreach (var video in res.Videos) - { - yield return new InvTrackInfo() - { - Id = video.VideoId, - Title = video.Title, - Url = $"https://youtube.com/watch?v={video.VideoId}", - Thumbnail = video.Thumbnails?.Select(x => x.Url).FirstOrDefault() ?? string.Empty, - Duration = TimeSpan.FromSeconds(video.LengthSeconds), - Platform = MusicPlatform.Youtube, - StreamUrl = null - }; - } - } - - public Task ResolveByQueryAsync(string query, bool tryExtractingId) - => ResolveByQueryAsync(query); - - public async Task GetStreamUrl(string videoId) - { - var video = await InternalResolveByIdAsync(videoId); - return video?.StreamUrl; - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/RadioResolveStrategy.cs b/src/EllieBot/Modules/Music/_common/Resolvers/RadioResolveStrategy.cs index 475b026..c3733a4 100644 --- a/src/EllieBot/Modules/Music/_common/Resolvers/RadioResolveStrategy.cs +++ b/src/EllieBot/Modules/Music/_common/Resolvers/RadioResolveStrategy.cs @@ -61,8 +61,8 @@ public class RadioResolver : IRadioResolver try { var m = _m3URegex.Match(file); - var res = m.Groups["url"].ToString(); - return res.Trim(); + var res = m.Groups["url"]?.ToString(); + return res?.Trim(); } catch { @@ -76,8 +76,8 @@ public class RadioResolver : IRadioResolver try { var m = _asxRegex.Match(file); - var res = m.Groups["url"].ToString(); - return res.Trim(); + var res = m.Groups["url"]?.ToString(); + return res?.Trim(); } catch { @@ -91,8 +91,8 @@ public class RadioResolver : IRadioResolver try { var m = _xspfRegex.Match(file); - var res = m.Groups["url"].ToString(); - return res.Trim(); + var res = m.Groups["url"]?.ToString(); + return res?.Trim(); } catch { diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/TrackResolveProvider.cs b/src/EllieBot/Modules/Music/_common/Resolvers/TrackResolveProvider.cs index 21a6adf..642edf1 100644 --- a/src/EllieBot/Modules/Music/_common/Resolvers/TrackResolveProvider.cs +++ b/src/EllieBot/Modules/Music/_common/Resolvers/TrackResolveProvider.cs @@ -1,15 +1,13 @@ -using EllieBot.Modules.Music.Resolvers; - -namespace EllieBot.Modules.Music; +namespace EllieBot.Modules.Music; public sealed class TrackResolveProvider : ITrackResolveProvider { - private readonly IYoutubeResolverFactory _ytResolver; + private readonly IYoutubeResolver _ytResolver; private readonly ILocalTrackResolver _localResolver; private readonly IRadioResolver _radioResolver; public TrackResolveProvider( - IYoutubeResolverFactory ytResolver, + IYoutubeResolver ytResolver, ILocalTrackResolver localResolver, IRadioResolver radioResolver) { @@ -25,22 +23,19 @@ public sealed class TrackResolveProvider : ITrackResolveProvider case MusicPlatform.Radio: return _radioResolver.ResolveByQueryAsync(query); case MusicPlatform.Youtube: - return _ytResolver.GetYoutubeResolver().ResolveByQueryAsync(query); + return _ytResolver.ResolveByQueryAsync(query); case MusicPlatform.Local: return _localResolver.ResolveByQueryAsync(query); case null: - var match = YoutubeHelpers.YtVideoIdRegex.Match(query); - + var match = _ytResolver.YtVideoIdRegex.Match(query); if (match.Success) - return _ytResolver.GetYoutubeResolver().ResolveByIdAsync(match.Groups["id"].Value); - - if (Uri.TryCreate(query, UriKind.Absolute, out var uri) && uri.IsFile) + return _ytResolver.ResolveByIdAsync(match.Groups["id"].Value); + else if (Uri.TryCreate(query, UriKind.Absolute, out var uri) && uri.IsFile) return _localResolver.ResolveByQueryAsync(uri.AbsolutePath); - - if (IsRadioLink(query)) + else if (IsRadioLink(query)) return _radioResolver.ResolveByQueryAsync(query); - - return _ytResolver.GetYoutubeResolver().ResolveByQueryAsync(query, false); + else + return _ytResolver.ResolveByQueryAsync(query, false); default: Log.Error("Unsupported platform: {MusicPlatform}", forcePlatform); return Task.FromResult(null); diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeHelpers.cs b/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeHelpers.cs deleted file mode 100644 index 869102d..0000000 --- a/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeHelpers.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Text.RegularExpressions; - -namespace EllieBot.Modules.Music; - -public sealed class YoutubeHelpers -{ - public static Regex YtVideoIdRegex { get; } = - new(@"(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\?(?:\S*?&?v\=))|youtu\.be\/)(?[a-zA-Z0-9_-]{6,11})", - RegexOptions.Compiled); -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeResolverFactory.cs b/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeResolverFactory.cs deleted file mode 100644 index 955faca..0000000 --- a/src/EllieBot/Modules/Music/_common/Resolvers/YoutubeResolverFactory.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using EllieBot.Modules.Searches; -using EllieBot.Modules.Searches.Services; - -namespace EllieBot.Modules.Music.Resolvers; - -public interface IYoutubeResolverFactory -{ - IYoutubeResolver GetYoutubeResolver(); -} - -public sealed class YoutubeResolverFactory : IYoutubeResolverFactory -{ - private readonly SearchesConfigService _ss; - private readonly IServiceProvider _services; - - public YoutubeResolverFactory(SearchesConfigService ss, IServiceProvider services) - { - _ss = ss; - _services = services; - } - - public IYoutubeResolver GetYoutubeResolver() - { - var conf = _ss.Data; - if (conf.YtProvider == YoutubeSearcher.Invidious) - { - return _services.GetRequiredService(); - } - - return _services.GetRequiredService(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Music/_common/Resolvers/YtdlYoutubeResolver.cs b/src/EllieBot/Modules/Music/_common/Resolvers/YtdlYoutubeResolver.cs index 4b0af89..70479d0 100644 --- a/src/EllieBot/Modules/Music/_common/Resolvers/YtdlYoutubeResolver.cs +++ b/src/EllieBot/Modules/Music/_common/Resolvers/YtdlYoutubeResolver.cs @@ -16,6 +16,9 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver private static readonly Regex _simplePlaylistRegex = new(@"&list=(?[\w\-]{12,})", RegexOptions.Compiled); + public Regex YtVideoIdRegex { get; } = + new(@"(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\?(?:\S*?&?v\=))|youtu\.be\/)(?[a-zA-Z0-9_-]{6,11})", + RegexOptions.Compiled); private readonly ITrackCacher _trackCacher; @@ -29,7 +32,7 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver { _trackCacher = trackCacher; _google = google; - + _ytdlPlaylistOperation = new("-4 " + "--geo-bypass " @@ -43,7 +46,7 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver + "--no-check-certificate " + "-i " + "--yes-playlist " - + "-- \"{0}\""); + + "-- \"{0}\"", scs.Data.YtProvider != YoutubeSearcher.Ytdl); _ytdlIdOperation = new("-4 " + "--geo-bypass " @@ -55,7 +58,7 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver + "--get-thumbnail " + "--get-duration " + "--no-check-certificate " - + "-- \"{0}\""); + + "-- \"{0}\"", scs.Data.YtProvider != YoutubeSearcher.Ytdl); _ytdlSearchOperation = new("-4 " + "--geo-bypass " @@ -68,7 +71,7 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver + "--get-duration " + "--no-check-certificate " + "--default-search " - + "\"ytsearch:\" -- \"{0}\""); + + "\"ytsearch:\" -- \"{0}\"", scs.Data.YtProvider != YoutubeSearcher.Ytdl); } private YtTrackData ResolveYtdlData(string ytdlOutputString) @@ -99,7 +102,8 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver $"https://youtube.com/watch?v={trackData.Id}", trackData.Thumbnail, trackData.Duration, - MusicPlatform.Youtube); + MusicPlatform.Youtube, + CreateCacherFactory(trackData.Id)); private Func> CreateCacherFactory(string id) => () => _trackCacher.GetOrCreateStreamLink(id, @@ -264,7 +268,7 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver { if (tryResolving) { - var match = YoutubeHelpers.YtVideoIdRegex.Match(query); + var match = YtVideoIdRegex.Match(query); if (match.Success) return await ResolveByIdAsync(match.Groups["id"].Value); } @@ -286,8 +290,6 @@ public sealed class YtdlYoutubeResolver : IYoutubeResolver return DataToInfo(new(cachedData.Title, cachedData.Id, cachedData.Thumbnail, null, cachedData.Duration)); } - public Task GetStreamUrl(string videoId) - => CreateCacherFactory(videoId)(); private readonly struct YtTrackData { public readonly string Title; diff --git a/src/EllieBot/Modules/Patronage/CurrencyRewardService.cs b/src/EllieBot/Modules/Patronage/CurrencyRewardService.cs index 391ebb4..b61c646 100644 --- a/src/EllieBot/Modules/Patronage/CurrencyRewardService.cs +++ b/src/EllieBot/Modules/Patronage/CurrencyRewardService.cs @@ -122,9 +122,9 @@ public sealed class CurrencyRewardService : IEService, IReadyExecutor var dollarValue = pledgeCents / 100; percentBonus = dollarValue switch { - >= 100 => 25, - >= 50 => 20, - >= 20 => 15, + >= 100 => 100, + >= 50 => 50, + >= 20 => 20, >= 10 => 10, >= 5 => 5, _ => 0 diff --git a/src/EllieBot/Modules/Patronage/PatronageService.cs b/src/EllieBot/Modules/Patronage/PatronageService.cs index 17e418c..e6d7899 100644 --- a/src/EllieBot/Modules/Patronage/PatronageService.cs +++ b/src/EllieBot/Modules/Patronage/PatronageService.cs @@ -2,6 +2,8 @@ using LinqToDB.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; using EllieBot.Db.Models; +using StackExchange.Redis; +using System.Diagnostics; namespace EllieBot.Modules.Patronage; @@ -19,11 +21,16 @@ public sealed class PatronageService public int Priority => int.MinValue; + private static readonly PatronTier[] _tiers = Enum.GetValues(); + private readonly PatronageConfig _pConf; private readonly DbService _db; private readonly DiscordSocketClient _client; private readonly ISubscriptionHandler _subsHandler; + private static readonly TypedKey _quotaKey + = new($"quota:last_hourly_reset"); + private readonly IBotCache _cache; private readonly IBotCredsProvider _creds; private readonly IMessageSenderService _sender; @@ -128,19 +135,19 @@ public sealed class PatronageService // user is charged again for this month // if his sub would end in teh future, extend it by one month. // if it's not, just add 1 month to the last charge date - await ctx.GetTable() - .Where(x => x.UniquePlatformUserId - == subscriber.UniquePlatformUserId) - .UpdateAsync(old => new() - { - UserId = subscriber.UserId, - AmountCents = subscriber.Cents, - LastCharge = lastChargeUtc, - ValidThru = old.ValidThru >= todayDate - // ? Sql.DateAdd(Sql.DateParts.Month, 1, old.ValidThru).Value - ? old.ValidThru.AddMonths(1) - : dateInOneMonth, - }); + var count = await ctx.GetTable() + .Where(x => x.UniquePlatformUserId + == subscriber.UniquePlatformUserId) + .UpdateAsync(old => new() + { + UserId = subscriber.UserId, + AmountCents = subscriber.Cents, + LastCharge = lastChargeUtc, + ValidThru = old.ValidThru >= todayDate + // ? Sql.DateAdd(Sql.DateParts.Month, 1, old.ValidThru).Value + ? old.ValidThru.AddMonths(1) + : dateInOneMonth, + }); dbPatron.UserId = subscriber.UserId; @@ -404,9 +411,9 @@ public sealed class PatronageService { >= 10_000 => 100, >= 5000 => 50, - >= 2000 => 30, - >= 1000 => 20, - >= 500 => 10, + >= 2000 => 20, + >= 1000 => 10, + >= 500 => 5, _ => 0 }; diff --git a/src/EllieBot/Modules/Permissions/Blacklist/BlacklistCommands.cs b/src/EllieBot/Modules/Permissions/Blacklist/BlacklistCommands.cs index 5ce851b..b552636 100644 --- a/src/EllieBot/Modules/Permissions/Blacklist/BlacklistCommands.cs +++ b/src/EllieBot/Modules/Permissions/Blacklist/BlacklistCommands.cs @@ -18,39 +18,39 @@ public partial class Permissions { ArgumentOutOfRangeException.ThrowIfNegative(page); - var list = await _service.GetBlacklist(type); - var allItems = await list - .Select(i => - { - try - { - return Task.FromResult(type switch - { - BlacklistType.Channel => Format.Code(i.ItemId.ToString()) + var list = _service.GetBlacklist(); + var allItems = await list.Where(x => x.Type == type) + .Select(i => + { + try + { + return Task.FromResult(i.Type switch + { + BlacklistType.Channel => Format.Code(i.ItemId.ToString()) + + " " + + (_client.GetChannel(i.ItemId)?.ToString() + ?? ""), + BlacklistType.User => Format.Code(i.ItemId.ToString()) + + " " + + ((_client.GetUser(i.ItemId)) + ?.ToString() + ?? ""), + BlacklistType.Server => Format.Code(i.ItemId.ToString()) + " " - + (_client.GetChannel(i.ItemId)?.ToString() - ?? ""), - BlacklistType.User => Format.Code(i.ItemId.ToString()) - + " " - + ((_client.GetUser(i.ItemId)) - ?.ToString() - ?? ""), - BlacklistType.Server => Format.Code(i.ItemId.ToString()) - + " " - + (_client.GetGuild(i.ItemId)?.ToString() ?? ""), - _ => Format.Code(i.ItemId.ToString()) - }); - } - catch - { - Log.Warning("Can't get {BlacklistType} [{BlacklistItemId}]", - i.Type, - i.ItemId); - - return Task.FromResult(Format.Code(i.ItemId.ToString())); - } - }) - .WhenAll(); + + (_client.GetGuild(i.ItemId)?.ToString() ?? ""), + _ => Format.Code(i.ItemId.ToString()) + }); + } + catch + { + Log.Warning("Can't get {BlacklistType} [{BlacklistItemId}]", + i.Type, + i.ItemId); + + return Task.FromResult(Format.Code(i.ItemId.ToString())); + } + }) + .WhenAll(); await Response() .Paginated() @@ -61,14 +61,14 @@ public partial class Permissions { if (pageItems.Count == 0) return _sender.CreateEmbed() - .WithOkColor() - .WithTitle(title) - .WithDescription(GetText(strs.empty_page)); + .WithOkColor() + .WithTitle(title) + .WithDescription(GetText(strs.empty_page)); return _sender.CreateEmbed() - .WithTitle(title) - .WithDescription(pageItems.Join('\n')) - .WithOkColor(); + .WithTitle(title) + .WithDescription(allItems.Join('\n')) + .WithOkColor(); }) .SendAsync(); } diff --git a/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdService.cs b/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdService.cs index 55eb64d..9f5c6e2 100644 --- a/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdService.cs +++ b/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdService.cs @@ -1,5 +1,6 @@ using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; namespace EllieBot.Modules.Permissions.Services; diff --git a/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdsCommands.cs b/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdsCommands.cs index a9b7a13..e2c1427 100644 --- a/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdsCommands.cs +++ b/src/EllieBot/Modules/Permissions/CommandCooldown/CmdCdsCommands.cs @@ -1,6 +1,7 @@ #nullable disable using Microsoft.EntityFrameworkCore; using EllieBot.Common.TypeReaders; +using EllieBot.Db; using EllieBot.Modules.Permissions.Services; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Permissions/Filter/FilterCommands.cs b/src/EllieBot/Modules/Permissions/Filter/FilterCommands.cs index fab1a11..cdd3cad 100644 --- a/src/EllieBot/Modules/Permissions/Filter/FilterCommands.cs +++ b/src/EllieBot/Modules/Permissions/Filter/FilterCommands.cs @@ -1,5 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; +using EllieBot.Db; using EllieBot.Modules.Permissions.Services; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Permissions/Filter/FilterService.cs b/src/EllieBot/Modules/Permissions/Filter/FilterService.cs index dd5fbc0..139d0d5 100644 --- a/src/EllieBot/Modules/Permissions/Filter/FilterService.cs +++ b/src/EllieBot/Modules/Permissions/Filter/FilterService.cs @@ -1,6 +1,7 @@ #nullable disable using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Permissions.Services; diff --git a/src/EllieBot/Modules/Permissions/Permissions.cs b/src/EllieBot/Modules/Permissions/Permissions.cs index 5fb6fb2..447dd19 100644 --- a/src/EllieBot/Modules/Permissions/Permissions.cs +++ b/src/EllieBot/Modules/Permissions/Permissions.cs @@ -1,6 +1,7 @@ #nullable disable using EllieBot.Common.TypeReaders; using EllieBot.Common.TypeReaders.Models; +using EllieBot.Db; using EllieBot.Modules.Permissions.Common; using EllieBot.Modules.Permissions.Services; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Permissions/PermissionsService.cs b/src/EllieBot/Modules/Permissions/PermissionsService.cs index e0ac658..95b6388 100644 --- a/src/EllieBot/Modules/Permissions/PermissionsService.cs +++ b/src/EllieBot/Modules/Permissions/PermissionsService.cs @@ -1,6 +1,7 @@ #nullable disable using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; using EllieBot.Modules.Permissions.Common; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Searches/Anime/AnimeSearchCommands.cs b/src/EllieBot/Modules/Searches/Anime/AnimeSearchCommands.cs index 4e95d39..8acae72 100644 --- a/src/EllieBot/Modules/Searches/Anime/AnimeSearchCommands.cs +++ b/src/EllieBot/Modules/Searches/Anime/AnimeSearchCommands.cs @@ -10,6 +10,133 @@ public partial class Searches [Group] public partial class AnimeSearchCommands : EllieModule { + // [EllieCommand, Aliases] + // public async Task Novel([Leftover] string query) + // { + // if (string.IsNullOrWhiteSpace(query)) + // return; + // + // var novelData = await _service.GetNovelData(query); + // + // if (novelData is null) + // { + // await Response().Error(strs.failed_finding_novel).SendAsync(); + // return; + // } + // + // var embed = _sender.CreateEmbed() + // .WithOkColor() + // .WithDescription(novelData.Description.Replace("
", Environment.NewLine, StringComparison.InvariantCulture)) + // .WithTitle(novelData.Title) + // .WithUrl(novelData.Link) + // .WithImageUrl(novelData.ImageUrl) + // .AddField(GetText(strs.authors), string.Join("\n", novelData.Authors), true) + // .AddField(GetText(strs.status), novelData.Status, true) + // .AddField(GetText(strs.genres), string.Join(" ", novelData.Genres.Any() ? novelData.Genres : new[] { "none" }), true) + // .WithFooter($"{GetText(strs.score)} {novelData.Score}"); + // + // await Response().Embed(embed).SendAsync(); + // } + + [Cmd] + [Priority(0)] + public async Task Mal([Leftover] string name) + { + if (string.IsNullOrWhiteSpace(name)) + return; + + var fullQueryLink = "https://myanimelist.net/profile/" + name; + + var config = Configuration.Default.WithDefaultLoader(); + using var document = await BrowsingContext.New(config).OpenAsync(fullQueryLink); + var imageElem = + document.QuerySelector( + "body > div#myanimelist > div.wrapper > div#contentWrapper > div#content > div.content-container > div.container-left > div.user-profile > div.user-image > img"); + var imageUrl = ((IHtmlImageElement)imageElem)?.Source + ?? "http://icecream.me/uploads/870b03f36b59cc16ebfe314ef2dde781.png"; + + var stats = document + .QuerySelectorAll( + "body > div#myanimelist > div.wrapper > div#contentWrapper > div#content > div.content-container > div.container-right > div#statistics > div.user-statistics-stats > div.stats > div.clearfix > ul.stats-status > li > span") + .Select(x => x.InnerHtml) + .ToList(); + + var favorites = document.QuerySelectorAll("div.user-favorites > div.di-tc"); + + var favAnime = GetText(strs.anime_no_fav); + if (favorites.Length > 0 && favorites[0].QuerySelector("p") is null) + { + favAnime = string.Join("\n", + favorites[0] + .QuerySelectorAll("ul > li > div.di-tc.va-t > a") + .Shuffle() + .Take(3) + .Select(x => + { + var elem = (IHtmlAnchorElement)x; + return $"[{elem.InnerHtml}]({elem.Href})"; + })); + } + + var info = document.QuerySelectorAll("ul.user-status:nth-child(3) > li.clearfix") + .Select(x => Tuple.Create(x.Children[0].InnerHtml, x.Children[1].InnerHtml)) + .ToList(); + + var daysAndMean = document.QuerySelectorAll("div.anime:nth-child(1) > div:nth-child(2) > div") + .Select(x => x.TextContent.Split(':').Select(y => y.Trim()).ToArray()) + .ToArray(); + + var embed = _sender.CreateEmbed() + .WithOkColor() + .WithTitle(GetText(strs.mal_profile(name))) + .AddField("💚 " + GetText(strs.watching), stats[0], true) + .AddField("💙 " + GetText(strs.completed), stats[1], true); + if (info.Count < 3) + embed.AddField("💛 " + GetText(strs.on_hold), stats[2], true); + embed.AddField("💔 " + GetText(strs.dropped), stats[3], true) + .AddField("⚪ " + GetText(strs.plan_to_watch), stats[4], true) + .AddField("🕐 " + daysAndMean[0][0], daysAndMean[0][1], true) + .AddField("📊 " + daysAndMean[1][0], daysAndMean[1][1], true) + .AddField(MalInfoToEmoji(info[0].Item1) + " " + info[0].Item1, info[0].Item2.TrimTo(20), true) + .AddField(MalInfoToEmoji(info[1].Item1) + " " + info[1].Item1, info[1].Item2.TrimTo(20), true); + if (info.Count > 2) + embed.AddField(MalInfoToEmoji(info[2].Item1) + " " + info[2].Item1, info[2].Item2.TrimTo(20), true); + + embed.WithDescription($@" +** https://myanimelist.net/animelist/{name} ** + +**{GetText(strs.top_3_fav_anime)}** +{favAnime}") + .WithUrl(fullQueryLink) + .WithImageUrl(imageUrl); + + await Response().Embed(embed).SendAsync(); + } + + private static string MalInfoToEmoji(string info) + { + info = info.Trim().ToLowerInvariant(); + switch (info) + { + case "gender": + return "🚁"; + case "location": + return "🗺"; + case "last online": + return "👥"; + case "birthday": + return "📆"; + default: + return "❔"; + } + } + + [Cmd] + [RequireContext(ContextType.Guild)] + [Priority(1)] + public Task Mal(IGuildUser usr) + => Mal(usr.Username); + [Cmd] public async Task Anime([Leftover] string query) { @@ -25,19 +152,19 @@ public partial class Searches } var embed = _sender.CreateEmbed() - .WithOkColor() - .WithDescription(animeData.Synopsis.Replace("
", - Environment.NewLine, - StringComparison.InvariantCulture)) - .WithTitle(animeData.TitleEnglish) - .WithUrl(animeData.Link) - .WithImageUrl(animeData.ImageUrlLarge) - .AddField(GetText(strs.episodes), animeData.TotalEpisodes.ToString(), true) - .AddField(GetText(strs.status), animeData.AiringStatus, true) - .AddField(GetText(strs.genres), - string.Join(",\n", animeData.Genres.Any() ? animeData.Genres : ["none"]), - true) - .WithFooter($"{GetText(strs.score)} {animeData.AverageScore} / 100"); + .WithOkColor() + .WithDescription(animeData.Synopsis.Replace("
", + Environment.NewLine, + StringComparison.InvariantCulture)) + .WithTitle(animeData.TitleEnglish) + .WithUrl(animeData.Link) + .WithImageUrl(animeData.ImageUrlLarge) + .AddField(GetText(strs.episodes), animeData.TotalEpisodes.ToString(), true) + .AddField(GetText(strs.status), animeData.AiringStatus, true) + .AddField(GetText(strs.genres), + string.Join(",\n", animeData.Genres.Any() ? animeData.Genres : ["none"]), + true) + .WithFooter($"{GetText(strs.score)} {animeData.AverageScore} / 100"); await Response().Embed(embed).SendAsync(); } @@ -57,19 +184,19 @@ public partial class Searches } var embed = _sender.CreateEmbed() - .WithOkColor() - .WithDescription(mangaData.Synopsis.Replace("
", - Environment.NewLine, - StringComparison.InvariantCulture)) - .WithTitle(mangaData.TitleEnglish) - .WithUrl(mangaData.Link) - .WithImageUrl(mangaData.ImageUrlLge) - .AddField(GetText(strs.chapters), mangaData.TotalChapters.ToString(), true) - .AddField(GetText(strs.status), mangaData.PublishingStatus, true) - .AddField(GetText(strs.genres), - string.Join(",\n", mangaData.Genres.Any() ? mangaData.Genres : ["none"]), - true) - .WithFooter($"{GetText(strs.score)} {mangaData.AverageScore} / 100"); + .WithOkColor() + .WithDescription(mangaData.Synopsis.Replace("
", + Environment.NewLine, + StringComparison.InvariantCulture)) + .WithTitle(mangaData.TitleEnglish) + .WithUrl(mangaData.Link) + .WithImageUrl(mangaData.ImageUrlLge) + .AddField(GetText(strs.chapters), mangaData.TotalChapters.ToString(), true) + .AddField(GetText(strs.status), mangaData.PublishingStatus, true) + .AddField(GetText(strs.genres), + string.Join(",\n", mangaData.Genres.Any() ? mangaData.Genres : ["none"]), + true) + .WithFooter($"{GetText(strs.score)} {mangaData.AverageScore} / 100"); await Response().Embed(embed).SendAsync(); } diff --git a/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs b/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs index b5dabb3..1bb8910 100644 --- a/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs +++ b/src/EllieBot/Modules/Searches/Crypto/CryptoCommands.cs @@ -65,6 +65,18 @@ public partial class Searches var change = (stock.Price - stock.Close).ToString("N2", Culture); var changePercent = (1 - (stock.Close / stock.Price)).ToString("P1", Culture); + var sign50 = stock.Change50d >= 0 + ? "\\🔼" + : "\\🔻"; + + var change50 = (stock.Change50d).ToString("P1", Culture); + + var sign200 = stock.Change200d >= 0 + ? "\\🔼" + : "\\🔻"; + + var change200 = (stock.Change200d).ToString("P1", Culture); + var price = stock.Price.ToString("C2", localCulture); var eb = _sender.CreateEmbed() @@ -221,7 +233,7 @@ public partial class Searches .AddFooter(false) .SendAsync(); } - + private static string GetArrowEmoji(decimal value) => value > 0 ? "▲" : "▼"; diff --git a/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs b/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs index 8bfeb8d..59463fa 100644 --- a/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs +++ b/src/EllieBot/Modules/Searches/Crypto/CryptoService.cs @@ -4,11 +4,13 @@ using SixLabors.ImageSharp; using SixLabors.ImageSharp.Drawing.Processing; using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.Processing; +using System.Collections.ObjectModel; using System.Globalization; using System.Net.Http.Json; using System.Text.Json.Serialization; using System.Xml; using Color = SixLabors.ImageSharp.Color; +using StringExtensions = EllieBot.Extensions.StringExtensions; namespace EllieBot.Modules.Searches.Services; @@ -16,11 +18,11 @@ public class CryptoService : IEService { private readonly IBotCache _cache; private readonly IHttpClientFactory _httpFactory; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly SemaphoreSlim _getCryptoLock = new(1, 1); - public CryptoService(IBotCache cache, IHttpClientFactory httpFactory, IBotCreds creds) + public CryptoService(IBotCache cache, IHttpClientFactory httpFactory, IBotCredentials creds) { _cache = cache; _httpFactory = httpFactory; @@ -90,7 +92,7 @@ public class CryptoService : IEService img.Mutate(x => { - x.DrawLine(color, 2, points); + x.DrawLines(color, 2, points); }); return img; diff --git a/src/EllieBot/Modules/Searches/Crypto/DefaultStockDataService.cs b/src/EllieBot/Modules/Searches/Crypto/DefaultStockDataService.cs index 9b000bd..feb0548 100644 --- a/src/EllieBot/Modules/Searches/Crypto/DefaultStockDataService.cs +++ b/src/EllieBot/Modules/Searches/Crypto/DefaultStockDataService.cs @@ -1,6 +1,7 @@ using AngleSharp; using CsvHelper; using CsvHelper.Configuration; +using System.Diagnostics; using System.Globalization; using System.Text.Json; diff --git a/src/EllieBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs b/src/EllieBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs index 95aa51f..731fc78 100644 --- a/src/EllieBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs +++ b/src/EllieBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs @@ -94,7 +94,7 @@ public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingServi => image.Mutate(ctx => { foreach (var data in drawData) - ctx.DrawLine(data.IsGreen + ctx.DrawLines(data.IsGreen ? _greenBrush : _redBrush, 1, @@ -128,7 +128,7 @@ public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingServi { // draw guides foreach (var y in lines) - ctx.DrawLine(_lineGuideColor, 1, new PointF(0, y), new PointF(WIDTH, y)); + ctx.DrawLines(_lineGuideColor, 1, new PointF(0, y), new PointF(WIDTH, y)); // // draw min and max price on the chart // ctx.DrawText(min.ToString(CultureInfo.InvariantCulture), @@ -156,7 +156,7 @@ public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingServi image.Mutate(ctx => { - ctx.DrawLine(_sparklineColor, 2, points); + ctx.DrawLines(_sparklineColor, 2, points); }); return Task.FromResult(new("png", image.ToStream())); @@ -177,7 +177,7 @@ public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingServi var points = GetSparklinePointsInternal(series); image.Mutate(ctx => { - ctx.DrawLine(Color.ParseHex("00FFFFAA"), 1, points); + ctx.DrawLines(Color.ParseHex("00FFFFAA"), 1, points); }); return Task.FromResult(new("png", image.ToStream())); diff --git a/src/EllieBot/Modules/Searches/Feeds/FeedsService.cs b/src/EllieBot/Modules/Searches/Feeds/FeedsService.cs index d08ec0a..43ad71f 100644 --- a/src/EllieBot/Modules/Searches/Feeds/FeedsService.cs +++ b/src/EllieBot/Modules/Searches/Feeds/FeedsService.cs @@ -4,6 +4,7 @@ using CodeHollow.FeedReader.Feeds; using LinqToDB; using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; +using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Searches.Services; diff --git a/src/EllieBot/Modules/Searches/MemegenCommands.cs b/src/EllieBot/Modules/Searches/MemegenCommands.cs new file mode 100644 index 0000000..dbe2679 --- /dev/null +++ b/src/EllieBot/Modules/Searches/MemegenCommands.cs @@ -0,0 +1,99 @@ +#nullable disable +using Newtonsoft.Json; +using System.Collections.Immutable; +using System.Text; + +namespace EllieBot.Modules.Searches; + +public partial class Searches +{ + [Group] + public partial class MemegenCommands : EllieModule + { + private static readonly ImmutableDictionary _map = new Dictionary + { + { '?', "~q" }, + { '%', "~p" }, + { '#', "~h" }, + { '/', "~s" }, + { ' ', "-" }, + { '-', "--" }, + { '_', "__" }, + { '"', "''" } + }.ToImmutableDictionary(); + + private readonly IHttpClientFactory _httpFactory; + + public MemegenCommands(IHttpClientFactory factory) + => _httpFactory = factory; + + [Cmd] + public async Task Memelist(int page = 1) + { + if (--page < 0) + return; + + using var http = _httpFactory.CreateClient("memelist"); + using var res = await http.GetAsync("https://api.memegen.link/templates/"); + + var rawJson = await res.Content.ReadAsStringAsync(); + + var data = JsonConvert.DeserializeObject>(rawJson)!; + + await Response() + .Paginated() + .Items(data) + .PageSize(15) + .CurrentPage(page) + .Page((items, curPage) => + { + var templates = string.Empty; + foreach (var template in items) + templates += $"**{template.Name}:**\n key: `{template.Id}`\n"; + var embed = _sender.CreateEmbed().WithOkColor().WithDescription(templates); + + return embed; + }) + .SendAsync(); + } + + [Cmd] + public async Task Memegen(string meme, [Leftover] string memeText = null) + { + var memeUrl = $"http://api.memegen.link/{meme}"; + if (!string.IsNullOrWhiteSpace(memeText)) + { + var memeTextArray = memeText.Split(';'); + foreach (var text in memeTextArray) + { + var newText = Replace(text); + memeUrl += $"/{newText}"; + } + } + + memeUrl += ".png"; + await Response().Text(memeUrl).SendAsync(); + } + + private static string Replace(string input) + { + var sb = new StringBuilder(); + + foreach (var c in input) + { + if (_map.TryGetValue(c, out var tmp)) + sb.Append(tmp); + else + sb.Append(c); + } + + return sb.ToString(); + } + + private class MemegenTemplate + { + public string Name { get; set; } + public string Id { get; set; } + } + } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Osu/OsuCommands.cs b/src/EllieBot/Modules/Searches/Osu/OsuCommands.cs deleted file mode 100644 index 81f354a..0000000 --- a/src/EllieBot/Modules/Searches/Osu/OsuCommands.cs +++ /dev/null @@ -1,124 +0,0 @@ -#nullable disable -using EllieBot.Modules.Searches.Common; -using Newtonsoft.Json; - -namespace EllieBot.Modules.Searches; - -public partial class Searches -{ - [Group] - public partial class OsuCommands : EllieModule - { - private readonly IBotCreds _creds; - private readonly IHttpClientFactory _httpFactory; - - public OsuCommands(IBotCreds creds, IHttpClientFactory factory) - { - _creds = creds; - _httpFactory = factory; - } - - [Cmd] - public async Task Osu(string user, [Leftover] string mode = null) - { - if (string.IsNullOrWhiteSpace(user)) - return; - - try - { - if (string.IsNullOrWhiteSpace(_creds.OsuApiKey)) - { - await Response().Error(strs.osu_api_key).SendAsync(); - return; - } - - var obj = await _service.GetOsuData(user, mode); - if (obj is null) - { - await Response().Error(strs.osu_user_not_found).SendAsync(); - return; - } - - var userId = obj.UserId; - var smode = OsuService.ResolveGameMode(obj.ModeNumber); - - - await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle($"osu! {smode} profile for {user}") - .WithThumbnailUrl($"https://a.ppy.sh/{userId}") - .WithDescription($"https://osu.ppy.sh/u/{userId}") - .AddField("Official Rank", $"#{obj.PpRank}", true) - .AddField("Country Rank", - $"#{obj.PpCountryRank} :flag_{obj.Country.ToLower()}:", - true) - .AddField("Total PP", Math.Round(obj.PpRaw, 2), true) - .AddField("Accuracy", Math.Round(obj.Accuracy, 2) + "%", true) - .AddField("Playcount", obj.Playcount, true) - .AddField("Level", Math.Round(obj.Level), true)) - .SendAsync(); - } - catch (Exception ex) - { - await Response().Error(strs.osu_failed).SendAsync(); - Log.Warning(ex, "Osu command failed"); - } - } - - [Cmd] - public async Task Gatari(string user, [Leftover] string mode = null) - { - var modeNumber = OsuService.ResolveGameMode(mode); - var modeStr = OsuService.ResolveGameMode(modeNumber); - var (userData, userStats) = await _service.GetGatariDataAsync(user, mode); - if (userStats is null) - { - await Response().Error(strs.osu_user_not_found).SendAsync(); - return; - } - - var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle($"osu!Gatari {modeStr} profile for {user}") - .WithThumbnailUrl($"https://a.gatari.pw/{userStats.Id}") - .WithDescription($"https://osu.gatari.pw/u/{userStats.Id}") - .AddField("Official Rank", $"#{userStats.Rank}", true) - .AddField("Country Rank", - $"#{userStats.CountryRank} :flag_{userData.Country.ToLower()}:", - true) - .AddField("Total PP", userStats.Pp, true) - .AddField("Accuracy", $"{Math.Round(userStats.AvgAccuracy, 2)}%", true) - .AddField("Playcount", userStats.Playcount, true) - .AddField("Level", userStats.Level, true); - - await Response().Embed(embed).SendAsync(); - } - - [Cmd] - public async Task Osu5(string user, [Leftover] string mode = null) - { - if (string.IsNullOrWhiteSpace(_creds.OsuApiKey)) - { - await Response().Error("An osu! API key is required.").SendAsync(); - return; - } - - if (string.IsNullOrWhiteSpace(user)) - { - await Response().Error("Please provide a username.").SendAsync(); - return; - } - - var plays = await _service.GetOsuPlay(user, mode); - - - var eb = _sender.CreateEmbed().WithOkColor().WithTitle($"Top 5 plays for {user}"); - - foreach(var (title, desc) in plays) - eb.AddField(title, desc); - - await Response().Embed(eb).SendAsync(); - } - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Osu/OsuService.cs b/src/EllieBot/Modules/Searches/Osu/OsuService.cs deleted file mode 100644 index 9bdb319..0000000 --- a/src/EllieBot/Modules/Searches/Osu/OsuService.cs +++ /dev/null @@ -1,227 +0,0 @@ -#nullable disable -using EllieBot.Modules.Searches.Common; -using Newtonsoft.Json; - -namespace EllieBot.Modules.Searches; - -public sealed class OsuService : IEService -{ - private readonly IHttpClientFactory _httpFactory; - private readonly IBotCreds _creds; - - public OsuService(IHttpClientFactory httpFactory, IBotCreds creds) - { - _httpFactory = httpFactory; - _creds = creds; - } - - public async Task GetOsuData(string username, string mode) - { - using var http = _httpFactory.CreateClient(); - - var modeNumber = string.IsNullOrWhiteSpace(mode) ? 0 : ResolveGameMode(mode); - var userReq = $"https://osu.ppy.sh/api/get_user?k={_creds.OsuApiKey}&u={username}&m={modeNumber}"; - var userResString = await http.GetStringAsync(userReq); - - if (string.IsNullOrWhiteSpace(userResString)) - return null; - var objs = JsonConvert.DeserializeObject>(userResString); - - if (objs.Count == 0) - { - return null; - } - - var obj = objs[0]; - - obj.ModeNumber = modeNumber; - return obj; - } - - public static int ResolveGameMode(string mode) - { - switch (mode?.ToUpperInvariant()) - { - case "STD": - case "STANDARD": - return 0; - case "TAIKO": - return 1; - case "CTB": - case "CATCHTHEBEAT": - return 2; - case "MANIA": - case "OSU!MANIA": - return 3; - default: - return 0; - } - } - - public static string ResolveGameMode(int mode) - { - switch (mode) - { - case 0: - return "Standard"; - case 1: - return "Taiko"; - case 2: - return "Catch"; - case 3: - return "Mania"; - default: - return "Standard"; - } - } - - public async Task<(GatariUserData userData, GatariUserStats userStats)> GetGatariDataAsync( - string user, - string mode) - { - using var http = _httpFactory.CreateClient(); - var modeNumber = string.IsNullOrWhiteSpace(mode) ? 0 : ResolveGameMode(mode); - - var resString = await http.GetStringAsync($"https://api.gatari.pw/user/stats?u={user}&mode={modeNumber}"); - - var statsResponse = JsonConvert.DeserializeObject(resString); - if (statsResponse.Code != 200 || statsResponse.Stats.Id == 0) - { - return default; - } - - var usrResString = await http.GetStringAsync($"https://api.gatari.pw/users/get?u={user}"); - - var userData = JsonConvert.DeserializeObject(usrResString).Users[0]; - var userStats = statsResponse.Stats; - - return (userData, userStats); - } - - public async Task<(string title, string desc)[]> GetOsuPlay(string user, string mode) - { - using var http = _httpFactory.CreateClient(); - var m = 0; - if (!string.IsNullOrWhiteSpace(mode)) - m = OsuService.ResolveGameMode(mode); - - var reqString = "https://osu.ppy.sh/api/get_user_best" - + $"?k={_creds.OsuApiKey}" - + $"&u={Uri.EscapeDataString(user)}" - + "&type=string" - + "&limit=5" - + $"&m={m}"; - - var resString = await http.GetStringAsync(reqString); - var obj = JsonConvert.DeserializeObject>(resString); - - var mapTasks = obj.Select(async item => - { - var mapReqString = "https://osu.ppy.sh/api/get_beatmaps" - + $"?k={_creds.OsuApiKey}" - + $"&b={item.BeatmapId}"; - - var mapResString = await http.GetStringAsync(mapReqString); - var map = JsonConvert.DeserializeObject>(mapResString).FirstOrDefault(); - if (map is null) - return default; - var pp = Math.Round(item.Pp, 2); - var acc = CalculateAcc(item, m); - var mods = ResolveMods(item.EnabledMods); - - var title = $"{map.Artist}-{map.Title} ({map.Version})"; - var desc = $@"[/b/{item.BeatmapId}](https://osu.ppy.sh/b/{item.BeatmapId}) - {pp + "pp",-7} | {acc + "%",-7} - "; - if (mods != "+") - desc += Format.Bold(mods); - - return (title, desc); - }); - - return await Task.WhenAll(mapTasks); - } - - //https://osu.ppy.sh/wiki/Accuracy - private static double CalculateAcc(OsuUserBests play, int mode) - { - double hitPoints; - double totalHits; - if (mode == 0) - { - hitPoints = (play.Count50 * 50) + (play.Count100 * 100) + (play.Count300 * 300); - totalHits = play.Count50 + play.Count100 + play.Count300 + play.Countmiss; - totalHits *= 300; - } - else if (mode == 1) - { - hitPoints = (play.Countmiss * 0) + (play.Count100 * 0.5) + play.Count300; - totalHits = (play.Countmiss + play.Count100 + play.Count300) * 300; - hitPoints *= 300; - } - else if (mode == 2) - { - hitPoints = play.Count50 + play.Count100 + play.Count300; - totalHits = play.Countmiss + play.Count50 + play.Count100 + play.Count300 + play.Countkatu; - } - else - { - hitPoints = (play.Count50 * 50) - + (play.Count100 * 100) - + (play.Countkatu * 200) - + ((play.Count300 + play.Countgeki) * 300); - - totalHits = (play.Countmiss - + play.Count50 - + play.Count100 - + play.Countkatu - + play.Count300 - + play.Countgeki) - * 300; - } - - - return Math.Round(hitPoints / totalHits * 100, 2); - } - - - //https://github.com/ppy/osu-api/wiki#mods - private static string ResolveMods(int mods) - { - var modString = "+"; - - if (IsBitSet(mods, 0)) - modString += "NF"; - if (IsBitSet(mods, 1)) - modString += "EZ"; - if (IsBitSet(mods, 8)) - modString += "HT"; - - if (IsBitSet(mods, 3)) - modString += "HD"; - if (IsBitSet(mods, 4)) - modString += "HR"; - if (IsBitSet(mods, 6) && !IsBitSet(mods, 9)) - modString += "DT"; - if (IsBitSet(mods, 9)) - modString += "NC"; - if (IsBitSet(mods, 10)) - modString += "FL"; - - if (IsBitSet(mods, 5)) - modString += "SD"; - if (IsBitSet(mods, 14)) - modString += "PF"; - - if (IsBitSet(mods, 7)) - modString += "RX"; - if (IsBitSet(mods, 11)) - modString += "AT"; - if (IsBitSet(mods, 12)) - modString += "SO"; - return modString; - } - - private static bool IsBitSet(int mods, int pos) - => (mods & (1 << pos)) != 0; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/OsuCommands.cs b/src/EllieBot/Modules/Searches/OsuCommands.cs new file mode 100644 index 0000000..599df2d --- /dev/null +++ b/src/EllieBot/Modules/Searches/OsuCommands.cs @@ -0,0 +1,297 @@ +#nullable disable +using EllieBot.Modules.Searches.Common; +using Newtonsoft.Json; + +namespace EllieBot.Modules.Searches; + +public partial class Searches +{ + [Group] + public partial class OsuCommands : EllieModule + { + private readonly IBotCredentials _creds; + private readonly IHttpClientFactory _httpFactory; + + public OsuCommands(IBotCredentials creds, IHttpClientFactory factory) + { + _creds = creds; + _httpFactory = factory; + } + + [Cmd] + public async Task Osu(string user, [Leftover] string mode = null) + { + if (string.IsNullOrWhiteSpace(user)) + return; + + using var http = _httpFactory.CreateClient(); + var modeNumber = string.IsNullOrWhiteSpace(mode) ? 0 : ResolveGameMode(mode); + + try + { + if (string.IsNullOrWhiteSpace(_creds.OsuApiKey)) + { + await Response().Error(strs.osu_api_key).SendAsync(); + return; + } + + var smode = ResolveGameMode(modeNumber); + var userReq = $"https://osu.ppy.sh/api/get_user?k={_creds.OsuApiKey}&u={user}&m={modeNumber}"; + var userResString = await http.GetStringAsync(userReq); + var objs = JsonConvert.DeserializeObject>(userResString); + + if (objs.Count == 0) + { + await Response().Error(strs.osu_user_not_found).SendAsync(); + return; + } + + var obj = objs[0]; + var userId = obj.UserId; + + await Response().Embed(_sender.CreateEmbed() + .WithOkColor() + .WithTitle($"osu! {smode} profile for {user}") + .WithThumbnailUrl($"https://a.ppy.sh/{userId}") + .WithDescription($"https://osu.ppy.sh/u/{userId}") + .AddField("Official Rank", $"#{obj.PpRank}", true) + .AddField("Country Rank", + $"#{obj.PpCountryRank} :flag_{obj.Country.ToLower()}:", + true) + .AddField("Total PP", Math.Round(obj.PpRaw, 2), true) + .AddField("Accuracy", Math.Round(obj.Accuracy, 2) + "%", true) + .AddField("Playcount", obj.Playcount, true) + .AddField("Level", Math.Round(obj.Level), true)).SendAsync(); + } + catch (ArgumentOutOfRangeException) + { + await Response().Error(strs.osu_user_not_found).SendAsync(); + } + catch (Exception ex) + { + await Response().Error(strs.osu_failed).SendAsync(); + Log.Warning(ex, "Osu command failed"); + } + } + + [Cmd] + public async Task Gatari(string user, [Leftover] string mode = null) + { + using var http = _httpFactory.CreateClient(); + var modeNumber = string.IsNullOrWhiteSpace(mode) ? 0 : ResolveGameMode(mode); + + var modeStr = ResolveGameMode(modeNumber); + var resString = await http.GetStringAsync($"https://api.gatari.pw/user/stats?u={user}&mode={modeNumber}"); + + var statsResponse = JsonConvert.DeserializeObject(resString); + if (statsResponse.Code != 200 || statsResponse.Stats.Id == 0) + { + await Response().Error(strs.osu_user_not_found).SendAsync(); + return; + } + + var usrResString = await http.GetStringAsync($"https://api.gatari.pw/users/get?u={user}"); + + var userData = JsonConvert.DeserializeObject(usrResString).Users[0]; + var userStats = statsResponse.Stats; + + var embed = _sender.CreateEmbed() + .WithOkColor() + .WithTitle($"osu!Gatari {modeStr} profile for {user}") + .WithThumbnailUrl($"https://a.gatari.pw/{userStats.Id}") + .WithDescription($"https://osu.gatari.pw/u/{userStats.Id}") + .AddField("Official Rank", $"#{userStats.Rank}", true) + .AddField("Country Rank", + $"#{userStats.CountryRank} :flag_{userData.Country.ToLower()}:", + true) + .AddField("Total PP", userStats.Pp, true) + .AddField("Accuracy", $"{Math.Round(userStats.AvgAccuracy, 2)}%", true) + .AddField("Playcount", userStats.Playcount, true) + .AddField("Level", userStats.Level, true); + + await Response().Embed(embed).SendAsync(); + } + + [Cmd] + public async Task Osu5(string user, [Leftover] string mode = null) + { + if (string.IsNullOrWhiteSpace(_creds.OsuApiKey)) + { + await Response().Error("An osu! API key is required.").SendAsync(); + return; + } + + if (string.IsNullOrWhiteSpace(user)) + { + await Response().Error("Please provide a username.").SendAsync(); + return; + } + + using var http = _httpFactory.CreateClient(); + var m = 0; + if (!string.IsNullOrWhiteSpace(mode)) + m = ResolveGameMode(mode); + + var reqString = "https://osu.ppy.sh/api/get_user_best" + + $"?k={_creds.OsuApiKey}" + + $"&u={Uri.EscapeDataString(user)}" + + "&type=string" + + "&limit=5" + + $"&m={m}"; + + var resString = await http.GetStringAsync(reqString); + var obj = JsonConvert.DeserializeObject>(resString); + + var mapTasks = obj.Select(async item => + { + var mapReqString = "https://osu.ppy.sh/api/get_beatmaps" + + $"?k={_creds.OsuApiKey}" + + $"&b={item.BeatmapId}"; + + var mapResString = await http.GetStringAsync(mapReqString); + var map = JsonConvert.DeserializeObject>(mapResString).FirstOrDefault(); + if (map is null) + return default; + var pp = Math.Round(item.Pp, 2); + var acc = CalculateAcc(item, m); + var mods = ResolveMods(item.EnabledMods); + + var title = $"{map.Artist}-{map.Title} ({map.Version})"; + var desc = $@"[/b/{item.BeatmapId}](https://osu.ppy.sh/b/{item.BeatmapId}) +{pp + "pp",-7} | {acc + "%",-7} +"; + if (mods != "+") + desc += Format.Bold(mods); + + return (title, desc); + }); + + var eb = _sender.CreateEmbed().WithOkColor().WithTitle($"Top 5 plays for {user}"); + + var mapData = await mapTasks.WhenAll(); + foreach (var (title, desc) in mapData.Where(x => x != default)) + eb.AddField(title, desc); + + await Response().Embed(eb).SendAsync(); + } + + //https://osu.ppy.sh/wiki/Accuracy + private static double CalculateAcc(OsuUserBests play, int mode) + { + double hitPoints; + double totalHits; + if (mode == 0) + { + hitPoints = (play.Count50 * 50) + (play.Count100 * 100) + (play.Count300 * 300); + totalHits = play.Count50 + play.Count100 + play.Count300 + play.Countmiss; + totalHits *= 300; + } + else if (mode == 1) + { + hitPoints = (play.Countmiss * 0) + (play.Count100 * 0.5) + play.Count300; + totalHits = (play.Countmiss + play.Count100 + play.Count300) * 300; + hitPoints *= 300; + } + else if (mode == 2) + { + hitPoints = play.Count50 + play.Count100 + play.Count300; + totalHits = play.Countmiss + play.Count50 + play.Count100 + play.Count300 + play.Countkatu; + } + else + { + hitPoints = (play.Count50 * 50) + + (play.Count100 * 100) + + (play.Countkatu * 200) + + ((play.Count300 + play.Countgeki) * 300); + + totalHits = (play.Countmiss + + play.Count50 + + play.Count100 + + play.Countkatu + + play.Count300 + + play.Countgeki) + * 300; + } + + + return Math.Round(hitPoints / totalHits * 100, 2); + } + + private static int ResolveGameMode(string mode) + { + switch (mode.ToUpperInvariant()) + { + case "STD": + case "STANDARD": + return 0; + case "TAIKO": + return 1; + case "CTB": + case "CATCHTHEBEAT": + return 2; + case "MANIA": + case "OSU!MANIA": + return 3; + default: + return 0; + } + } + + private static string ResolveGameMode(int mode) + { + switch (mode) + { + case 0: + return "Standard"; + case 1: + return "Taiko"; + case 2: + return "Catch"; + case 3: + return "Mania"; + default: + return "Standard"; + } + } + + //https://github.com/ppy/osu-api/wiki#mods + private static string ResolveMods(int mods) + { + var modString = "+"; + + if (IsBitSet(mods, 0)) + modString += "NF"; + if (IsBitSet(mods, 1)) + modString += "EZ"; + if (IsBitSet(mods, 8)) + modString += "HT"; + + if (IsBitSet(mods, 3)) + modString += "HD"; + if (IsBitSet(mods, 4)) + modString += "HR"; + if (IsBitSet(mods, 6) && !IsBitSet(mods, 9)) + modString += "DT"; + if (IsBitSet(mods, 9)) + modString += "NC"; + if (IsBitSet(mods, 10)) + modString += "FL"; + + if (IsBitSet(mods, 5)) + modString += "SD"; + if (IsBitSet(mods, 14)) + modString += "PF"; + + if (IsBitSet(mods, 7)) + modString += "RX"; + if (IsBitSet(mods, 11)) + modString += "AT"; + if (IsBitSet(mods, 12)) + modString += "SO"; + return modString; + } + + private static bool IsBitSet(int mods, int pos) + => (mods & (1 << pos)) != 0; + } +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Religious/Common/BibleVerse.cs b/src/EllieBot/Modules/Searches/Religious/Common/BibleVerse.cs index 77b74f5..8edcd1d 100644 --- a/src/EllieBot/Modules/Searches/Religious/Common/BibleVerse.cs +++ b/src/EllieBot/Modules/Searches/Religious/Common/BibleVerse.cs @@ -1,4 +1,4 @@ -using System.Text.Json.Serialization; +using System.Text.Json.Serialization; namespace EllieBot.Modules.Searches; diff --git a/src/EllieBot/Modules/Searches/Religious/Common/BibleVerses.cs b/src/EllieBot/Modules/Searches/Religious/Common/BibleVerses.cs index 4e7b66d..e31ee04 100644 --- a/src/EllieBot/Modules/Searches/Religious/Common/BibleVerses.cs +++ b/src/EllieBot/Modules/Searches/Religious/Common/BibleVerses.cs @@ -1,4 +1,4 @@ -namespace EllieBot.Modules.Searches; +namespace EllieBot.Modules.Searches; public class BibleVerses { diff --git a/src/EllieBot/Modules/Searches/Religious/Common/QuranAyah.cs b/src/EllieBot/Modules/Searches/Religious/Common/QuranAyah.cs index 6880737..b299242 100644 --- a/src/EllieBot/Modules/Searches/Religious/Common/QuranAyah.cs +++ b/src/EllieBot/Modules/Searches/Religious/Common/QuranAyah.cs @@ -16,4 +16,5 @@ public sealed class QuranAyah [JsonPropertyName("text")] public string Text { get; set; } + } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs b/src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs index ccef2b8..07fbfa3 100644 --- a/src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs +++ b/src/EllieBot/Modules/Searches/Religious/ReligiousApiService.cs @@ -1,4 +1,5 @@ -using OneOf; +using EllieBot.Modules.Searches.Common; +using OneOf; using OneOf.Types; using System.Net; using System.Net.Http.Json; diff --git a/src/EllieBot/Modules/Searches/Religious/ReligiousCommands.cs b/src/EllieBot/Modules/Searches/Religious/ReligiousCommands.cs index 074cff5..3bb7899 100644 --- a/src/EllieBot/Modules/Searches/Religious/ReligiousCommands.cs +++ b/src/EllieBot/Modules/Searches/Religious/ReligiousCommands.cs @@ -22,11 +22,11 @@ public partial class Searches } await Response() - .Embed(_sender.CreateEmbed() - .WithOkColor() - .WithTitle($"{verse.BookName} {verse.Chapter}:{verse.Verse}") - .WithDescription(verse.Text)) - .SendAsync(); + .Embed(_sender.CreateEmbed() + .WithOkColor() + .WithTitle($"{verse.BookName} {verse.Chapter}:{verse.Verse}") + .WithDescription(verse.Text)) + .SendAsync(); } [Cmd] diff --git a/src/EllieBot/Modules/Searches/Search/DefaultSearchServiceFactory.cs b/src/EllieBot/Modules/Searches/Search/DefaultSearchServiceFactory.cs index 40f802a..fa3c634 100644 --- a/src/EllieBot/Modules/Searches/Search/DefaultSearchServiceFactory.cs +++ b/src/EllieBot/Modules/Searches/Search/DefaultSearchServiceFactory.cs @@ -7,9 +7,10 @@ public sealed class DefaultSearchServiceFactory : ISearchServiceFactory, IEServi { private readonly SearchesConfigService _scs; private readonly SearxSearchService _sss; - private readonly YtDlpSearchService _ytdlp; private readonly GoogleSearchService _gss; + private readonly YtdlpYoutubeSearchService _ytdlp; + private readonly YtdlYoutubeSearchService _ytdl; private readonly YoutubeDataApiSearchService _ytdata; private readonly InvidiousYtSearchService _iYtSs; private readonly GoogleScrapeService _gscs; @@ -19,17 +20,19 @@ public sealed class DefaultSearchServiceFactory : ISearchServiceFactory, IEServi GoogleSearchService gss, GoogleScrapeService gscs, SearxSearchService sss, - YtDlpSearchService ytdlp, + YtdlpYoutubeSearchService ytdlp, + YtdlYoutubeSearchService ytdl, YoutubeDataApiSearchService ytdata, InvidiousYtSearchService iYtSs) { _scs = scs; _sss = sss; - _ytdlp = ytdlp; _gss = gss; _gscs = gscs; _iYtSs = iYtSs; + _ytdlp = ytdlp; + _ytdl = ytdl; _ytdata = ytdata; } @@ -54,8 +57,9 @@ public sealed class DefaultSearchServiceFactory : ISearchServiceFactory, IEServi => _scs.Data.YtProvider switch { YoutubeSearcher.YtDataApiv3 => _ytdata, - YoutubeSearcher.Invidious => _iYtSs, YoutubeSearcher.Ytdlp => _ytdlp, - _ => throw new ArgumentOutOfRangeException() + YoutubeSearcher.Ytdl => _ytdl, + YoutubeSearcher.Invidious => _iYtSs, + _ => _ytdl }; } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/SearchCommands.cs b/src/EllieBot/Modules/Searches/Search/SearchCommands.cs index 4bd4d2c..6a98eac 100644 --- a/src/EllieBot/Modules/Searches/Search/SearchCommands.cs +++ b/src/EllieBot/Modules/Searches/Search/SearchCommands.cs @@ -60,21 +60,21 @@ public partial class Searches descStr = descStr.TrimTo(4096); var embed = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(ctx.User) - .WithTitle(query.TrimTo(64)!) - .WithDescription(descStr) - .WithFooter( - GetText(strs.results_in(data.Info.TotalResults, data.Info.SearchTime)), - "https://i.imgur.com/G46fm8J.png"); + .WithOkColor() + .WithAuthor(ctx.User) + .WithTitle(query.TrimTo(64)!) + .WithDescription(descStr) + .WithFooter( + GetText(strs.results_in(data.Info.TotalResults, data.Info.SearchTime)), + "https://i.imgur.com/G46fm8J.png"); await Response().Embed(embed).SendAsync(); } [Cmd] - public async Task Image([Leftover] string query) + public async Task Image([Leftover] string? query = null) { - query = query.Trim(); + query = query?.Trim(); if (string.IsNullOrWhiteSpace(query)) { @@ -93,104 +93,110 @@ public partial class Searches return; } + var embeds = new List(4); + + EmbedBuilder CreateEmbed(IImageSearchResultEntry entry) { return _sender.CreateEmbed() - .WithOkColor() - .WithAuthor(ctx.User) - .WithTitle(query) - .WithImageUrl(entry.Link); + .WithOkColor() + .WithAuthor(ctx.User) + .WithTitle(query) + .WithUrl("https://google.com") + .WithImageUrl(entry.Link); } - await Response() - .Paginated() - .Items(data.Entries) - .PageSize(1) - .AddFooter(false) - .Page((items, _) => - { - var item = items.FirstOrDefault(); + embeds.Add(CreateEmbed(data.Entries.First()) + .WithFooter( + GetText(strs.results_in(data.Info.TotalResults, data.Info.SearchTime)), + "https://i.imgur.com/G46fm8J.png")); - if (item is null) - return _sender.CreateEmbed() - .WithDescription(GetText(strs.no_search_results)); + var random = data.Entries.Skip(1) + .Shuffle() + .Take(3) + .ToArray(); - var embed = CreateEmbed(item); + foreach (var entry in random) + { + embeds.Add(CreateEmbed(entry)); + } - return embed; - }) - .SendAsync(); + await Response().Embeds(embeds).SendAsync(); } - private TypedKey GetYtCacheKey(string query) - => new($"search:yt:{query}"); - - private async Task AddYoutubeUrlToCacheAsync(string query, string[] url) + private TypedKey GetYtCacheKey(string query) + => new($"search:youtube:{query}"); + + private async Task AddYoutubeUrlToCacheAsync(string query, string url) => await _cache.AddAsync(GetYtCacheKey(query), url, expiry: 1.Hours()); - private async Task GetYoutubeUrlFromCacheAsync(string query) + private async Task GetYoutubeUrlFromCacheAsync(string query) { var result = await _cache.GetAsync(GetYtCacheKey(query)); - if (!result.TryGetValue(out var urls) || urls.Length == 0) + if (!result.TryGetValue(out var url) || string.IsNullOrWhiteSpace(url)) return null; - return urls.Map(url => new VideoInfo() + return new VideoInfo() { Url = url - }); + }; } [Cmd] - public async Task Youtube([Leftover] string query) + public async Task Youtube([Leftover] string? query = null) { - query = query.Trim(); + query = query?.Trim(); + + if (string.IsNullOrWhiteSpace(query)) + { + await Response().Error(strs.specify_search_params).SendAsync(); + return; + } _ = ctx.Channel.TriggerTypingAsync(); - var maybeResults = await GetYoutubeUrlFromCacheAsync(query) - ?? await _searchFactory.GetYoutubeSearchService().SearchAsync(query); - - if (maybeResults is not { } result || result.Length == 0) + var maybeResult = await GetYoutubeUrlFromCacheAsync(query) + ?? await _searchFactory.GetYoutubeSearchService().SearchAsync(query); + if (maybeResult is not {} result || result is {Url: null}) { await Response().Error(strs.no_results).SendAsync(); return; } - await AddYoutubeUrlToCacheAsync(query, result.Map(x => x.Url)); - - await Response().Text(result[0].Url).SendAsync(); + await AddYoutubeUrlToCacheAsync(query, result.Url); + await Response().Text(result.Url).SendAsync(); } - // [Cmd] - // public async Task DuckDuckGo([Leftover] string query = null) - // { - // query = query?.Trim(); - // if (!await ValidateQuery(query)) - // return; - // - // _ = ctx.Channel.TriggerTypingAsync(); - // - // var data = await _service.DuckDuckGoSearchAsync(query); - // if (data is null) - // { - // await Response().Error(strs.no_results).SendAsync(); - // return; - // } - // - // var desc = data.Results.Take(5) - // .Select(res => $@"[**{res.Title}**]({res.Link}) - // {res.Text.TrimTo(380 - res.Title.Length - res.Link.Length)}"); - // - // var descStr = string.Join("\n\n", desc); - // - // var embed = _sender.CreateEmbed() - // .WithAuthor(ctx.User.ToString(), - // "https://upload.wikimedia.org/wikipedia/en/9/90/The_DuckDuckGo_Duck.png") - // .WithDescription($"{GetText(strs.search_for)} **{query}**\n\n" + descStr) - // .WithOkColor(); - // - // await Response().Embed(embed).SendAsync(); - // } +// [Cmd] +// public async Task DuckDuckGo([Leftover] string query = null) +// { +// query = query?.Trim(); +// if (!await ValidateQuery(query)) +// return; +// +// _ = ctx.Channel.TriggerTypingAsync(); +// +// var data = await _service.DuckDuckGoSearchAsync(query); +// if (data is null) +// { +// await Response().Error(strs.no_results).SendAsync(); +// return; +// } +// +// var desc = data.Results.Take(5) +// .Select(res => $@"[**{res.Title}**]({res.Link}) +// {res.Text.TrimTo(380 - res.Title.Length - res.Link.Length)}"); +// +// var descStr = string.Join("\n\n", desc); +// +// var embed = _sender.CreateEmbed() +// .WithAuthor(ctx.User.ToString(), +// "https://upload.wikimedia.org/wikipedia/en/9/90/The_DuckDuckGo_Duck.png") +// .WithDescription($"{GetText(strs.search_for)} **{query}**\n\n" + descStr) +// .WithOkColor(); +// +// await Response().Embed(embed).SendAsync(); +// } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/IYoutubeSearchService.cs b/src/EllieBot/Modules/Searches/Search/Youtube/IYoutubeSearchService.cs index bbfca62..5b9bfab 100644 --- a/src/EllieBot/Modules/Searches/Search/Youtube/IYoutubeSearchService.cs +++ b/src/EllieBot/Modules/Searches/Search/Youtube/IYoutubeSearchService.cs @@ -2,5 +2,5 @@ public interface IYoutubeSearchService { - Task SearchAsync(string query); + Task SearchAsync(string query); } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousSearchResponse.cs b/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousSearchResponse.cs index d9a3f89..9951db8 100644 --- a/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousSearchResponse.cs +++ b/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousSearchResponse.cs @@ -5,59 +5,5 @@ namespace EllieBot.Modules.Searches; public sealed class InvidiousSearchResponse { [JsonPropertyName("videoId")] - public required string VideoId { get; init; } - - [JsonPropertyName("title")] - public required string Title { get; init; } - - [JsonPropertyName("videoThumbnails")] - public required List Thumbnails { get; init; } - - [JsonPropertyName("lengthSeconds")] - public required int LengthSeconds { get; init; } - - [JsonPropertyName("description")] - public required string Description { get; init; } -} - -public sealed class InvidiousVideoResponse -{ - [JsonPropertyName("title")] - public required string Title { get; init; } - - [JsonPropertyName("videoId")] - public required string VideoId { get; init; } - - [JsonPropertyName("lengthSeconds")] - public required int LengthSeconds { get; init; } - - [JsonPropertyName("videoThumbnails")] - public required List Thumbnails { get; init; } - - [JsonPropertyName("adaptiveFormats")] - public required List AdaptiveFormats { get; init; } -} - -public sealed class InvidiousAdaptiveFormat -{ - [JsonPropertyName("url")] - public required string Url { get; init; } - - [JsonPropertyName("audioQuality")] - public string? AudioQuality { get; init; } -} - -public sealed class InvidiousPlaylistResponse -{ - [JsonPropertyName("title")] - public required string Title { get; init; } - - [JsonPropertyName("videos")] - public required List Videos { get; init; } -} - -public sealed class InvidiousThumbnail -{ - [JsonPropertyName("url")] - public required string Url { get; init; } + public string VideoId { get; set; } = null!; } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousYtSearchService.cs b/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousYtSearchService.cs index 99ae4c2..6fc8bac 100644 --- a/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousYtSearchService.cs +++ b/src/EllieBot/Modules/Searches/Search/Youtube/InvidiousYtSearchService.cs @@ -18,7 +18,7 @@ public sealed class InvidiousYtSearchService : IYoutubeSearchService, IEService _rng = new(); } - public async Task SearchAsync(string query) + public async Task SearchAsync(string query) { ArgumentNullException.ThrowIfNull(query); @@ -32,17 +32,15 @@ public sealed class InvidiousYtSearchService : IYoutubeSearchService, IEService var instance = instances[_rng.Next(0, instances.Count)]; - var url = $"{instance}/api/v1/search" - + $"?q={query}" - + $"&type=video"; - using var http = _http.CreateClient(); var res = await http.GetFromJsonAsync>( - url); + $"{instance}/api/v1/search" + + $"?q={query}" + + $"&type=video"); - if (res is null or { Count: 0 }) + if (res is null or {Count: 0}) return null; - return res.Map(r => new VideoInfo(r.VideoId)); + return new VideoInfo(res[0].VideoId); } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/YoutubeDataApiSearchService.cs b/src/EllieBot/Modules/Searches/Search/Youtube/YoutubeDataApiSearchService.cs index b39d035..e8bfcd2 100644 --- a/src/EllieBot/Modules/Searches/Search/Youtube/YoutubeDataApiSearchService.cs +++ b/src/EllieBot/Modules/Searches/Search/Youtube/YoutubeDataApiSearchService.cs @@ -9,18 +9,18 @@ public sealed class YoutubeDataApiSearchService : IYoutubeSearchService, IEServi _gapi = gapi; } - public async Task SearchAsync(string query) + public async Task SearchAsync(string query) { ArgumentNullException.ThrowIfNull(query); var results = await _gapi.GetVideoLinksByKeywordAsync(query); - - if (results.Count == 0) + var first = results.FirstOrDefault(); + if (first is null) return null; - return results.Map(r => new VideoInfo() + return new() { - Url = r - }); + Url = first + }; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/YtDlpSearchService.cs b/src/EllieBot/Modules/Searches/Search/Youtube/YtDlpSearchService.cs deleted file mode 100644 index b36a726..0000000 --- a/src/EllieBot/Modules/Searches/Search/Youtube/YtDlpSearchService.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace EllieBot.Modules.Searches.Youtube; - -public class YtDlpSearchService : IYoutubeSearchService, IEService -{ - private YtdlOperation CreateYtdlOp(int count) - => new YtdlOperation("-4 " - + "--ignore-errors --flat-playlist --skip-download --quiet " - + "--geo-bypass " - + "--encoding UTF8 " - + "--get-id " - + "--no-check-certificate " - + "--default-search " - + $"\"ytsearch{count}:\" -- \"{{0}}\""); - - public async Task SearchAsync(string query) - { - var op = CreateYtdlOp(5); - var data = await op.GetDataAsync(query); - var items = data?.Split('\n'); - if (items is null or { Length: 0 }) - return null; - - return items - .Map(x => new VideoInfo(x)); - } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/YtdlYoutubeSearchService.cs b/src/EllieBot/Modules/Searches/Search/Youtube/YtdlYoutubeSearchService.cs new file mode 100644 index 0000000..3ac59f8 --- /dev/null +++ b/src/EllieBot/Modules/Searches/Search/Youtube/YtdlYoutubeSearchService.cs @@ -0,0 +1,7 @@ +namespace EllieBot.Modules.Searches.Youtube; + +public sealed class YtdlYoutubeSearchService : YoutubedlxServiceBase, IEService +{ + public override async Task SearchAsync(string query) + => await InternalGetInfoAsync(query, false); +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/YtdlpYoutubeSearchService.cs b/src/EllieBot/Modules/Searches/Search/Youtube/YtdlpYoutubeSearchService.cs new file mode 100644 index 0000000..d7e66fa --- /dev/null +++ b/src/EllieBot/Modules/Searches/Search/Youtube/YtdlpYoutubeSearchService.cs @@ -0,0 +1,7 @@ +namespace EllieBot.Modules.Searches.Youtube; + +public sealed class YtdlpYoutubeSearchService : YoutubedlxServiceBase, IEService +{ + public override async Task SearchAsync(string query) + => await InternalGetInfoAsync(query, true); +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Search/Youtube/YtdlxServiceBase.cs b/src/EllieBot/Modules/Searches/Search/Youtube/YtdlxServiceBase.cs new file mode 100644 index 0000000..6239bdd --- /dev/null +++ b/src/EllieBot/Modules/Searches/Search/Youtube/YtdlxServiceBase.cs @@ -0,0 +1,34 @@ +namespace EllieBot.Modules.Searches.Youtube; + +public abstract class YoutubedlxServiceBase : IYoutubeSearchService +{ + private YtdlOperation CreateYtdlOp(bool isYtDlp) + => new YtdlOperation("-4 " + + "--geo-bypass " + + "--encoding UTF8 " + + "--get-id " + + "--no-check-certificate " + + "--default-search " + + "\"ytsearch:\" -- \"{0}\"", + isYtDlp: isYtDlp); + + protected async Task InternalGetInfoAsync(string query, bool isYtDlp) + { + var op = CreateYtdlOp(isYtDlp); + var data = await op.GetDataAsync(query); + var items = data?.Split('\n'); + if (items is null or { Length: 0 }) + return null; + + var id = items.FirstOrDefault(x => x.Length is > 5 and < 15); + if (id is null) + return null; + + return new VideoInfo() + { + Url = $"https://youtube.com/watch?v={id}" + }; + } + + public abstract Task SearchAsync(string query); +} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Searches.cs b/src/EllieBot/Modules/Searches/Searches.cs index ac7e60a..845e2ad 100644 --- a/src/EllieBot/Modules/Searches/Searches.cs +++ b/src/EllieBot/Modules/Searches/Searches.cs @@ -1,3 +1,4 @@ +#nullable disable using Microsoft.Extensions.Caching.Memory; using EllieBot.Modules.Searches.Common; using EllieBot.Modules.Searches.Services; @@ -13,14 +14,15 @@ namespace EllieBot.Modules.Searches; public partial class Searches : EllieModule { - private readonly IBotCreds _creds; + private static readonly ConcurrentDictionary _cachedShortenedLinks = new(); + private readonly IBotCredentials _creds; private readonly IGoogleApiService _google; private readonly IHttpClientFactory _httpFactory; private readonly IMemoryCache _cache; private readonly ITimezoneService _tzSvc; public Searches( - IBotCreds creds, + IBotCredentials creds, IGoogleApiService google, IHttpClientFactory factory, IMemoryCache cache, @@ -113,7 +115,7 @@ public partial class Searches : EllieModule } [Cmd] - public async Task Movie([Leftover] string query) + public async Task Movie([Leftover] string query = null) { if (!await ValidateQuery(query)) return; @@ -165,13 +167,12 @@ public partial class Searches : EllieModule } [Cmd] - public async Task Lmgtfy([Leftover] string smh) + public async Task Lmgtfy([Leftover] string smh = null) { if (!await ValidateQuery(smh)) return; - var link = $"https://letmegooglethat.com/?q={Uri.EscapeDataString(smh)}"; - var shortenedUrl = await _service.ShortenLink(link) ?? link; + var shortenedUrl = await _google.ShortenUrl($"https://letmegooglethat.com/?q={Uri.EscapeDataString(smh)}"); await Response().Confirm($"<{shortenedUrl}>").SendAsync(); } @@ -181,12 +182,35 @@ public partial class Searches : EllieModule if (!await ValidateQuery(query)) return; - var shortLink = await _service.ShortenLink(query); - - if (shortLink is null) + query = query.Trim(); + if (!_cachedShortenedLinks.TryGetValue(query, out var shortLink)) { - await Response().Error(strs.error_occured).SendAsync(); - return; + try + { + using var http = _httpFactory.CreateClient(); + using var req = new HttpRequestMessage(HttpMethod.Post, "https://goolnk.com/api/v1/shorten"); + var formData = new MultipartFormDataContent + { + { new StringContent(query), "url" } + }; + req.Content = formData; + + using var res = await http.SendAsync(req); + var content = await res.Content.ReadAsStringAsync(); + var data = JsonConvert.DeserializeObject(content); + + if (!string.IsNullOrWhiteSpace(data?.ResultUrl)) + _cachedShortenedLinks.TryAdd(query, data.ResultUrl); + else + return; + + shortLink = data.ResultUrl; + } + catch (Exception ex) + { + Log.Error(ex, "Error shortening a link: {Message}", ex.Message); + return; + } } await Response() @@ -197,7 +221,6 @@ public partial class Searches : EllieModule .SendAsync(); } - [Cmd] public async Task MagicTheGathering([Leftover] string search) { @@ -255,38 +278,45 @@ public partial class Searches : EllieModule } [Cmd] - public async Task UrbanDict([Leftover] string query) + public async Task UrbanDict([Leftover] string query = null) { if (!await ValidateQuery(query)) return; await ctx.Channel.TriggerTypingAsync(); - using var http = _httpFactory.CreateClient(); - var res = await http.GetStringAsync($"https://api.urbandictionary.com/v0/define?" - + $"term={Uri.EscapeDataString(query)}"); - var allItems = JsonConvert.DeserializeObject(res)?.List; - - if (allItems is null or { Length: 0 }) + using (var http = _httpFactory.CreateClient()) { - await Response().Error(strs.ud_error).SendAsync(); - return; + var res = await http.GetStringAsync( + $"https://api.urbandictionary.com/v0/define?term={Uri.EscapeDataString(query)}"); + try + { + var allItems = JsonConvert.DeserializeObject(res).List; + if (allItems.Any()) + { + await Response() + .Paginated() + .Items(allItems) + .PageSize(1) + .CurrentPage(0) + .Page((items, _) => + { + var item = items[0]; + return _sender.CreateEmbed() + .WithOkColor() + .WithUrl(item.Permalink) + .WithTitle(item.Word) + .WithDescription(item.Definition); + }) + .SendAsync(); + return; + } + } + catch + { + } } - await Response() - .Paginated() - .Items(allItems) - .PageSize(1) - .CurrentPage(0) - .Page((items, _) => - { - var item = items[0]; - return _sender.CreateEmbed() - .WithOkColor() - .WithUrl(item.Permalink) - .WithTitle(item.Word) - .WithDescription(item.Definition); - }) - .SendAsync(); + await Response().Error(strs.ud_error).SendAsync(); } [Cmd] @@ -343,7 +373,7 @@ public partial class Searches : EllieModule [Cmd] public async Task Wiki([Leftover] string query) { - query = query.Trim(); + query = query?.Trim(); if (!await ValidateQuery(query)) return; @@ -385,17 +415,16 @@ public partial class Searches : EllieModule for (var i = 0; i < colorObjects.Length; i++) { var x = i * 50; - var j = i; - img.Mutate(m => m.FillPolygon(colorObjects[j], new(x, 0), new(x + 50, 0), new(x + 50, 50), new(x, 50))); + img.Mutate(m => m.FillPolygon(colorObjects[i], new(x, 0), new(x + 50, 0), new(x + 50, 50), new(x, 50))); } - await using var ms = await img.ToStreamAsync(); + await using var ms = img.ToStream(); await ctx.Channel.SendFileAsync(ms, "colors.png"); } [Cmd] [RequireContext(ContextType.Guild)] - public async Task Avatar([Leftover] IGuildUser? usr = null) + public async Task Avatar([Leftover] IGuildUser usr = null) { usr ??= (IGuildUser)ctx.User; @@ -458,4 +487,10 @@ public partial class Searches : EllieModule await Response().Error(strs.specify_search_params).SendAsync(); return false; } + + public class ShortenData + { + [JsonProperty("result_url")] + public string ResultUrl { get; set; } + } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/SearchesService.cs b/src/EllieBot/Modules/Searches/SearchesService.cs index 039b574..3f01fc1 100644 --- a/src/EllieBot/Modules/Searches/SearchesService.cs +++ b/src/EllieBot/Modules/Searches/SearchesService.cs @@ -2,8 +2,8 @@ using EllieBot.Modules.Searches.Common; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using OneOf; using System.Text.Json; +using OneOf; namespace EllieBot.Modules.Searches.Services; @@ -21,17 +21,19 @@ public class SearchesService : IEService public List MagicItems { get; } = []; private readonly IHttpClientFactory _httpFactory; private readonly IGoogleApiService _google; + private readonly IImageCache _imgs; private readonly IBotCache _c; + private readonly FontProvider _fonts; private readonly IBotCredsProvider _creds; private readonly EllieRandom _rng; private readonly List _yomamaJokes; private readonly object _yomamaLock = new(); private int yomamaJokeIndex; - private readonly ConcurrentDictionary _cachedShortenedLinks = new(); public SearchesService( IGoogleApiService google, + IImageCache images, IBotCache c, IHttpClientFactory factory, FontProvider fonts, @@ -39,7 +41,9 @@ public class SearchesService : IEService { _httpFactory = factory; _google = google; + _imgs = images; _c = c; + _fonts = fonts; _creds = creds; _rng = new(); @@ -179,7 +183,7 @@ public class SearchesService : IEService }; - return $"https://ellie-pictures.nyc3.digitaloceanspaces.com/{subpath}/" + return $"https://nadeko-pictures.nyc3.digitaloceanspaces.com/{subpath}/" + _rng.Next(1, max).ToString("000") + ".png"; } @@ -518,7 +522,7 @@ public class SearchesService : IEService public async Task, ErrorType>> GetDefinitionsAsync(string query) { - if (string.IsNullOrWhiteSpace(query)) + if (string.IsNullOrEmpty(query)) { return ErrorType.InvalidInput; } @@ -549,7 +553,6 @@ public class SearchesService : IEService return ErrorType.NotFound; } - var items = new List(); foreach (var d in data) @@ -575,42 +578,4 @@ public class SearchesService : IEService return ErrorType.Unknown; } } - - public async Task ShortenLink(string query) - { - query = query.Trim(); - - if (_cachedShortenedLinks.TryGetValue(query, out var shortLink)) - return shortLink; - - try - { - using var http = _httpFactory.CreateClient(); - using var req = new HttpRequestMessage(HttpMethod.Post, "https://goolnk.com/api/v1/shorten"); - var formData = new MultipartFormDataContent - { - { new StringContent(query), "url" } - }; - req.Content = formData; - - using var res = await http.SendAsync(req); - var content = await res.Content.ReadAsStringAsync(); - var data = JsonConvert.DeserializeObject(content); - - if (!string.IsNullOrWhiteSpace(data?.ResultUrl)) - _cachedShortenedLinks.TryAdd(query, data.ResultUrl); - else - return query; - - shortLink = data.ResultUrl; - } - catch (Exception ex) - { - Log.Error(ex, "Error shortening a link: {Message}", ex.Message); - return null; - } - - return shortLink; - throw new NotImplementedException(); - } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs index ed260ae..46f9ed6 100644 --- a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs +++ b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationCommands.cs @@ -1,5 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; +using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Searches.Services; @@ -69,7 +70,22 @@ public partial class Searches if (page-- < 1) return; - var allStreams = await _service.GetAllStreamsAsync((SocketGuild)ctx.Guild); + var allStreams = new List(); + await using (var uow = _db.GetDbContext()) + { + var all = uow.GuildConfigsForId(ctx.Guild.Id, set => set.Include(gc => gc.FollowedStreams)) + .FollowedStreams.OrderBy(x => x.Id) + .ToList(); + + for (var index = all.Count - 1; index >= 0; index--) + { + var fs = all[index]; + if (((SocketGuild)ctx.Guild).GetTextChannel(fs.ChannelId) is null) + await _service.UnfollowStreamAsync(fs.GuildId, index); + else + allStreams.Insert(0, fs); + } + } await Response() .Paginated() diff --git a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs index 9870c13..c003366 100644 --- a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs +++ b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs @@ -1,6 +1,7 @@ #nullable disable using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Searches.Common; using EllieBot.Modules.Searches.Common.StreamNotifications; @@ -253,7 +254,7 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor { var ch = _client.GetGuild(fs.GuildId) ?.GetTextChannel(fs.ChannelId); - + if (ch is null) return Task.CompletedTask; @@ -492,10 +493,10 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor public EmbedBuilder GetEmbed(ulong guildId, StreamData status, bool showViewers = true) { var embed = _sender.CreateEmbed() - .WithTitle(status.Name) - .WithUrl(status.StreamUrl) - .WithDescription(status.StreamUrl) - .AddField(GetText(guildId, strs.status), status.IsLive ? "🟢 Online" : "🔴 Offline", true); + .WithTitle(status.Name) + .WithUrl(status.StreamUrl) + .WithDescription(status.StreamUrl) + .AddField(GetText(guildId, strs.status), status.IsLive ? "🟢 Online" : "🔴 Offline", true); if (showViewers) { @@ -625,7 +626,7 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor all.ForEach(x => x.Message = message); uow.SaveChanges(); - + lock (_shardLock) { foreach (var fs in all) @@ -647,25 +648,4 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor public StreamDataKey Key { get; init; } public ulong GuildId { get; init; } } - - public async Task> GetAllStreamsAsync(SocketGuild guild) - { - var allStreams = new List(); - await using var uow = _db.GetDbContext(); - var all = uow.GuildConfigsForId(guild.Id, set => set.Include(gc => gc.FollowedStreams)) - .FollowedStreams - .OrderBy(x => x.Id) - .ToList(); - - for (var index = all.Count - 1; index >= 0; index--) - { - var fs = all[index]; - if (guild.GetTextChannel(fs.ChannelId) is null) - await UnfollowStreamAsync(fs.GuildId, index); - else - allStreams.Insert(0, fs); - } - - return allStreams; - } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Translate/FlagTranslateService.cs b/src/EllieBot/Modules/Searches/Translate/FlagTranslateService.cs deleted file mode 100644 index 2b5baa5..0000000 --- a/src/EllieBot/Modules/Searches/Translate/FlagTranslateService.cs +++ /dev/null @@ -1,191 +0,0 @@ -#nullable disable -using LinqToDB; -using LinqToDB.EntityFrameworkCore; -using EllieBot.Common.ModuleBehaviors; -using EllieBot.Db.Models; -using System.Collections.Frozen; - -namespace EllieBot.Modules.Searches; - -public sealed partial class FlagTranslateService : IReadyExecutor, IEService -{ - private readonly IBotCreds _creds; - private readonly DiscordSocketClient _client; - private readonly TranslateService _ts; - private readonly IMessageSenderService _sender; - private IReadOnlyDictionary _supportedFlags; - private readonly DbService _db; - private ConcurrentHashSet _enabledChannels; - private readonly IBotCache _cache; - - // disallow same message being translated multiple times to the same language - private readonly ConcurrentHashSet<(ulong, string)> _msgLangs = new(); - - public FlagTranslateService( - IBotCreds creds, - DiscordSocketClient client, - TranslateService ts, - IMessageSenderService sender, - DbService db, - IBotCache cache) - { - _creds = creds; - _client = client; - _ts = ts; - _sender = sender; - _db = db; - _cache = cache; - } - - public async Task OnReadyAsync() - { - _supportedFlags = COUNTRIES - .Split('\n') - .Select(x => x.Split(' ')) - .ToDictionary(x => x[0], x => x[1].TrimEnd()) - .ToFrozenDictionary(); - - await using (var uow = _db.GetDbContext()) - { - _enabledChannels = (await uow.GetTable() - .Where(x => Linq2DbExpressions.GuildOnShard(x.GuildId, - _creds.TotalShards, - _client.ShardId)) - .Select(x => new - { - x.ChannelId, - x.GuildId - }) - .ToListAsyncLinqToDB()) - .Select(x => x.ChannelId) - .ToHashSet() - .ToConcurrentSet(); - } - - _client.ReactionAdded += OnReactionAdded; - - var periodicCleanup = new PeriodicTimer(TimeSpan.FromHours(24)); - - while (await periodicCleanup.WaitForNextTickAsync()) - { - _msgLangs.Clear(); - } - } - - private const int FLAG_START = 127462; - - private static TypedKey CdKey(ulong userId) - => new($"flagtranslate:{userId}"); - - private Task OnReactionAdded( - Cacheable arg1, - Cacheable arg2, - SocketReaction reaction) - { - if (!_enabledChannels.Contains(reaction.Channel.Id)) - return Task.CompletedTask; - - var runes = reaction.Emote.Name.EnumerateRunes(); - if (!runes.MoveNext() - || runes.Current is not { Value: >= 127462 and <= 127487 } l1 - || !runes.MoveNext() - || runes.Current is not { Value: >= 127462 and <= 127487 } l2) - { - return Task.CompletedTask; - } - - _ = Task.Run(async () => - { - if (reaction.Channel is not SocketTextChannel tc) - return; - - var user = await ((IGuild)tc.Guild).GetUserAsync(reaction.UserId); - - if (user is null) - return; - - if (!user.GetPermissions(tc).SendMessages) - return; - - if (!tc.Guild.CurrentUser.GetPermissions(tc).SendMessages - || !tc.Guild.CurrentUser.GetPermissions(tc).EmbedLinks) - { - await Disable(tc.Guild.Id, tc.Id); - return; - } - - var c1 = (char)(l1.Value - FLAG_START + 65); - var c2 = (char)(l2.Value - FLAG_START + 65); - - var code = $"{c1}{c2}".ToUpper(); - - if (!_supportedFlags.TryGetValue(code, out var lang)) - return; - - if (!_msgLangs.Add((reaction.MessageId, lang))) - return; - - var result = await _cache.GetAsync(CdKey(reaction.UserId)); - if (result.TryPickT0(out _, out _)) - return; - - await _cache.AddAsync(CdKey(reaction.UserId), true, TimeSpan.FromSeconds(5)); - - var msg = await arg1.GetOrDownloadAsync(); - - var response = await _ts.Translate("", lang, msg.Content).ConfigureAwait(false); - - await msg.ReplyAsync(embed: _sender.CreateEmbed() - .WithOkColor() - .WithFooter(user.ToString() ?? reaction.UserId.ToString(), - user.RealAvatarUrl().ToString()) - .WithDescription(response) - .WithAuthor(reaction.Emote.ToString()) - .Build(), - allowedMentions: AllowedMentions.None - ); - }); - - return Task.CompletedTask; - } - - public async Task Disable(ulong guildId, ulong tcId) - { - if (!_enabledChannels.TryRemove(tcId)) - return; - - await using var uow = _db.GetDbContext(); - await uow.GetTable() - .Where(x => x.GuildId == guildId - && x.ChannelId == tcId) - .DeleteAsync(); - } - - public async Task Toggle(ulong guildId, ulong tcId) - { - if (_enabledChannels.Contains(tcId)) - { - await Disable(guildId, tcId); - - return false; - } - - await Enable(guildId, tcId); - - return true; - } - - public async Task Enable(ulong guildId, ulong tcId) - { - if (!_enabledChannels.Add(tcId)) - return; - - await using var uow = _db.GetDbContext(); - await uow.GetTable() - .InsertAsync(() => new FlagTranslateChannel - { - GuildId = guildId, - ChannelId = tcId - }); - } -} diff --git a/src/EllieBot/Modules/Searches/Translate/FlagTranslateService_SupportedFlags.cs b/src/EllieBot/Modules/Searches/Translate/FlagTranslateService_SupportedFlags.cs deleted file mode 100644 index 3f058eb..0000000 --- a/src/EllieBot/Modules/Searches/Translate/FlagTranslateService_SupportedFlags.cs +++ /dev/null @@ -1,81 +0,0 @@ -namespace EllieBot.Modules.Searches; - -public partial class FlagTranslateService -{ - private const string COUNTRIES = """ - CN zh - IN hi - US en - ID id - PK ur - BR pt - NG ha - BD bn - RU ru - JP ja - MX es - PH tl - VN vi - EG ar - ET am - DE de - IR fa - TR tr - TH th - FR fr - CD fr - MM my - UG en - MZ pt - ZA zu - CO es - BG bg - HR hr - MY ms - NL nl - RO ro - CZ cs - GR el - SK sk - PT pt - KR ko - IT it - ES es - RS sr - TN ar - PL pl - SD ar - CM fr - SN fr - ML fr - NE ha - BI fr - AO pt - AF ps - MA ar - DZ ar - GB en - AR es - ZW ny - KE sw - GH en - SA ar - IL he - IQ ar - UA ua - LY ar - KW ar - OM ar - YE ar - AL sq - AE ar - AU en - NZ en - KZ kz - NO no - SE sv - DK da - FI fi - HU hu - """; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/Translate/TranslateService.cs b/src/EllieBot/Modules/Searches/Translate/TranslateService.cs index 22e4338..9f50615 100644 --- a/src/EllieBot/Modules/Searches/Translate/TranslateService.cs +++ b/src/EllieBot/Modules/Searches/Translate/TranslateService.cs @@ -44,10 +44,12 @@ public sealed class TranslateService : ITranslateService, IExecNoCommand, IReady foreach (var c in cs) { _atcs[c.ChannelId] = c.AutoDelete; - _users[c.ChannelId] = new(c.Users.ToDictionary(x => x.UserId, x => (x.Source.ToLower(), x.Target.ToLower()))); + _users[c.ChannelId] = + new(c.Users.ToDictionary(x => x.UserId, x => (x.Source.ToLower(), x.Target.ToLower()))); } } + public async Task ExecOnNoCommandAsync(IGuild guild, IUserMessage msg) { if (string.IsNullOrWhiteSpace(msg.Content)) @@ -93,7 +95,7 @@ public sealed class TranslateService : ITranslateService, IExecNoCommand, IReady } } - public async Task Translate(string source, string target, string text) + public async Task Translate(string source, string target, string text = null) { if (string.IsNullOrWhiteSpace(text)) throw new ArgumentException("Text is empty or null", nameof(text)); diff --git a/src/EllieBot/Modules/Searches/Translate/TranslatorCommands.cs b/src/EllieBot/Modules/Searches/Translate/TranslatorCommands.cs index b1cf524..348ca61 100644 --- a/src/EllieBot/Modules/Searches/Translate/TranslatorCommands.cs +++ b/src/EllieBot/Modules/Searches/Translate/TranslatorCommands.cs @@ -6,14 +6,6 @@ public partial class Searches [Group] public partial class TranslateCommands : EllieModule { - private readonly FlagTranslateService _flagSvc; - - public TranslateCommands(FlagTranslateService flagSvc) - { - _flagSvc = flagSvc; - } - - public enum AutoDeleteAutoTranslate { Del, @@ -99,18 +91,5 @@ public partial class Searches await Response().Embed(eb).SendAsync(); } - - [Cmd] - [RequireContext(ContextType.Guild)] - [UserPerm(ChannelPermission.ManageChannels)] - [BotPerm(ChannelPermission.SendMessages | ChannelPermission.EmbedLinks)] - public async Task TranslateFlags() - { - var enabled = await _flagSvc.Toggle(ctx.Guild.Id, ctx.Channel.Id); - if (enabled) - await Response().Confirm(strs.trfl_enabled).SendAsync(); - else - await Response().Confirm(strs.trfl_disabled).SendAsync(); - } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs b/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs index ffcedc5..fb64849 100644 --- a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs +++ b/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs @@ -7,7 +7,7 @@ namespace EllieBot.Modules.Searches; public partial class SearchesConfig : ICloneable { [Comment("DO NOT CHANGE")] - public int Version { get; set; } = 3; + public int Version { get; set; } = 0; [Comment(""" Which engine should .search command @@ -26,11 +26,13 @@ public partial class SearchesConfig : ICloneable [Comment(""" - Which search provider will be used for the `.youtube` and `.q` commands. + Which search provider will be used for the `.youtube` command. - - `ytDataApiv3` - uses google's official youtube data api. Requires `GoogleApiKey` set in creds and youtube data api enabled in developers console. `.q` is not supported for this setting. It will fallback to yt-dlp. + - `ytDataApiv3` - uses google's official youtube data api. Requires `GoogleApiKey` set in creds and youtube data api enabled in developers console - - `ytdlp` - default, recommended easy, uses `yt-dlp`. Requires `yt-dlp` to be installed and it's path added to env variables + - `ytdl` - default, uses youtube-dl. Requires `youtube-dl` to be installed and it's path added to env variables. Slow. + + - `ytdlp` - recommended easy, uses `yt-dlp`. Requires `yt-dlp` to be installed and it's path added to env variables - `invidious` - recommended advanced, uses invidious api. Requires at least one invidious instance specified in the `invidiousInstances` property """)] @@ -56,6 +58,7 @@ public partial class SearchesConfig : ICloneable [Comment(""" Set the invidious instance urls in case you want to use 'invidious' for `.youtube` search Ellie will use a random one for each request. + These instances may be used for music queue functionality in the future. Use a fully qualified url. Example: https://my-invidious-instance.mydomain.com Instances specified must have api available. @@ -75,9 +78,9 @@ public sealed class FollowedStreamConfig public enum YoutubeSearcher { - YtDataApiv3 = 0, - Ytdl = 1, - Ytdlp = 1, - Invid = 3, + YtDataApiv3, + Ytdl, + Ytdlp, + Invid, Invidious = 3 } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs b/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs index 5ad305a..f656a5b 100644 --- a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs +++ b/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs @@ -47,11 +47,11 @@ public class SearchesConfigService : ConfigServiceBase }); } - if (data.Version < 4) + if (data.Version < 2) { ModifyConfig(c => { - c.Version = 4; + c.Version = 2; }); } } diff --git a/src/EllieBot/Modules/Searches/_common/GatariUserResponse.cs b/src/EllieBot/Modules/Searches/_common/GatariUserResponse.cs index 63114ab..412522a 100644 --- a/src/EllieBot/Modules/Searches/_common/GatariUserResponse.cs +++ b/src/EllieBot/Modules/Searches/_common/GatariUserResponse.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; namespace EllieBot.Modules.Searches.Common; -public class GatariUserData +public class UserData { [JsonProperty("abbr")] public object Abbr { get; set; } @@ -48,5 +48,5 @@ public class GatariUserResponse public int Code { get; set; } [JsonProperty("users")] - public List Users { get; set; } + public List Users { get; set; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/GatariUserStatsResponse.cs b/src/EllieBot/Modules/Searches/_common/GatariUserStatsResponse.cs index a2f6f89..97fee69 100644 --- a/src/EllieBot/Modules/Searches/_common/GatariUserStatsResponse.cs +++ b/src/EllieBot/Modules/Searches/_common/GatariUserStatsResponse.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; namespace EllieBot.Modules.Searches.Common; -public class GatariUserStats +public class UserStats { [JsonProperty("a_count")] public int ACount { get; set; } @@ -39,7 +39,7 @@ public class GatariUserStats public int Pp { get; set; } [JsonProperty("rank")] - public int? Rank { get; set; } + public int Rank { get; set; } [JsonProperty("ranked_score")] public int RankedScore { get; set; } @@ -72,5 +72,5 @@ public class GatariUserStatsResponse public int Code { get; set; } [JsonProperty("stats")] - public GatariUserStats Stats { get; set; } + public UserStats Stats { get; set; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/OsuUserData.cs b/src/EllieBot/Modules/Searches/_common/OsuUserData.cs index 86f1000..a59bf30 100644 --- a/src/EllieBot/Modules/Searches/_common/OsuUserData.cs +++ b/src/EllieBot/Modules/Searches/_common/OsuUserData.cs @@ -67,7 +67,4 @@ public class OsuUserData [JsonProperty("pp_country_rank")] public string PpCountryRank { get; set; } - - [JsonIgnore] - public int ModeNumber { get; set; } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Searches/_common/ShortenData.cs b/src/EllieBot/Modules/Searches/_common/ShortenData.cs deleted file mode 100644 index 872347e..0000000 --- a/src/EllieBot/Modules/Searches/_common/ShortenData.cs +++ /dev/null @@ -1,10 +0,0 @@ -#nullable disable -using Newtonsoft.Json; - -namespace EllieBot.Modules.Searches.Services; - -public class ShortenData -{ - [JsonProperty("result_url")] - public string ResultUrl { get; set; } -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/AfkService.cs b/src/EllieBot/Modules/Utility/AfkService.cs index 7f8ede4..d41169b 100644 --- a/src/EllieBot/Modules/Utility/AfkService.cs +++ b/src/EllieBot/Modules/Utility/AfkService.cs @@ -61,7 +61,7 @@ public sealed class AfkService : IEService, IReadyExecutor await Task.Delay(_maxAfkDuration); _client.MessageReceived -= StopAfk; }); - + return added; } @@ -74,12 +74,12 @@ public sealed class AfkService : IEService, IReadyExecutor private Task TryTriggerAfkMessage(SocketMessage arg) { - if (arg.Author.IsBot || arg.Author.IsWebhook) + if (arg.Author.IsBot) return Task.CompletedTask; if (arg is not IUserMessage uMsg || uMsg.Channel is not ITextChannel tc) return Task.CompletedTask; - + if ((arg.MentionedUsers.Count is 0 or > 3) && uMsg.ReferencedMessage is null) return Task.CompletedTask; @@ -115,7 +115,7 @@ public sealed class AfkService : IEService, IReadyExecutor { return; } - + mentionedUserId = repliedUserId; } @@ -125,13 +125,13 @@ public sealed class AfkService : IEService, IReadyExecutor if (result.TryPickT0(out var msg, out _)) { var st = SmartText.CreateFrom(msg); - - st = $"The user you've pinged (<#{mentionedUserId}>) is AFK: " + st; - + + st = "The user is AFK: " + st; + var toDelete = await _mss.Response(arg.Channel) - .User(arg.Author) .Message(uMsg) .Text(st) + .Sanitize(false) .SendAsync(); toDelete.DeleteAfter(30); diff --git a/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs b/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs index 512c2db..6f6c03c 100644 --- a/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs +++ b/src/EllieBot/Modules/Utility/Ai/AiAssistantService.cs @@ -88,8 +88,8 @@ public sealed class AiAssistantService using var request = new HttpRequestMessage(); request.Method = HttpMethod.Post; - // request.RequestUri = new("https://eai.elliebot.net/get-command"); - request.RequestUri = new("https://eai.elliebot.net/get-command"); + // request.RequestUri = new("https://nai.nadeko.bot/get-command"); + request.RequestUri = new("https://nai.nadeko.bot/get-command"); request.Content = content; var creds = _credsProvider.GetCreds(); @@ -100,6 +100,10 @@ public sealed class AiAssistantService using var client = _httpFactory.CreateClient(); + // todo customize according to the bot's config + // - CurrencyName + // - + using var response = await client.SendAsync(request); if (response.StatusCode == HttpStatusCode.TooManyRequests) @@ -241,7 +245,7 @@ public sealed class AiAssistantService { if (guild is not SocketGuild sg) return false; - + var sess = _cbs.GetOrCreateSession(guild.Id); if (sess is null) return false; @@ -298,7 +302,7 @@ public sealed class AiAssistantService await _sender.Response(channel) .Error(errorMsg) .SendAsync(); - + return true; } diff --git a/src/EllieBot/Modules/Utility/Ai/UtilityCommands.cs b/src/EllieBot/Modules/Utility/Ai/UtilityCommands.cs index 1fd6cfd..52fe4d5 100644 --- a/src/EllieBot/Modules/Utility/Ai/UtilityCommands.cs +++ b/src/EllieBot/Modules/Utility/Ai/UtilityCommands.cs @@ -1,9 +1,10 @@ -namespace EllieBot.Modules.Utility; +using EllieBot.Modules.Administration; -public partial class Utility +namespace EllieBot.Modules.Utility; + +public partial class UtilityCommands { - [Group] - public partial class PromptCommands : EllieModule + public class PromptCommands : EllieModule { [Cmd] [RequireContext(ContextType.Guild)] diff --git a/src/EllieBot/Modules/Utility/Alias/AliasCommands.cs b/src/EllieBot/Modules/Utility/Alias/AliasCommands.cs index 7a4641d..8fd9563 100644 --- a/src/EllieBot/Modules/Utility/Alias/AliasCommands.cs +++ b/src/EllieBot/Modules/Utility/Alias/AliasCommands.cs @@ -1,5 +1,6 @@ #nullable disable using Microsoft.EntityFrameworkCore; +using EllieBot.Db; using EllieBot.Modules.Utility.Services; using EllieBot.Db.Models; @@ -102,7 +103,6 @@ public partial class Utility await Response().Confirm(strs.alias_added(Format.Code(trigger), Format.Code(mapping))).SendAsync(); } - [Cmd] [RequireContext(ContextType.Guild)] public async Task AliasList(int page = 1) diff --git a/src/EllieBot/Modules/Utility/Alias/AliasService.cs b/src/EllieBot/Modules/Utility/Alias/AliasService.cs index 876f155..6d47a23 100644 --- a/src/EllieBot/Modules/Utility/Alias/AliasService.cs +++ b/src/EllieBot/Modules/Utility/Alias/AliasService.cs @@ -1,6 +1,7 @@ #nullable disable using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Utility.Services; diff --git a/src/EllieBot/Modules/Utility/ConfigCommands.cs b/src/EllieBot/Modules/Utility/ConfigCommands.cs index 57b8f4c..2627d11 100644 --- a/src/EllieBot/Modules/Utility/ConfigCommands.cs +++ b/src/EllieBot/Modules/Utility/ConfigCommands.cs @@ -8,7 +8,7 @@ public partial class Utility private readonly IEnumerable _settingServices; public ConfigCommands(IEnumerable settingServices) - => _settingServices = settingServices.Where(x => x.Name != "medusa"); + => _settingServices = settingServices.Where(x => x.Name != "marmalade"); [Cmd] [OwnerOnly] diff --git a/src/EllieBot/Modules/Utility/Giveaway/GiveawayService.cs b/src/EllieBot/Modules/Utility/Giveaway/GiveawayService.cs index 0a0cf51..f43e7bb 100644 --- a/src/EllieBot/Modules/Utility/Giveaway/GiveawayService.cs +++ b/src/EllieBot/Modules/Utility/Giveaway/GiveawayService.cs @@ -11,7 +11,7 @@ public sealed class GiveawayService : IEService, IReadyExecutor public static string GiveawayEmoji = "🎉"; private readonly DbService _db; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly DiscordSocketClient _client; private readonly IMessageSenderService _sender; private readonly IBotStrings _strings; @@ -19,8 +19,9 @@ public sealed class GiveawayService : IEService, IReadyExecutor private readonly IMemoryCache _cache; private SortedSet _giveawayCache = new SortedSet(); private readonly EllieRandom _rng; + private readonly ConcurrentDictionary _rerolls = new(); - public GiveawayService(DbService db, IBotCreds creds, DiscordSocketClient client, + public GiveawayService(DbService db, IBotCredentials creds, DiscordSocketClient client, IMessageSenderService sender, IBotStrings strings, ILocalization localization, IMemoryCache cache) { _db = db; diff --git a/src/EllieBot/Modules/Utility/Info/InfoCommands.cs b/src/EllieBot/Modules/Utility/Info/InfoCommands.cs index c9ae861..e2533e0 100644 --- a/src/EllieBot/Modules/Utility/Info/InfoCommands.cs +++ b/src/EllieBot/Modules/Utility/Info/InfoCommands.cs @@ -176,5 +176,39 @@ public partial class Utility return joinedAt; } + + [Cmd] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task Activity(int page = 1) + { + const int activityPerPage = 10; + page -= 1; + + if (page < 0) + return; + + var startCount = page * activityPerPage; + + var str = new StringBuilder(); + foreach (var kvp in _cmdHandler.UserMessagesSent.OrderByDescending(kvp => kvp.Value) + .Skip(page * activityPerPage) + .Take(activityPerPage)) + { + str.AppendLine(GetText(strs.activity_line(++startCount, + Format.Bold(kvp.Key.ToString()), + kvp.Value / _stats.GetUptime().TotalSeconds, + kvp.Value))); + } + + await Response() + .Embed(_sender.CreateEmbed() + .WithTitle(GetText(strs.activity_page(page + 1))) + .WithOkColor() + .WithFooter(GetText( + strs.activity_users_total(_cmdHandler.UserMessagesSent.Count))) + .WithDescription(str.ToString())) + .SendAsync(); + } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/Quote/IQuoteService.cs b/src/EllieBot/Modules/Utility/Quote/IQuoteService.cs index 87f9675..ccf360e 100644 --- a/src/EllieBot/Modules/Utility/Quote/IQuoteService.cs +++ b/src/EllieBot/Modules/Utility/Quote/IQuoteService.cs @@ -1,53 +1,6 @@ -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Utility; +namespace EllieBot.Modules.Utility; public interface IQuoteService { - /// - /// Delete all quotes created by the author in a guild - /// - /// ID of the guild - /// ID of the user - /// Number of deleted qutoes Task DeleteAllAuthorQuotesAsync(ulong guildId, ulong userId); - - /// - /// Delete all quotes in a guild - /// - /// ID of the guild - /// Number of deleted qutoes - Task DeleteAllQuotesAsync(ulong guildId); - - Task> GetAllQuotesAsync(ulong guildId, int page, OrderType order); - Task GetQuoteByKeywordAsync(ulong guildId, string keyword); - - Task> SearchQuoteKeywordTextAsync( - ulong guildId, - string? keyword, - string text); - - Task<(IReadOnlyCollection quotes, int totalCount)> FindQuotesAsync(ulong guildId, string query, int page); - - Task> GetGuildQuotesAsync(ulong guildId); - Task RemoveAllByKeyword(ulong guildId, string keyword); - Task GetQuoteByIdAsync(ulong guildId, int quoteId); - - Task AddQuoteAsync( - ulong guildId, - ulong authorId, - string authorName, - string keyword, - string text); - - Task EditQuoteAsync(ulong authorId, int quoteId, string text); - Task EditQuoteAsync(ulong guildId, int quoteId, string keyword, string text); - - Task DeleteQuoteAsync( - ulong guildId, - ulong authorId, - bool isQuoteManager, - int quoteId); - - Task ImportQuotesAsync(ulong guildId, string input); } \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs index a50cd19..913781b 100644 --- a/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs +++ b/src/EllieBot/Modules/Utility/Quote/QuoteCommands.cs @@ -1,5 +1,8 @@ #nullable disable warnings +using LinqToDB; +using LinqToDB.EntityFrameworkCore; using EllieBot.Common.Yml; +using EllieBot.Db; using EllieBot.Db.Models; using YamlDotNet.Serialization; using YamlDotNet.Serialization.NamingConventions; @@ -46,32 +49,35 @@ public partial class Utility [Cmd] [RequireContext(ContextType.Guild)] [Priority(1)] - public Task QuoteList(OrderType order = OrderType.Keyword) - => QuoteList(1, order); + public Task ListQuotes(OrderType order = OrderType.Keyword) + => ListQuotes(1, order); [Cmd] [RequireContext(ContextType.Guild)] [Priority(0)] - public async Task QuoteList(int page = 1, OrderType order = OrderType.Keyword) + public async Task ListQuotes(int page = 1, OrderType order = OrderType.Keyword) { page -= 1; if (page < 0) return; - var quotes = await _qs.GetAllQuotesAsync(ctx.Guild.Id, page, order); - - if (quotes.Count == 0) + IEnumerable quotes; + await using (var uow = _db.GetDbContext()) { - await Response().Error(strs.quotes_page_none).SendAsync(); - return; + quotes = uow.Set().GetGroup(ctx.Guild.Id, page, order); } - var list = quotes.Select(q => $"`{new kwum(q.Id)}` {Format.Bold(q.Keyword),-20} by {q.AuthorName}") - .Join("\n"); - - await Response() - .Confirm(GetText(strs.quotes_page(page + 1)), list) - .SendAsync(); + if (quotes.Any()) + { + await Response() + .Confirm(GetText(strs.quotes_page(page + 1)), + string.Join("\n", + quotes.Select(q + => $"`{new kwum(q.Id)}` {Format.Bold(q.Keyword.SanitizeAllMentions()),-20} by {q.AuthorName.SanitizeAllMentions()}"))) + .SendAsync(); + } + else + await Response().Error(strs.quotes_page_none).SendAsync(); } [Cmd] @@ -83,7 +89,16 @@ public partial class Utility keyword = keyword.ToUpperInvariant(); - var quote = await _qs.GetQuoteByKeywordAsync(ctx.Guild.Id, keyword); + Quote quote; + await using (var uow = _db.GetDbContext()) + { + quote = await uow.Set().GetRandomQuoteByKeywordAsync(ctx.Guild.Id, keyword); + //if (quote is not null) + //{ + // quote.UseCount += 1; + // uow.Complete(); + //} + } if (quote is null) return; @@ -95,15 +110,21 @@ public partial class Utility await Response() .Text($"`{new kwum(quote.Id)}` 📣 " + text) + .Sanitize() .SendAsync(); } - [Cmd] [RequireContext(ContextType.Guild)] public async Task QuoteShow(kwum quoteId) { - var quote = await _qs.GetQuoteByIdAsync(ctx.Guild.Id, quoteId); + Quote? quote; + await using (var uow = _db.GetDbContext()) + { + quote = uow.Set().GetById(quoteId); + if (quote?.GuildId != ctx.Guild.Id) + quote = null; + } if (quote is null) { @@ -136,8 +157,8 @@ public partial class Utility async (sm) => { var msg = sm.Data.Components.FirstOrDefault()?.Value; - - if (!string.IsNullOrWhiteSpace(msg)) + + if(!string.IsNullOrWhiteSpace(msg)) await QuoteEdit(id, msg); } ); @@ -169,30 +190,27 @@ public partial class Utility .SendAsync(); } - private async Task QuoteSearchInternalAsync(string? keyword, string textOrAuthor) + private async Task QuoteSearchinternalAsync(string? keyword, string textOrAuthor) { if (string.IsNullOrWhiteSpace(textOrAuthor)) return; keyword = keyword?.ToUpperInvariant(); - var quotes = await _qs.SearchQuoteKeywordTextAsync(ctx.Guild.Id, keyword, textOrAuthor); + Quote quote; + await using (var uow = _db.GetDbContext()) + { + quote = await uow.Set().SearchQuoteKeywordTextAsync(ctx.Guild.Id, keyword, textOrAuthor); + } + + if (quote is null) + return; await Response() - .Paginated() - .Items(quotes) - .PageSize(1) - .Page((pageQuotes, _) => - { - var quote = pageQuotes[0]; - - var text = quote.Keyword.ToLowerInvariant() + ": " + quote.Text; - - return _sender.CreateEmbed() - .WithOkColor() - .WithTitle($"{new kwum(quote.Id)} 💬 ") - .WithDescription(text); - }) + .Confirm($"`{new kwum(quote.Id)}` 💬 ", + quote.Keyword.ToLowerInvariant() + + ": " + + quote.Text.SanitizeAllMentions()) .SendAsync(); } @@ -200,13 +218,13 @@ public partial class Utility [RequireContext(ContextType.Guild)] [Priority(0)] public Task QuoteSearch(string textOrAuthor) - => QuoteSearchInternalAsync(null, textOrAuthor); + => QuoteSearchinternalAsync(null, textOrAuthor); [Cmd] [RequireContext(ContextType.Guild)] [Priority(1)] public Task QuoteSearch(string keyword, [Leftover] string textOrAuthor) - => QuoteSearchInternalAsync(keyword, textOrAuthor); + => QuoteSearchinternalAsync(keyword, textOrAuthor); [Cmd] [RequireContext(ContextType.Guild)] @@ -215,28 +233,34 @@ public partial class Utility if (quoteId < 0) return; - var quote = await _qs.GetQuoteByIdAsync(ctx.Guild.Id, quoteId); + Quote quote; - if (quote is null) + var repCtx = new ReplacementContext(Context); + + await using (var uow = _db.GetDbContext()) + { + quote = uow.Set().GetById(quoteId); + } + + if (quote is null || quote.GuildId != ctx.Guild.Id) { await Response().Error(strs.quotes_notfound).SendAsync(); return; } - var infoText = $"*`{new kwum(quote.Id)}` added by {quote.AuthorName}* 🗯️ " - + quote.Keyword.ToLowerInvariant() + var infoText = $"*`{new kwum(quote.Id)}` added by {quote.AuthorName.SanitizeAllMentions()}* 🗯️ " + + quote.Keyword.ToLowerInvariant().SanitizeAllMentions() + ":\n"; - var repCtx = new ReplacementContext(Context); var text = SmartText.CreateFrom(quote.Text); text = await repSvc.ReplaceAsync(text, repCtx); await Response() .Text(infoText + text) + .Sanitize() .SendAsync(); } - [Cmd] [RequireContext(ContextType.Guild)] public async Task QuoteAdd(string keyword, [Leftover] string text) @@ -244,14 +268,26 @@ public partial class Utility if (string.IsNullOrWhiteSpace(keyword) || string.IsNullOrWhiteSpace(text)) return; - var quote = await _qs.AddQuoteAsync(ctx.Guild.Id, ctx.User.Id, ctx.User.Username, keyword, text); + keyword = keyword.ToUpperInvariant(); - await Response() - .Confirm(strs.quote_added_new(Format.Code(new kwum(quote.Id).ToString()))) - .SendAsync(); + Quote q; + await using (var uow = _db.GetDbContext()) + { + uow.Set() + .Add(q = new() + { + AuthorId = ctx.Message.Author.Id, + AuthorName = ctx.Message.Author.Username, + GuildId = ctx.Guild.Id, + Keyword = keyword, + Text = text + }); + await uow.SaveChangesAsync(); + } + + await Response().Confirm(strs.quote_added_new(Format.Code(new kwum(q.Id).ToString()))).SendAsync(); } - [Cmd] [RequireContext(ContextType.Guild)] public async Task QuoteEdit(kwum quoteId, [Leftover] string text) @@ -261,7 +297,19 @@ public partial class Utility return; } - var q = await _qs.EditQuoteAsync(ctx.User.Id, quoteId, text); + Quote q; + await using (var uow = _db.GetDbContext()) + { + var intId = (int)quoteId; + var result = await uow.GetTable() + .Where(x => x.Id == intId && x.AuthorId == ctx.User.Id) + .Set(x => x.Text, text) + .UpdateWithOutputAsync((del, ins) => ins); + + q = result.FirstOrDefault(); + + await uow.SaveChangesAsync(); + } if (q is not null) { @@ -281,19 +329,33 @@ public partial class Utility } } - [Cmd] [RequireContext(ContextType.Guild)] public async Task QuoteDelete(kwum quoteId) { var hasManageMessages = ((IGuildUser)ctx.Message.Author).GuildPermissions.ManageMessages; - var success = await _qs.DeleteQuoteAsync(ctx.Guild.Id, ctx.User.Id, hasManageMessages, quoteId); + var success = false; + string response; + await using (var uow = _db.GetDbContext()) + { + var q = uow.Set().GetById(quoteId); + + if (q?.GuildId != ctx.Guild.Id || (!hasManageMessages && q.AuthorId != ctx.Message.Author.Id)) + response = GetText(strs.quotes_remove_none); + else + { + uow.Set().Remove(q); + await uow.SaveChangesAsync(); + success = true; + response = GetText(strs.quote_deleted(new kwum(quoteId))); + } + } if (success) - await Response().Confirm(strs.quote_deleted(quoteId)).SendAsync(); + await Response().Confirm(response).SendAsync(); else - await Response().Error(strs.quotes_remove_none).SendAsync(); + await Response().Error(response).SendAsync(); } [Cmd] @@ -321,14 +383,21 @@ public partial class Utility [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.ManageMessages)] - public async Task QuotesDeleteAll([Leftover] string keyword) + public async Task DelAllQuotes([Leftover] string keyword) { if (string.IsNullOrWhiteSpace(keyword)) return; - await _qs.RemoveAllByKeyword(ctx.Guild.Id, keyword.ToUpperInvariant()); + keyword = keyword.ToUpperInvariant(); - await Response().Confirm(strs.quotes_deleted(Format.Bold(keyword))).SendAsync(); + await using (var uow = _db.GetDbContext()) + { + uow.Set().RemoveAllByKeyword(ctx.Guild.Id, keyword.ToUpperInvariant()); + + await uow.SaveChangesAsync(); + } + + await Response().Confirm(strs.quotes_deleted(Format.Bold(keyword.SanitizeAllMentions()))).SendAsync(); } [Cmd] @@ -336,7 +405,11 @@ public partial class Utility [UserPerm(GuildPerm.Administrator)] public async Task QuotesExport() { - var quotes = await _qs.GetGuildQuotesAsync(ctx.Guild.Id); + IEnumerable quotes; + await using (var uow = _db.GetDbContext()) + { + quotes = uow.Set().GetForGuild(ctx.Guild.Id).ToList(); + } var exprsDict = quotes.GroupBy(x => x.Keyword) .ToDictionary(x => x.Key, x => x.Select(ExportedQuote.FromModel)); @@ -351,6 +424,9 @@ public partial class Utility [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.Administrator)] [Ratelimit(300)] +#if GLOBAL_ELLIE + [OwnerOnly] +#endif public async Task QuotesImport([Leftover] string? input = null) { input = input?.Trim(); @@ -376,7 +452,7 @@ public partial class Utility } } - var succ = await _qs.ImportQuotesAsync(ctx.Guild.Id, input); + var succ = await ImportExprsAsync(ctx.Guild.Id, input); if (!succ) { await Response().Error(strs.expr_import_invalid_data).SendAsync(); @@ -385,5 +461,56 @@ public partial class Utility await ctx.OkAsync(); } + + private async Task ImportExprsAsync(ulong guildId, string input) + { + Dictionary> data; + try + { + data = Yaml.Deserializer.Deserialize>>(input); + if (data.Sum(x => x.Value.Count) == 0) + return false; + } + catch + { + return false; + } + + await using var uow = _db.GetDbContext(); + foreach (var entry in data) + { + var keyword = entry.Key; + await uow.Set() + .AddRangeAsync(entry.Value.Where(quote => !string.IsNullOrWhiteSpace(quote.Txt)) + .Select(quote => new Quote + { + GuildId = guildId, + Keyword = keyword, + Text = quote.Txt, + AuthorId = quote.Aid, + AuthorName = quote.An + })); + } + + await uow.SaveChangesAsync(); + return true; + } + + public class ExportedQuote + { + public string Id { get; set; } + public string An { get; set; } + public ulong Aid { get; set; } + public string Txt { get; set; } + + public static ExportedQuote FromModel(Quote quote) + => new() + { + Id = ((kwum)quote.Id).ToString(), + An = quote.AuthorName, + Aid = quote.AuthorId, + Txt = quote.Text + }; + } } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/Quote/QuoteService.cs b/src/EllieBot/Modules/Utility/Quote/QuoteService.cs index 429387a..db49648 100644 --- a/src/EllieBot/Modules/Utility/Quote/QuoteService.cs +++ b/src/EllieBot/Modules/Utility/Quote/QuoteService.cs @@ -1,8 +1,6 @@ #nullable disable warnings using LinqToDB; -using LinqToDB.Data; using LinqToDB.EntityFrameworkCore; -using EllieBot.Common.Yml; using EllieBot.Db.Models; namespace EllieBot.Modules.Utility; @@ -15,7 +13,7 @@ public sealed class QuoteService : IQuoteService, IEService { _db = db; } - + /// /// Delete all quotes created by the author in a guild /// @@ -26,234 +24,9 @@ public sealed class QuoteService : IQuoteService, IEService { await using var ctx = _db.GetDbContext(); var deleted = await ctx.GetTable() - .Where(x => x.GuildId == guildId && x.AuthorId == userId) - .DeleteAsync(); + .Where(x => x.GuildId == guildId && x.AuthorId == userId) + .DeleteAsync(); return deleted; } - - /// - /// Delete all quotes in a guild - /// - /// ID of the guild - /// Number of deleted qutoes - public async Task DeleteAllQuotesAsync(ulong guildId) - { - await using var ctx = _db.GetDbContext(); - var deleted = await ctx.GetTable() - .Where(x => x.GuildId == guildId) - .DeleteAsync(); - - return deleted; - } - - public async Task> GetAllQuotesAsync(ulong guildId, int page, OrderType order) - { - await using var uow = _db.GetDbContext(); - var q = uow.Set() - .ToLinqToDBTable() - .Where(x => x.GuildId == guildId); - - if (order == OrderType.Keyword) - q = q.OrderBy(x => x.Keyword); - else - q = q.OrderBy(x => x.Id); - - return await q.Skip(15 * page).Take(15).ToArrayAsyncLinqToDB(); - } - - public async Task GetQuoteByKeywordAsync(ulong guildId, string keyword) - { - await using var uow = _db.GetDbContext(); - var quotes = await uow.GetTable() - .Where(q => q.GuildId == guildId && q.Keyword == keyword) - .ToArrayAsyncLinqToDB(); - - return quotes.RandomOrDefault(); - } - - public async Task> SearchQuoteKeywordTextAsync( - ulong guildId, - string? keyword, - string text) - { - keyword = keyword?.ToUpperInvariant(); - await using var uow = _db.GetDbContext(); - - var quotes = await uow.GetTable() - .Where(q => q.GuildId == guildId - && (keyword == null || q.Keyword == keyword)) - .ToArrayAsync(); - - var toReturn = new List(quotes.Length); - - foreach (var q in quotes) - { - if (q.AuthorName.Contains(text, StringComparison.InvariantCultureIgnoreCase) - || q.Text.Contains(text, StringComparison.InvariantCultureIgnoreCase)) - { - toReturn.Add(q); - } - } - - return toReturn; - } - - public async Task> GetGuildQuotesAsync(ulong guildId) - { - await using var uow = _db.GetDbContext(); - var quotes = await uow.GetTable() - .Where(x => x.GuildId == guildId) - .ToListAsyncLinqToDB(); - return quotes; - } - - public Task RemoveAllByKeyword(ulong guildId, string keyword) - { - keyword = keyword.ToUpperInvariant(); - - using var uow = _db.GetDbContext(); - - var count = uow.GetTable() - .Where(x => x.GuildId == guildId && x.Keyword == keyword) - .DeleteAsync(); - - return count; - } - - public async Task GetQuoteByIdAsync(ulong guildId, int quoteId) - { - await using var uow = _db.GetDbContext(); - - var quote = await uow.GetTable() - .Where(x => x.Id == quoteId && x.GuildId == guildId) - .FirstOrDefaultAsyncLinqToDB(); - - return quote; - } - - public async Task AddQuoteAsync( - ulong guildId, - ulong authorId, - string authorName, - string keyword, - string text) - { - keyword = keyword.ToUpperInvariant(); - - Quote q; - await using var uow = _db.GetDbContext(); - uow.Set() - .Add(q = new() - { - AuthorId = authorId, - AuthorName = authorName, - GuildId = guildId, - Keyword = keyword, - Text = text - }); - await uow.SaveChangesAsync(); - - return q; - } - - public async Task EditQuoteAsync(ulong authorId, int quoteId, string text) - { - await using var uow = _db.GetDbContext(); - var result = await uow.GetTable() - .Where(x => x.Id == quoteId && x.AuthorId == authorId) - .Set(x => x.Text, text) - .UpdateWithOutputAsync((del, ins) => ins); - - var q = result.FirstOrDefault(); - return q; - } - - public async Task EditQuoteAsync( - ulong guildId, - int quoteId, - string keyword, - string text) - { - await using var uow = _db.GetDbContext(); - var result = await uow.GetTable() - .Where(x => x.Id == quoteId && x.GuildId == guildId) - .Set(x => x.Keyword, keyword) - .Set(x => x.Text, text) - .UpdateWithOutputAsync((del, ins) => ins); - - var q = result.FirstOrDefault(); - return q; - } - - public async Task DeleteQuoteAsync( - ulong guildId, - ulong authorId, - bool isQuoteManager, - int quoteId) - { - await using var uow = _db.GetDbContext(); - var q = uow.Set().GetById(quoteId); - - - var count = await uow.GetTable() - .Where(x => x.GuildId == guildId && x.Id == quoteId) - .Where(x => isQuoteManager || (x.AuthorId == authorId)) - .DeleteAsync(); - - - return count > 0; - } - - public async Task ImportQuotesAsync(ulong guildId, string input) - { - Dictionary> data; - try - { - data = Yaml.Deserializer.Deserialize>>(input); - } - catch (Exception ex) - { - Log.Warning(ex, "Quote import failed: {Message}", ex.Message); - return false; - } - - - var toImport = data.SelectMany(x => x.Value.Select(v => (Key: x.Key, Value: v))) - .Where(x => !string.IsNullOrWhiteSpace(x.Key) && !string.IsNullOrWhiteSpace(x.Value?.Txt)); - - await using var uow = _db.GetDbContext(); - await uow.GetTable() - .BulkCopyAsync(toImport - .Select(q => new Quote - { - GuildId = guildId, - Keyword = q.Key, - Text = q.Value.Txt, - AuthorId = q.Value.Aid, - AuthorName = q.Value.An - })); - - return true; - } - - public async Task<(IReadOnlyCollection quotes, int totalCount)> FindQuotesAsync( - ulong guildId, - string query, - int page) - { - await using var uow = _db.GetDbContext(); - - var baseQuery = uow.GetTable() - .Where(x => x.GuildId == guildId) - .Where(x => x.Keyword.Contains(query) || x.Text.Contains(query)); - - var quotes = await baseQuery - .OrderBy(x => x.Id) - .Skip((page - 1) * 10) - .Take(10) - .ToListAsyncLinqToDB(); - - return (quotes, await baseQuery.CountAsyncLinqToDB()); - } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/Quote/_common/ExportedQuote.cs b/src/EllieBot/Modules/Utility/Quote/_common/ExportedQuote.cs deleted file mode 100644 index c0ee68d..0000000 --- a/src/EllieBot/Modules/Utility/Quote/_common/ExportedQuote.cs +++ /dev/null @@ -1,20 +0,0 @@ -using EllieBot.Db.Models; - -namespace EllieBot.Modules.Utility; - -public class ExportedQuote -{ - public required string Id { get; init; } - public required string An { get; init; } - public required ulong Aid { get; init; } - public required string Txt { get; init; } - - public static ExportedQuote FromModel(Quote quote) - => new() - { - Id = ((kwum)quote.Id).ToString(), - An = quote.AuthorName, - Aid = quote.AuthorId, - Txt = quote.Text - }; -} \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs b/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs index b568ada..67b87af 100644 --- a/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs +++ b/src/EllieBot/Modules/Utility/Remind/RemindCommands.cs @@ -1,4 +1,5 @@ #nullable disable +using EllieBot.Db; using EllieBot.Modules.Utility.Services; using EllieBot.Db.Models; @@ -44,14 +45,11 @@ public partial class Utility ulong target; target = meorhere == MeOrHere.Me ? ctx.User.Id : ctx.Channel.Id; - - var success = await RemindInternal(target, - meorhere == MeOrHere.Me || ctx.Guild is null, - remindData.Time, - remindData.What, - ReminderType.User); - - if (!success) + if (!await RemindInternal(target, + meorhere == MeOrHere.Me || ctx.Guild is null, + remindData.Time, + remindData.What, + ReminderType.User)) await Response().Error(strs.remind_too_long).SendAsync(); } @@ -75,8 +73,7 @@ public partial class Utility } - var success = await RemindInternal(channel.Id, false, remindData.Time, remindData.What, ReminderType.User); - if (!success) + if (!await RemindInternal(channel.Id, false, remindData.Time, remindData.What, ReminderType.User)) await Response().Error(strs.remind_too_long).SendAsync(); } @@ -85,56 +82,52 @@ public partial class Utility [UserPerm(GuildPerm.Administrator)] [Priority(0)] public Task RemindList(Server _, int page = 1) - => RemindListInternal(page, ctx.Guild.Id); + => RemindListInternal(page, true); [Cmd] [Priority(1)] public Task RemindList(int page = 1) - => RemindListInternal(page, null); + => RemindListInternal(page, false); - private async Task RemindListInternal(int page, ulong? guildId) + private async Task RemindListInternal(int page, bool isServer) { if (--page < 0) return; var embed = _sender.CreateEmbed() - .WithOkColor() - .WithTitle(GetText(guildId is not null - ? strs.reminder_server_list - : strs.reminder_list)); + .WithOkColor() + .WithTitle(GetText(isServer ? strs.reminder_server_list : strs.reminder_list)); List rems; - if (guildId is { } gid) - rems = await _service.GetServerReminders(page, gid); - else - rems = await _service.GetUserReminders(page, ctx.User.Id); + await using (var uow = _db.GetDbContext()) + { + if (isServer) + rems = uow.Set().RemindersForServer(ctx.Guild.Id, page).ToList(); + else + rems = uow.Set().RemindersFor(ctx.User.Id, page).ToList(); + } - - if (rems.Count > 0) + if (rems.Any()) { var i = 0; foreach (var rem in rems) { var when = rem.When; embed.AddField( - $"#{++i + (page * 10)}", - $""" - `When:` {TimestampTag.FromDateTime(when, TimestampTagStyles.ShortDateTime)} - `Target:` {(rem.IsPrivate ? "DM" : "Channel")} [`{rem.ChannelId}`] - `Message:` {rem.Message?.TrimTo(50)} - """); + $"#{++i + (page * 10)} {rem.When:HH:mm yyyy-MM-dd} UTC " + + $"{TimestampTag.FromDateTime(when)}", + $@"`Target:` {(rem.IsPrivate ? "DM" : "Channel")} +`TargetId:` {rem.ChannelId} +`Message:` {rem.Message?.TrimTo(50)}"); } } else - { embed.WithDescription(GetText(strs.reminders_none)); - } embed.AddPaginatedFooter(page + 1, null); await Response().Embed(embed).SendAsync(); } - [Cmd] [RequireContext(ContextType.Guild)] [UserPerm(GuildPerm.Administrator)] @@ -210,13 +203,19 @@ public partial class Utility } // var gTime = ctx.Guild is null ? time : TimeZoneInfo.ConvertTime(time, _tz.GetTimeZoneOrUtc(ctx.Guild.Id)); - await Response() - .Confirm($"\u23f0 {GetText(strs.remind2( - Format.Bold(!isPrivate ? $"<#{targetId}>" : ctx.User.Username), - Format.Bold(message), - TimestampTag.FromDateTime(DateTime.UtcNow.Add(ts), TimestampTagStyles.Relative), - TimestampTag.FormatFromDateTime(time, TimestampTagStyles.ShortDateTime)))}") - .SendAsync(); + try + { + await Response() + .Confirm($"\u23f0 {GetText(strs.remind2( + Format.Bold(!isPrivate ? $"<#{targetId}>" : ctx.User.Username), + Format.Bold(message), + TimestampTag.FromDateTime(DateTime.UtcNow.Add(ts), TimestampTagStyles.Relative), + TimestampTag.FormatFromDateTime(time, TimestampTagStyles.ShortDateTime)))}") + .SendAsync(); + } + catch + { + } return true; } diff --git a/src/EllieBot/Modules/Utility/Remind/RemindService.cs b/src/EllieBot/Modules/Utility/Remind/RemindService.cs index 0d91498..dad22d2 100644 --- a/src/EllieBot/Modules/Utility/Remind/RemindService.cs +++ b/src/EllieBot/Modules/Utility/Remind/RemindService.cs @@ -11,20 +11,19 @@ namespace EllieBot.Modules.Utility.Services; public class RemindService : IEService, IReadyExecutor, IRemindService { private readonly Regex _regex = - new( - @"^(?:(?:at|on(?:\sthe)?)?\s*(?(?:\d{2}:\d{2}\s)?\d{1,2}\.\d{1,2}(?:\.\d{2,4})?)|(?:in\s?)?\s*(?:(?\d+)(?:\s?(?:months?|mos?),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:weeks?|w),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:days?|d),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:hours?|h),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:minutes?|mins?|m),?))?)\s+(?:to:?\s+)?(?(?:\r\n|[\r\n]|.)+)", + new(@"^(?:(?:at|on(?:\sthe)?)?\s*(?(?:\d{2}:\d{2}\s)?\d{1,2}\.\d{1,2}(?:\.\d{2,4})?)|(?:in\s?)?\s*(?:(?\d+)(?:\s?(?:months?|mos?),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:weeks?|w),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:days?|d),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:hours?|h),?))?(?:(?:\sand\s|\s*)?(?\d+)(?:\s?(?:minutes?|mins?|m),?))?)\s+(?:to:?\s+)?(?(?:\r\n|[\r\n]|.)+)", RegexOptions.Compiled | RegexOptions.Multiline); private readonly DiscordSocketClient _client; private readonly DbService _db; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly IMessageSenderService _sender; private readonly CultureInfo _culture; public RemindService( DiscordSocketClient client, DbService db, - IBotCreds creds, + IBotCredentials creds, IMessageSenderService sender) { _client = client; @@ -197,29 +196,26 @@ public class RemindService : IEService, IReadyExecutor, IRemindService var st = SmartText.CreateFrom(r.Message); - var res = _sender.Response(ch) - .UserBasedMentions(_client.GetGuild(r.ServerId)?.GetUser(r.UserId)); - if (st is SmartEmbedText set) { - await res.Embed(set.GetEmbed()).SendAsync(); + await _sender.Response(ch).Embed(set.GetEmbed()).SendAsync(); } else if (st is SmartEmbedTextArray seta) { - await res.Embeds(seta.GetEmbedBuilders()).SendAsync(); + await _sender.Response(ch).Embeds(seta.GetEmbedBuilders()).SendAsync(); } else { - await res - .Embed(_sender.CreateEmbed() + await _sender.Response(ch) + .Embed(_sender.CreateEmbed() .WithOkColor() .WithTitle("Reminder") .AddField("Created At", r.DateAdded.HasValue ? r.DateAdded.Value.ToLongDateString() : "?") .AddField("By", (await ch.GetUserAsync(r.UserId))?.ToString() ?? r.UserId.ToString())) - .Text(r.Message) - .SendAsync(); + .Text(r.Message) + .SendAsync(); } } catch (Exception ex) @@ -259,16 +255,4 @@ public class RemindService : IEService, IReadyExecutor, IRemindService .AddAsync(rem); await ctx.SaveChangesAsync(); } - - public async Task> GetServerReminders(int page, ulong guildId) - { - await using var uow = _db.GetDbContext(); - return uow.Set().RemindersForServer(guildId, page).ToList(); - } - - public async Task> GetUserReminders(int page, ulong userId) - { - await using var uow = _db.GetDbContext(); - return uow.Set().RemindersFor(userId, page).ToList(); - } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/Repeater/RepeaterService.cs b/src/EllieBot/Modules/Utility/Repeater/RepeaterService.cs index 7aa9b76..07d05cc 100644 --- a/src/EllieBot/Modules/Utility/Repeater/RepeaterService.cs +++ b/src/EllieBot/Modules/Utility/Repeater/RepeaterService.cs @@ -12,7 +12,7 @@ public sealed class RepeaterService : IReadyExecutor, IEService private readonly DbService _db; private readonly IReplacementService _repSvc; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly DiscordSocketClient _client; private readonly LinkedList _repeaterQueue; private readonly ConcurrentHashSet _noRedundant; @@ -25,7 +25,7 @@ public sealed class RepeaterService : IReadyExecutor, IEService DiscordSocketClient client, DbService db, IReplacementService repSvc, - IBotCreds creds, + IBotCredentials creds, IMessageSenderService sender) { _db = db; @@ -262,7 +262,7 @@ public sealed class RepeaterService : IReadyExecutor, IEService var repCtx = new ReplacementContext(client: _client, guild: guild, channel: channel, - user: guild.CurrentUser); + users: guild.CurrentUser); try { diff --git a/src/EllieBot/Modules/Utility/StreamRole/StreamRoleService.cs b/src/EllieBot/Modules/Utility/StreamRole/StreamRoleService.cs index eee20a1..4ded9d0 100644 --- a/src/EllieBot/Modules/Utility/StreamRole/StreamRoleService.cs +++ b/src/EllieBot/Modules/Utility/StreamRole/StreamRoleService.cs @@ -1,4 +1,5 @@ using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; using EllieBot.Modules.Utility.Common; using EllieBot.Modules.Utility.Common.Exceptions; using EllieBot.Db.Models; diff --git a/src/EllieBot/Modules/Utility/Utility.cs b/src/EllieBot/Modules/Utility/Utility.cs index 146a97c..7afa03e 100644 --- a/src/EllieBot/Modules/Utility/Utility.cs +++ b/src/EllieBot/Modules/Utility/Utility.cs @@ -1,3 +1,4 @@ +using LinqToDB.Reflection; using EllieBot.Modules.Utility.Services; using Newtonsoft.Json; using System.Diagnostics; @@ -6,6 +7,7 @@ using System.Text.Json; using System.Text.Json.Serialization; using Microsoft.CodeAnalysis.CSharp.Scripting; using Microsoft.CodeAnalysis.Scripting; +using EllieBot.Modules.Games.Hangman; using EllieBot.Modules.Searches.Common; namespace EllieBot.Modules.Utility; @@ -31,10 +33,11 @@ public partial class Utility : EllieModule PropertyNamingPolicy = LowerCaseNamingPolicy.Default }; + private static SemaphoreSlim sem = new(1, 1); private readonly DiscordSocketClient _client; private readonly ICoordinator _coord; private readonly IStatsService _stats; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly DownloadTracker _tracker; private readonly IHttpClientFactory _httpFactory; private readonly VerboseErrorsService _veService; @@ -45,7 +48,7 @@ public partial class Utility : EllieModule DiscordSocketClient client, ICoordinator coord, IStatsService stats, - IBotCreds creds, + IBotCredentials creds, DownloadTracker tracker, IHttpClientFactory httpFactory, VerboseErrorsService veService, @@ -112,38 +115,30 @@ public partial class Utility : EllieModule return; } + var rng = new EllieRandom(); + var arr = await Task.Run(() => socketGuild.Users + .Where(u => u.Activities.FirstOrDefault() + ?.Name?.Trim() + .ToUpperInvariant() + == game) + .Select(u => u.Username) + .OrderBy(_ => rng.Next()) + .Take(60) + .ToArray()); - var userNames = new List(socketGuild.Users.Count / 100); - foreach (var user in socketGuild.Users) + var i = 0; + if (arr.Length == 0) + await Response().Error(strs.nobody_playing_game).SendAsync(); + else { - if (user.Activities.Any(x => x.Name is not null && x.Name.ToUpperInvariant() == game)) - { - userNames.Add(user); - } + await Response() + .Confirm("```css\n" + + string.Join("\n", + arr.GroupBy(_ => i++ / 2) + .Select(ig => string.Concat(ig.Select(el => $"• {el,-27}")))) + + "\n```") + .SendAsync(); } - - await Response() - .Sanitize() - .Paginated() - .Items(userNames) - .PageSize(20) - .Page((names, _) => - { - if (names.Count == 0) - { - return _sender.CreateEmbed() - .WithErrorColor() - .WithDescription(GetText(strs.nobody_playing_game)); - } - - var eb = _sender.CreateEmbed() - .WithOkColor(); - - var users = names.Join('\n'); - - return eb.WithDescription(users); - }) - .SendAsync(); } [Cmd] @@ -161,16 +156,9 @@ public partial class Utility : EllieModule CacheMode.CacheOnly ); - users = role is null - ? users - : users.Where(u => u.RoleIds.Contains(role.Id)).ToList(); - - - var roleUsers = new List(users.Count); - foreach (var u in users) - { - roleUsers.Add($"{u.Mention} {Format.Spoiler(Format.Code(u.Username))}"); - } + var roleUsers = users.Where(u => role is null ? u.RoleIds.Count == 1 : u.RoleIds.Contains(role.Id)) + .Select(u => $"{u.Mention} {Format.Spoiler(Format.Code(u.Username))}") + .ToArray(); await Response() .Paginated() @@ -182,11 +170,10 @@ public partial class Utility : EllieModule if (pageUsers.Count == 0) return _sender.CreateEmbed().WithOkColor().WithDescription(GetText(strs.no_user_on_this_page)); - var roleName = Format.Bold(role?.Name ?? "No Role"); - return _sender.CreateEmbed() .WithOkColor() - .WithTitle(GetText(strs.inrole_list(roleName, roleUsers.Count))) + .WithTitle(GetText(strs.inrole_list(Format.Bold(role?.Name ?? "No Role"), + roleUsers.Length))) .WithDescription(string.Join("\n", pageUsers)); }) .SendAsync(); @@ -223,6 +210,16 @@ public partial class Utility : EllieModule await Response().Confirm(builder.ToString()).SendAsync(); } + // [Cmd] + // [RequireContext(ContextType.Guild)] + // [RequireUserPermission(GuildPermission.ManageRoles)] + // public async Task CheckPerms(SocketRole role, string perm = null) + // { + // ChannelPermissions. + // var perms = ((ITextChannel)ctx.Channel); + // await SendPerms(perms) + // } + [Cmd] [RequireContext(ContextType.Guild)] public async Task UserId([Leftover] IGuildUser? target = null) @@ -327,33 +324,31 @@ public partial class Utility : EllieModule if (string.IsNullOrWhiteSpace(ownerIds)) ownerIds = "-"; - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithAuthor($"EllieBot v{StatsService.BotVersion}", - "https://cdn.elliebot.net/Ellie.png", - "https://docs.elliebot.net") - .AddField(GetText(strs.author), _stats.Author, true) - .AddField(GetText(strs.botid), _client.CurrentUser.Id.ToString(), true) - .AddField(GetText(strs.shard), - $"#{_client.ShardId} / {_creds.TotalShards}", - true) - .AddField(GetText(strs.commands_ran), _stats.CommandsRan.ToString(), true) - .AddField(GetText(strs.messages), - $"{_stats.MessageCounter} ({_stats.MessagesPerSecond:F2}/sec)", - true) - .AddField(GetText(strs.memory), - FormattableString.Invariant($"{_stats.GetPrivateMemoryMegabytes():F2} MB"), - true) - .AddField(GetText(strs.owner_ids), ownerIds, true) - .AddField(GetText(strs.uptime), _stats.GetUptimeString("\n"), true) - .AddField(GetText(strs.presence), - GetText(strs.presence_txt(_coord.GetGuildCount(), - _stats.TextChannels, - _stats.VoiceChannels)), - true); - await Response() - .Embed(eb) + .Embed(_sender.CreateEmbed() + .WithOkColor() + .WithAuthor($"EllieBot v{StatsService.BotVersion}", + "https://cdn.elliebot.net/Ellie.png", + "https://docs.elliebot.net/") + .AddField(GetText(strs.author), _stats.Author, true) + .AddField(GetText(strs.botid), _client.CurrentUser.Id.ToString(), true) + .AddField(GetText(strs.shard), + $"#{_client.ShardId} / {_creds.TotalShards}", + true) + .AddField(GetText(strs.commands_ran), _stats.CommandsRan.ToString(), true) + .AddField(GetText(strs.messages), + $"{_stats.MessageCounter} ({_stats.MessagesPerSecond:F2}/sec)", + true) + .AddField(GetText(strs.memory), + FormattableString.Invariant($"{_stats.GetPrivateMemoryMegabytes():F2} MB"), + true) + .AddField(GetText(strs.owner_ids), ownerIds, true) + .AddField(GetText(strs.uptime), _stats.GetUptimeString("\n"), true) + .AddField(GetText(strs.presence), + GetText(strs.presence_txt(_coord.GetGuildCount(), + _stats.TextChannels, + _stats.VoiceChannels)), + true)) .SendAsync(); } @@ -564,38 +559,29 @@ public partial class Utility : EllieModule [Cmd] [OwnerOnly] - public async Task ServerList(int page = 1) + public async Task ListServers(int page = 1) { page -= 1; if (page < 0) return; - var allGuilds = _client.Guilds - .OrderBy(g => g.Name) - .ToList(); + var guilds = _client.Guilds.OrderBy(g => g.Name) + .Skip(page * 15) + .Take(15) + .ToList(); - await Response() - .Paginated() - .Items(allGuilds) - .PageSize(9) - .Page((guilds, _) => - { - if (!guilds.Any()) - { - return _sender.CreateEmbed() - .WithDescription(GetText(strs.listservers_none)) - .WithErrorColor(); - } + if (!guilds.Any()) + { + await Response().Error(strs.listservers_none).SendAsync(); + return; + } - var embed = _sender.CreateEmbed() - .WithOkColor(); - foreach (var guild in guilds) - embed.AddField(guild.Name, GetText(strs.listservers(guild.Id, guild.MemberCount, guild.OwnerId))); + var embed = _sender.CreateEmbed().WithOkColor(); + foreach (var guild in guilds) + embed.AddField(guild.Name, GetText(strs.listservers(guild.Id, guild.MemberCount, guild.OwnerId))); - return embed; - }) - .SendAsync(); + await Response().Embed(embed).SendAsync(); } [Cmd] @@ -681,17 +667,24 @@ public partial class Utility : EllieModule } [Cmd] - [Ratelimit(3)] public async Task Ping() { - var sw = Stopwatch.StartNew(); - var msg = await Response().Text("🏓").SendAsync(); - sw.Stop(); - msg.DeleteAfter(0); + await sem.WaitAsync(5000); + try + { + var sw = Stopwatch.StartNew(); + var msg = await Response().Text("🏓").SendAsync(); + sw.Stop(); + msg.DeleteAfter(0); - await Response() - .Confirm($"{Format.Bold(ctx.User.ToString())} 🏓 {(int)sw.Elapsed.TotalMilliseconds}ms") - .SendAsync(); + await Response() + .Confirm($"{Format.Bold(ctx.User.ToString())} 🏓 {(int)sw.Elapsed.TotalMilliseconds}ms") + .SendAsync(); + } + finally + { + sem.Release(); + } } [Cmd] @@ -783,28 +776,4 @@ public partial class Utility : EllieModule await Response().Error(ex.Message).SendAsync(); } } - - [Cmd] - public async Task Snipe() - { - if (ctx.Message.ReferencedMessage is not { } msg) - { - var msgs = await ctx.Channel.GetMessagesAsync(ctx.Message, Direction.Before, 3).FlattenAsync(); - msg = msgs.FirstOrDefault(x => !string.IsNullOrWhiteSpace(x.Content) || (x.Attachments.FirstOrDefault()?.Width is not null)) as IUserMessage; - - if (msg is null) - return; - } - - var eb = _sender.CreateEmbed() - .WithOkColor() - .WithDescription(msg.Content) - .WithAuthor(msg.Author) - .WithTimestamp(msg.Timestamp) - .WithImageUrl(msg.Attachments.FirstOrDefault()?.Url) - .WithFooter(GetText(strs.sniped_by(ctx.User.ToString())), ctx.User.GetDisplayAvatarUrl()); - - ctx.Message.DeleteAfter(1); - await Response().Embed(eb).SendAsync(); - } } \ No newline at end of file diff --git a/src/EllieBot/Modules/Utility/VerboseErrorsService.cs b/src/EllieBot/Modules/Utility/VerboseErrorsService.cs index e8e8c43..c5cf886 100644 --- a/src/EllieBot/Modules/Utility/VerboseErrorsService.cs +++ b/src/EllieBot/Modules/Utility/VerboseErrorsService.cs @@ -1,4 +1,6 @@ #nullable disable +using EllieBot.Db; + namespace EllieBot.Modules.Utility.Services; public class VerboseErrorsService : IEService diff --git a/src/EllieBot/Modules/Xp/Club/Club.cs b/src/EllieBot/Modules/Xp/Club/Club.cs index 4ce1c57..9a84dc9 100644 --- a/src/EllieBot/Modules/Xp/Club/Club.cs +++ b/src/EllieBot/Modules/Xp/Club/Club.cs @@ -1,4 +1,5 @@ #nullable disable +using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Modules.Xp.Services; @@ -112,14 +113,14 @@ public partial class Xp { var lvl = new LevelStats(club.Xp); var allUsers = club.Members.OrderByDescending(x => - { - var l = new LevelStats(x.TotalXp).Level; - if (club.OwnerId == x.Id) - return int.MaxValue; - if (x.IsClubAdmin) - return (int.MaxValue / 2) + l; - return l; - }) + { + var l = new LevelStats(x.TotalXp).Level; + if (club.OwnerId == x.Id) + return int.MaxValue; + if (x.IsClubAdmin) + return (int.MaxValue / 2) + l; + return l; + }) .ToList(); var rank = await _service.GetClubRankAsync(club.Id); diff --git a/src/EllieBot/Modules/Xp/Club/ClubService.cs b/src/EllieBot/Modules/Xp/Club/ClubService.cs index dad45ba..d35a05d 100644 --- a/src/EllieBot/Modules/Xp/Club/ClubService.cs +++ b/src/EllieBot/Modules/Xp/Club/ClubService.cs @@ -1,6 +1,8 @@ +#nullable disable using LinqToDB; using LinqToDB.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; +using EllieBot.Db; using EllieBot.Db.Models; using OneOf; @@ -98,9 +100,9 @@ public class ClubService : IEService, IClubService return member; } - public async Task SetClubIconAsync(ulong ownerUserId, string? url) + public async Task SetClubIconAsync(ulong ownerUserId, string url) { - if (!string.IsNullOrWhiteSpace(url)) + if (url is not null) { using var http = _httpFactory.CreateClient(); using var temp = await http.GetAsync(url, HttpCompletionOption.ResponseHeadersRead); @@ -173,7 +175,7 @@ public class ClubService : IEService, IClubService } - public ClubAcceptResult AcceptApplication(ulong clubOwnerUserId, string userName, out DiscordUser? discordUser ) + public ClubAcceptResult AcceptApplication(ulong clubOwnerUserId, string userName, out DiscordUser discordUser) { discordUser = null; using var uow = _db.GetDbContext(); @@ -199,7 +201,7 @@ public class ClubService : IEService, IClubService return ClubAcceptResult.Accepted; } - public ClubDenyResult RejectApplication(ulong clubOwnerUserId, string userName, out DiscordUser? discordUser) + public ClubDenyResult RejectApplication(ulong clubOwnerUserId, string userName, out DiscordUser discordUser) { discordUser = null; using var uow = _db.GetDbContext(); @@ -240,7 +242,7 @@ public class ClubService : IEService, IClubService return ClubLeaveResult.Success; } - public bool SetDescription(ulong userId, string? desc) + public bool SetDescription(ulong userId, string desc) { using var uow = _db.GetDbContext(); var club = uow.Set().GetByOwner(userId); diff --git a/src/EllieBot/Modules/Xp/Club/IClubService.cs b/src/EllieBot/Modules/Xp/Club/IClubService.cs index ea23436..8a45e8d 100644 --- a/src/EllieBot/Modules/Xp/Club/IClubService.cs +++ b/src/EllieBot/Modules/Xp/Club/IClubService.cs @@ -6,14 +6,14 @@ namespace EllieBot.Modules.Xp.Services; public interface IClubService { Task CreateClubAsync(IUser user, string clubName); - OneOf TransferClub(IUser from, IUser newOwner); + OneOf TransferClub(IUser from, IUser newOwner); Task ToggleAdminAsync(IUser owner, IUser toAdmin); ClubInfo? GetClubByMember(IUser user); Task SetClubIconAsync(ulong ownerUserId, string? url); bool GetClubByName(string clubName, out ClubInfo club); ClubApplyResult ApplyToClub(IUser user, ClubInfo club); - ClubAcceptResult AcceptApplication(ulong clubOwnerUserId, string userName, out DiscordUser? discordUser); - ClubDenyResult RejectApplication(ulong clubOwnerUserId, string userName, out DiscordUser? discordUser); + ClubAcceptResult AcceptApplication(ulong clubOwnerUserId, string userName, out DiscordUser discordUser); + ClubDenyResult RejectApplication(ulong clubOwnerUserId, string userName, out DiscordUser discordUser); ClubInfo? GetClubWithBansAndApplications(ulong ownerUserId); ClubLeaveResult LeaveClub(IUser user); bool SetDescription(ulong userId, string? desc); diff --git a/src/EllieBot/Modules/Xp/Xp.cs b/src/EllieBot/Modules/Xp/Xp.cs index 16e9a2f..3892f65 100644 --- a/src/EllieBot/Modules/Xp/Xp.cs +++ b/src/EllieBot/Modules/Xp/Xp.cs @@ -2,6 +2,7 @@ using EllieBot.Modules.Xp.Services; using EllieBot.Db.Models; using EllieBot.Modules.Patronage; +using EllieBot.Modules.Utility; namespace EllieBot.Modules.Xp; @@ -107,7 +108,7 @@ public partial class Xp : EllieModule [Cmd] [UserPerm(GuildPerm.ManageChannels)] [RequireContext(ContextType.Guild)] - public async Task XpExclude(Channel _, [Leftover] IChannel? channel = null) + public async Task XpExclude(Channel _, [Leftover] IChannel channel = null) { if (channel is null) channel = ctx.Channel; @@ -182,28 +183,29 @@ public partial class Xp : EllieModule var (opts, _) = OptionsParser.ParseFrom(new LbOpts(), args); await ctx.Channel.TriggerTypingAsync(); + + var socketGuild = (SocketGuild)ctx.Guild; + var allCleanUsers = new List(); if (opts.Clean) { + await ctx.Channel.TriggerTypingAsync(); await _tracker.EnsureUsersDownloadedAsync(ctx.Guild); + + allCleanUsers = (await _service.GetTopUserXps(ctx.Guild.Id, 1000)) + .Where(user => socketGuild.GetUser(user.UserId) is not null) + .ToList(); } - async Task> GetPageItems(int curPage) - { - var socketGuild = (SocketGuild)ctx.Guild; - if (opts.Clean) - { - return await _service.GetGuildUserXps(ctx.Guild.Id, - socketGuild.Users.Select(x => x.Id).ToList(), - curPage); - } - - return await _service.GetGuildUserXps(ctx.Guild.Id, curPage); - } - - await Response() + var res = opts.Clean + ? Response() .Paginated() - .PageItems(GetPageItems) - .PageSize(10) + .Items(allCleanUsers) + : Response() + .Paginated() + .PageItems((curPage) => _service.GetUserXps(ctx.Guild.Id, curPage)); + + await res + .PageSize(9) .CurrentPage(page) .Page((users, curPage) => { @@ -225,7 +227,7 @@ public partial class Xp : EllieModule else if (userXpData.AwardedXp < 0) awardStr = $"({userXpData.AwardedXp})"; - embed.AddField($"#{i + 1 + (curPage * 10)} {user?.ToString() ?? users[i].UserId.ToString()}", + embed.AddField($"#{i + 1 + (curPage * 9)} {user?.ToString() ?? users[i].UserId.ToString()}", $"{GetText(strs.level_x(levelStats.Level))} - {levelStats.TotalXp}xp {awardStr}"); } @@ -236,33 +238,15 @@ public partial class Xp : EllieModule [Cmd] [RequireContext(ContextType.Guild)] - public async Task XpGlobalLeaderboard(int page = 1, params string[] args) + public async Task XpGlobalLeaderboard(int page = 1) { if (--page < 0 || page > 99) return; - var (opts, _) = OptionsParser.ParseFrom(new LbOpts(), args); - - await ctx.Channel.TriggerTypingAsync(); - if (opts.Clean) - { - await _tracker.EnsureUsersDownloadedAsync(ctx.Guild); - } - - async Task> GetPageItems(int curPage) - { - if (opts.Clean) - { - return await _service.GetGlobalUserXps(page, ((SocketGuild)ctx.Guild).Users.Select(x => x.Id).ToList()); - } - - return await _service.GetGlobalUserXps(curPage); - } - await Response() .Paginated() - .PageItems(GetPageItems) - .PageSize(10) + .PageItems(async curPage => await _service.GetUserXps(curPage)) + .PageSize(9) .Page((users, curPage) => { var embed = _sender.CreateEmbed() @@ -278,7 +262,7 @@ public partial class Xp : EllieModule for (var i = 0; i < users.Count; i++) { var user = users[i]; - embed.AddField($"#{i + 1 + (curPage * 10)} {user}", + embed.AddField($"#{i + 1 + (curPage * 9)} {user}", $"{GetText(strs.level_x(new LevelStats(users[i].TotalXp).Level))} - {users[i].TotalXp}xp"); } @@ -299,9 +283,7 @@ public partial class Xp : EllieModule if (role.IsManaged) return; - var count = await _service.AddXpToUsersAsync(ctx.Guild.Id, - amount, - role.Members.Select(x => x.Id).ToArray()); + var count = await _service.AddXpToUsersAsync(ctx.Guild.Id, amount, role.Members.Select(x => x.Id).ToArray()); await Response() .Confirm( strs.xpadd_users(Format.Bold(amount.ToString()), Format.Bold(count.ToString()))) @@ -357,7 +339,7 @@ public partial class Xp : EllieModule if (!await PromptUserConfirmAsync(embed)) return; - await _service.XpReset(ctx.Guild.Id, userId); + _service.XpReset(ctx.Guild.Id, userId); await Response().Confirm(strs.reset_user(userId)).SendAsync(); } @@ -464,10 +446,9 @@ public partial class Xp : EllieModule if (!string.IsNullOrWhiteSpace(item.Desc)) eb.AddField(GetText(strs.desc), item.Desc); -#if GLOBAL_ELLIE if (key == "default") eb.WithDescription(GetText(strs.xpshop_website)); -#endif + var tier = _service.GetXpShopTierRequirement(type); if (tier != PatronTier.None) diff --git a/src/EllieBot/Modules/Xp/XpService.cs b/src/EllieBot/Modules/Xp/XpService.cs index 808b79a..6df1151 100644 --- a/src/EllieBot/Modules/Xp/XpService.cs +++ b/src/EllieBot/Modules/Xp/XpService.cs @@ -2,6 +2,7 @@ using LinqToDB; using Microsoft.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; using EllieBot.Db.Models; using Newtonsoft.Json; using SixLabors.Fonts; @@ -12,7 +13,6 @@ using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.Processing; using System.Threading.Channels; using LinqToDB.EntityFrameworkCore; -using LinqToDB.Tools; using EllieBot.Modules.Patronage; using Color = SixLabors.ImageSharp.Color; using Exception = System.Exception; @@ -20,38 +20,13 @@ using Image = SixLabors.ImageSharp.Image; namespace EllieBot.Modules.Xp.Services; -public interface IUserService -{ - Task GetUserAsync(ulong userId); -} - -public sealed class UserService : IUserService, IEService -{ - private readonly DbService _db; - - public UserService(DbService db) - { - _db = db; - } - - public async Task GetUserAsync(ulong userId) - { - await using var uow = _db.GetDbContext(); - var user = await uow - .GetTable() - .FirstOrDefaultAsyncLinqToDB(u => u.UserId == userId); - - return user; - } -} - public class XpService : IEService, IReadyExecutor, IExecNoCommand { private readonly DbService _db; private readonly IImageCache _images; private readonly IBotStrings _strings; private readonly FontProvider _fonts; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly ICurrencyService _cs; private readonly IHttpClientFactory _httpFactory; private readonly XpConfigService _xpConfig; @@ -81,7 +56,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand IImageCache images, IBotCache c, FontProvider fonts, - IBotCreds creds, + IBotCredentials creds, ICurrencyService cs, IHttpClientFactory http, XpConfigService xpConfig, @@ -204,9 +179,8 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand { foreach (var user in globalToAdd) { - var amount = (long)(user.Value.XpAmount * conf.CurrencyPerXp); - if (amount > 0) - await _cs.AddAsync(user.Key, amount, null); + var amount = user.Value.XpAmount * conf.CurrencyPerXp; + await _cs.AddAsync(user.Key, (long)(amount), null); } } @@ -217,9 +191,9 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand var items = await ctx.Set() .Where(x => group.Contains(x.UserId)) .UpdateWithOutputAsync(old => new() - { - TotalXp = old.TotalXp + group.Key - }, + { + TotalXp = old.TotalXp + group.Key + }, (_, n) => n); await ctx.Set() @@ -242,9 +216,9 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand .Where(x => x.GuildId == guildId) .Where(x => group.Contains(x.UserId)) .UpdateWithOutputAsync(old => new() - { - Xp = old.Xp + group.Key - }, + { + Xp = old.Xp + group.Key + }, (_, n) => n); gxps.AddRange(items); @@ -256,14 +230,14 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand .Set() .ToLinqToDBTable() .InsertOrUpdateAsync(() => new UserXpStats() - { - UserId = userId, - GuildId = guildId, - Xp = group.Key, - DateAdded = DateTime.UtcNow, - AwardedXp = 0, - NotifyOnLevelUp = XpNotificationLocation.None - }, + { + UserId = userId, + GuildId = guildId, + Xp = group.Key, + DateAdded = DateTime.UtcNow, + AwardedXp = 0, + NotifyOnLevelUp = XpNotificationLocation.None + }, _ => new() { }, @@ -449,8 +423,8 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand await _sender.Response(chan) .Confirm(_strings.GetText(strs.level_up_global(user.Mention, - Format.Bold(newLevel.ToString())), - guild.Id)) + Format.Bold(newLevel.ToString())), + guild.Id)) .SendAsync(); } } @@ -589,50 +563,23 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand uow.SaveChanges(); } - public async Task> GetGuildUserXps(ulong guildId, int page) + public async Task> GetUserXps(ulong guildId, int page) { await using var uow = _db.GetDbContext(); - return await uow - .UserXpStats - .Where(x => x.GuildId == guildId) - .OrderByDescending(x => x.Xp + x.AwardedXp) - .Skip(page * 10) - .Take(10) - .ToArrayAsyncLinqToDB(); + return await uow.Set().GetUsersFor(guildId, page); } - public async Task> GetGuildUserXps(ulong guildId, List users, int page) + public async Task> GetTopUserXps(ulong guildId, int count) { await using var uow = _db.GetDbContext(); - return await uow.Set() - .Where(x => x.GuildId == guildId && x.UserId.In(users)) - .OrderByDescending(x => x.Xp + x.AwardedXp) - .Skip(page * 10) - .Take(10) - .ToArrayAsyncLinqToDB(); + return await uow.Set().GetTopUserXps(guildId, count); } - public async Task> GetGlobalUserXps(int page) + public Task> GetUserXps(int page, int perPage = 9) { - await using var uow = _db.GetDbContext(); - - return await uow.GetTable() - .OrderByDescending(x => x.TotalXp) - .Skip(page * 10) - .Take(10) - .ToArrayAsyncLinqToDB(); - } - - public async Task> GetGlobalUserXps(int page, List users) - { - await using var uow = _db.GetDbContext(); - - return await uow.GetTable() - .Where(x => x.UserId.In(users)) - .OrderByDescending(x => x.TotalXp) - .Skip(page * 10) - .Take(10) - .ToArrayAsyncLinqToDB(); + using var uow = _db.GetDbContext(); + return uow.Set() + .GetUsersXpLeaderboardFor(page, perPage); } public async Task ChangeNotificationType(ulong userId, ulong guildId, XpNotificationLocation type) @@ -823,10 +770,9 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand private bool ShouldTrackXp(SocketGuildUser user, IMessageChannel channel) { var channelId = channel.Id; - - if (_excludedChannels.TryGetValue(user.Guild.Id, out var chans) - && (chans.Contains(channelId) - || (channel is SocketThreadChannel tc && chans.Contains(tc.ParentChannel.Id)))) + + if (_excludedChannels.TryGetValue(user.Guild.Id, out var chans) && (chans.Contains(channelId) + || (channel is SocketThreadChannel tc && chans.Contains(tc.ParentChannel.Id)))) return false; if (_excludedServers.Contains(user.Guild.Id)) @@ -1047,29 +993,29 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand throw new ArgumentNullException(nameof(bgBytes)); } - var outlinePen = new SolidPen(Color.Black, 1f); + var outlinePen = new Pen(Color.Black, 1f); - using var img = Image.Load(bgBytes); + using var img = Image.Load(bgBytes, out var imageFormat); if (template.User.Name.Show) { var fontSize = (int)(template.User.Name.FontSize * 0.9); var username = stats.User.ToString(); var usernameFont = _fonts.NotoSans.CreateFont(fontSize, FontStyle.Bold); - var size = TextMeasurer.MeasureSize($"@{username}", new(usernameFont)); + var size = TextMeasurer.Measure($"@{username}", new(usernameFont)); var scale = 400f / size.Width; if (scale < 1) usernameFont = _fonts.NotoSans.CreateFont(template.User.Name.FontSize * scale, FontStyle.Bold); img.Mutate(x => { - x.DrawText(new RichTextOptions(usernameFont) - { - HorizontalAlignment = HorizontalAlignment.Left, - VerticalAlignment = VerticalAlignment.Center, - FallbackFontFamilies = _fonts.FallBackFonts, - Origin = new(template.User.Name.Pos.X, template.User.Name.Pos.Y + 8) - }, + x.DrawText(new TextOptions(usernameFont) + { + HorizontalAlignment = HorizontalAlignment.Left, + VerticalAlignment = VerticalAlignment.Center, + FallbackFontFamilies = _fonts.FallBackFonts, + Origin = new(template.User.Name.Pos.X, template.User.Name.Pos.Y + 8) + }, "@" + username, Brushes.Solid(template.User.Name.Color), outlinePen); @@ -1084,13 +1030,13 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand var clubFont = _fonts.NotoSans.CreateFont(template.Club.Name.FontSize, FontStyle.Regular); - img.Mutate(x => x.DrawText(new RichTextOptions(clubFont) - { - HorizontalAlignment = HorizontalAlignment.Right, - VerticalAlignment = VerticalAlignment.Top, - FallbackFontFamilies = _fonts.FallBackFonts, - Origin = new(template.Club.Name.Pos.X + 50, template.Club.Name.Pos.Y - 8) - }, + img.Mutate(x => x.DrawText(new TextOptions(clubFont) + { + HorizontalAlignment = HorizontalAlignment.Right, + VerticalAlignment = VerticalAlignment.Top, + FallbackFontFamilies = _fonts.FallBackFonts, + Origin = new(template.Club.Name.Pos.X + 50, template.Club.Name.Pos.Y - 8) + }, clubName, Brushes.Solid(template.Club.Name.Color), outlinePen)); @@ -1104,7 +1050,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand int maxSize) { var font = fontFamily.CreateFont(fontSize, style); - var size = TextMeasurer.MeasureSize(text, new(font)); + var size = TextMeasurer.Measure(text, new(font)); var scale = maxSize / size.Width; if (scale < 1) font = fontFamily.CreateFont(fontSize * scale, style); @@ -1167,7 +1113,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand if (template.User.Xp.Global.Show) { img.Mutate(x => x.DrawText( - new RichTextOptions(_fonts.NotoSans.CreateFont(template.User.Xp.Global.FontSize, FontStyle.Bold)) + new TextOptions(_fonts.NotoSans.CreateFont(template.User.Xp.Global.FontSize, FontStyle.Bold)) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, @@ -1181,7 +1127,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand if (template.User.Xp.Guild.Show) { img.Mutate(x => x.DrawText( - new RichTextOptions(_fonts.NotoSans.CreateFont(template.User.Xp.Guild.FontSize, FontStyle.Bold)) + new TextOptions(_fonts.NotoSans.CreateFont(template.User.Xp.Guild.FontSize, FontStyle.Bold)) { HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, @@ -1205,7 +1151,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand new(awX, awY))); } - var rankPen = new SolidPen(Color.White, 1); + var rankPen = new Pen(Color.White, 1); //ranking if (template.User.GlobalRank.Show) { @@ -1219,7 +1165,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand 68); img.Mutate(x => x.DrawText( - new RichTextOptions(globalRankFont) + new TextOptions(globalRankFont) { Origin = new(template.User.GlobalRank.Pos.X, template.User.GlobalRank.Pos.Y) }, @@ -1241,7 +1187,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand 43); img.Mutate(x => x.DrawText( - new RichTextOptions(guildRankFont) + new TextOptions(guildRankFont) { Origin = new(template.User.GuildRank.Pos.X, template.User.GuildRank.Pos.Y) }, @@ -1284,7 +1230,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand } using var toDraw = Image.Load(data); - if (toDraw.Size != new Size(template.User.Icon.Size.X, template.User.Icon.Size.Y)) + if (toDraw.Size() != new Size(template.User.Icon.Size.X, template.User.Icon.Size.Y)) toDraw.Mutate(x => x.Resize(template.User.Icon.Size.X, template.User.Icon.Size.Y)); img.Mutate(x => x.DrawImage(toDraw, @@ -1302,15 +1248,14 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand if (template.Club.Icon.Show) await DrawClubImage(img, stats); - // #if GLOBAL_ELLIE +// #if GLOBAL_ELLIE await DrawFrame(img, stats.User.UserId); - // #endif +// #endif var outputSize = template.OutputSize; if (outputSize.X != img.Width || outputSize.Y != img.Height) img.Mutate(x => x.Resize(template.OutputSize.X, template.OutputSize.Y)); - var imageFormat = img.Metadata.DecodedImageFormat; var output = ((Stream)await img.ToStreamAsync(imageFormat), imageFormat); return output; @@ -1362,7 +1307,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand if (frame is not null) img.Mutate(x => x.DrawImage(frame, new Point(0, 0), new GraphicsOptions())); } - // #endif +// #endif private void DrawXpBar(float percent, XpBar info, Image img) { @@ -1447,7 +1392,7 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand } using var toDraw = Image.Load(data); - if (toDraw.Size != new Size(template.Club.Icon.Size.X, template.Club.Icon.Size.Y)) + if (toDraw.Size() != new Size(template.Club.Icon.Size.X, template.Club.Icon.Size.Y)) toDraw.Mutate(x => x.Resize(template.Club.Icon.Size.X, template.Club.Icon.Size.Y)); img.Mutate(x => x.DrawImage( @@ -1462,11 +1407,11 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand } } - public async Task XpReset(ulong guildId, ulong userId) + public void XpReset(ulong guildId, ulong userId) { - await using var uow = _db.GetDbContext(); - await uow.GetTable() - .DeleteAsync(x => x.UserId == userId && x.GuildId == guildId); + using var uow = _db.GetDbContext(); + uow.Set().ResetGuildUserXp(userId, guildId); + uow.SaveChanges(); } public void XpReset(ulong guildId) @@ -1662,15 +1607,6 @@ public class XpService : IEService, IReadyExecutor, IExecNoCommand public bool IsShopEnabled() => _xpConfig.Data.Shop.IsEnabled; - - public async Task GetTotalGuildUsers(ulong requestGuildId, List? guildUsers = null) - { - await using var ctx = _db.GetDbContext(); - return await ctx.GetTable() - .Where(x => x.GuildId == requestGuildId - && (guildUsers == null || guildUsers.Contains(x.UserId))) - .CountAsyncLinqToDB(); - } } public enum BuyResult diff --git a/src/EllieBot/Modules/Xp/_common/FullUserStats.cs b/src/EllieBot/Modules/Xp/_common/FullUserStats.cs index d56a62e..de8b8da 100644 --- a/src/EllieBot/Modules/Xp/_common/FullUserStats.cs +++ b/src/EllieBot/Modules/Xp/_common/FullUserStats.cs @@ -1,4 +1,5 @@ #nullable disable +using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Modules.Xp; diff --git a/src/EllieBot/Program.cs b/src/EllieBot/Program.cs index 5a74a96..2c5b5a9 100644 --- a/src/EllieBot/Program.cs +++ b/src/EllieBot/Program.cs @@ -1,4 +1,6 @@ -var shardId = 0; +var pid = Environment.ProcessId; + +var shardId = 0; int? totalShards = null; // 0 to read from creds.yml if (args.Length > 0 && args[0] != "run") { @@ -20,5 +22,7 @@ if (args.Length > 0 && args[0] != "run") } } +LogSetup.SetupLogger(shardId); +Log.Information("Pid: {ProcessId}", pid); await new Bot(shardId, totalShards, Environment.GetEnvironmentVariable("EllieBot__creds")).RunAndBlockAsync(); \ No newline at end of file diff --git a/src/EllieBot/Services/GrpcApi/ExprsSvc.cs b/src/EllieBot/Services/GrpcApi/ExprsSvc.cs deleted file mode 100644 index ad34ee3..0000000 --- a/src/EllieBot/Services/GrpcApi/ExprsSvc.cs +++ /dev/null @@ -1,149 +0,0 @@ -using Google.Protobuf.WellKnownTypes; -using Grpc.Core; -using EllieBot.Db.Models; -using EllieBot.Modules.EllieExpressions; -using EllieBot.Modules.Utility; - -namespace EllieBot.GrpcApi; - -public class ExprsSvc : GrpcExprs.GrpcExprsBase, IGrpcSvc, IEService -{ - private readonly EllieExpressionsService _svc; - private readonly IQuoteService _qs; - private readonly DiscordSocketClient _client; - - public ExprsSvc(EllieExpressionsService svc, IQuoteService qs, DiscordSocketClient client) - { - _svc = svc; - _qs = qs; - _client = client; - } - - public ServerServiceDefinition Bind() - => GrpcExprs.BindService(this); - - public override async Task AddExpr(AddExprRequest request, ServerCallContext context) - { - if (string.IsNullOrWhiteSpace(request.Expr.Trigger) || string.IsNullOrWhiteSpace(request.Expr.Response)) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Trigger and response are required")); - - EllieExpression expr; - if (!string.IsNullOrWhiteSpace(request.Expr.Id)) - { - expr = await _svc.EditAsync(request.GuildId, - new kwum(request.Expr.Id), - request.Expr.Response, - request.Expr.Ca, - request.Expr.Ad, - request.Expr.Dm); - } - else - { - expr = await _svc.AddAsync(request.GuildId, - request.Expr.Trigger, - request.Expr.Response, - request.Expr.Ca, - request.Expr.Ad, - request.Expr.Dm); - } - - - return new AddExprReply() - { - Id = new kwum(expr.Id).ToString(), - Success = true, - }; - } - - public override async Task GetExprs(GetExprsRequest request, ServerCallContext context) - { - var (exprs, totalCount) = await _svc.FindExpressionsAsync(request.GuildId, request.Query, request.Page); - - var reply = new GetExprsReply(); - reply.TotalCount = totalCount; - reply.Expressions.AddRange(exprs.Select(x => new ExprDto() - { - Ad = x.AutoDeleteTrigger, - At = x.AllowTarget, - Ca = x.ContainsAnywhere, - Dm = x.DmResponse, - Response = x.Response, - Id = new kwum(x.Id).ToString(), - Trigger = x.Trigger, - })); - - return reply; - } - - public override async Task DeleteExpr(DeleteExprRequest request, ServerCallContext context) - { - if (kwum.TryParse(request.Id, out var id)) - await _svc.DeleteAsync(request.GuildId, id); - - return new Empty(); - } - - public override async Task GetQuotes(GetQuotesRequest request, ServerCallContext context) - { - if (request.Page < 0) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Page must be >= 0")); - - var (quotes, totalCount) = await _qs.FindQuotesAsync(request.GuildId, request.Query, request.Page); - - var reply = new GetQuotesReply(); - reply.TotalCount = totalCount; - reply.Quotes.AddRange(quotes.Select(x => new QuoteDto() - { - Id = new kwum(x.Id).ToString(), - Trigger = x.Keyword, - Response = x.Text, - AuthorId = x.AuthorId, - AuthorName = x.AuthorName - })); - - return reply; - } - - public override async Task AddQuote(AddQuoteRequest request, ServerCallContext context) - { - var userId = context.RequestHeaders.GetUserId(); - - if (string.IsNullOrWhiteSpace(request.Quote.Trigger) || string.IsNullOrWhiteSpace(request.Quote.Response)) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Trigger and response are required")); - - if (string.IsNullOrWhiteSpace(request.Quote.Id)) - { - var q = await _qs.AddQuoteAsync(request.GuildId, - userId, - (await _client.GetUserAsync(userId))?.Username ?? userId.ToString(), - request.Quote.Trigger, - request.Quote.Response); - - return new() - { - Id = new kwum(q.Id).ToString() - }; - } - - if (!kwum.TryParse(request.Quote.Id, out var qid)) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Invalid quote id")); - - await _qs.EditQuoteAsync( - request.GuildId, - new kwum(request.Quote.Id), - request.Quote.Trigger, - request.Quote.Response); - - return new() - { - Id = new kwum(qid).ToString() - }; - } - - - public override async Task DeleteQuote(DeleteQuoteRequest request, ServerCallContext context) - { - await _qs.DeleteQuoteAsync(request.GuildId, context.RequestHeaders.GetUserId(), true, new kwum(request.Id)); - return new Empty(); - } -} \ No newline at end of file diff --git a/src/EllieBot/Services/GrpcApi/FinSvc.cs b/src/EllieBot/Services/GrpcApi/FinSvc.cs deleted file mode 100644 index e0a92e9..0000000 --- a/src/EllieBot/Services/GrpcApi/FinSvc.cs +++ /dev/null @@ -1,89 +0,0 @@ -using Google.Protobuf.WellKnownTypes; -using Grpc.Core; -using EllieBot.Db.Models; -using EllieBot.Modules.Gambling.Bank; -using EllieBot.Modules.EllieExpressions; -using EllieBot.Modules.Utility; - -namespace EllieBot.GrpcApi; - -public class FinSvc : GrpcFin.GrpcFinBase, IGrpcSvc, IEService -{ - private readonly ICurrencyService _cs; - private readonly IBankService _bank; - - public FinSvc(ICurrencyService cs, IBankService bank) - { - _cs = cs; - _bank = bank; - } - - public ServerServiceDefinition Bind() - => GrpcFin.BindService(this); - - [GrpcNoAuthRequired] - public override async Task Deposit(DepositRequest request, ServerCallContext context) - { - if (request.Amount <= 0) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Amount must be greater than 0")); - - var succ = await _bank.DepositAsync(request.UserId, request.Amount); - - return new DepositReply - { - Success = succ - }; - } - - [GrpcNoAuthRequired] - public override async Task Withdraw(WithdrawRequest request, ServerCallContext context) - { - if (request.Amount <= 0) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Amount must be greater than 0")); - - var succ = await _bank.WithdrawAsync(request.UserId, request.Amount); - - return new WithdrawReply - { - Success = succ - }; - } - - [GrpcNoAuthRequired] - public override async Task GetHoldings(GetHoldingsRequest request, ServerCallContext context) - { - return new GetHoldingsReply - { - Bank = await _bank.GetBalanceAsync(request.UserId), - Cash = await _cs.GetBalanceAsync(request.UserId) - }; - } - - [GrpcNoAuthRequired] - public override async Task GetTransactions( - GetTransactionsRequest request, - ServerCallContext context) - { - if (request.Page < 1) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Page must be greater than 0")); - - var trs = await _cs.GetTransactionsAsync(request.UserId, request.Page - 1); - - var reply = new GetTransactionsReply - { - Total = await _cs.GetTransactionsCountAsync(request.UserId) - }; - - reply.Transactions.AddRange(trs.Select(x => new TransactionReply() - { - Id = new kwum(x.Id).ToString(), - Timestamp = Timestamp.FromDateTime(DateTime.UtcNow), - Amount = x.Amount, - Extra = x.Extra ?? string.Empty, - Note = x.Note ?? string.Empty, - Type = x.Type ?? string.Empty, - })); - - return reply; - } -} diff --git a/src/EllieBot/Services/GrpcApi/GreetByeSvc.cs b/src/EllieBot/Services/GrpcApi/GreetByeSvc.cs deleted file mode 100644 index 1c40645..0000000 --- a/src/EllieBot/Services/GrpcApi/GreetByeSvc.cs +++ /dev/null @@ -1,121 +0,0 @@ -using Grpc.Core; -using GreetType = EllieBot.Services.GreetType; - -namespace EllieBot.GrpcApi; - -public sealed class GreetByeSvc : GrpcGreet.GrpcGreetBase, IGrpcSvc, IEService -{ - private readonly GreetService _gs; - private readonly DiscordSocketClient _client; - - public GreetByeSvc(GreetService gs, DiscordSocketClient client) - { - _gs = gs; - _client = client; - } - - public ServerServiceDefinition Bind() - => GrpcGreet.BindService(this); - - private static GrpcGreetSettings ToConf(GreetSettings? conf, GreetType type) - { - if (conf is null) - return new GrpcGreetSettings() - { - Type = (GrpcGreetType)type - }; - - return new GrpcGreetSettings() - { - Message = conf.MessageText, - Type = (GrpcGreetType)conf.GreetType, - ChannelId = conf.ChannelId?.ToString() ?? string.Empty, - IsEnabled = conf.IsEnabled, - }; - } - - public override async Task GetGreetSettings(GetGreetRequest request, ServerCallContext context) - { - var guildId = request.GuildId; - - var type = (GreetType)request.Type; - var conf = await _gs.GetGreetSettingsAsync(guildId, type); - - return ToConf(conf, type); - } - - public override async Task UpdateGreet(UpdateGreetRequest request, ServerCallContext context) - { - var gid = request.GuildId; - var s = request.Settings; - var msg = s.Message; - - var type = GetGreetType(s.Type); - - await _gs.SetMessage(gid, GetGreetType(s.Type), msg); - await _gs.SetGreet(gid, ulong.Parse(s.ChannelId), type, s.IsEnabled); - var settings = await _gs.GetGreetSettingsAsync(gid, type); - - if (settings is null) - return new() - { - Success = false - }; - - return new() - { - Success = true - }; - } - - public override Task TestGreet(TestGreetRequest request, ServerCallContext context) - => TestGreet(request.GuildId, request.ChannelId, request.UserId, request.Type); - - private async Task TestGreet( - ulong guildId, - ulong channelId, - ulong userId, - GrpcGreetType gtDto) - { - var g = _client.GetGuild(guildId) as IGuild; - if (g is null) - { - return new() - { - Error = "Guild doesn't exist", - Success = false, - }; - } - - var gu = await g.GetUserAsync(userId); - var ch = await g.GetTextChannelAsync(channelId); - - if (gu is null || ch is null) - return new TestGreetReply() - { - Error = "Guild or channel doesn't exist", - Success = false, - }; - - - var gt = GetGreetType(gtDto); - - await _gs.Test(guildId, gt, ch, gu); - return new TestGreetReply() - { - Success = true - }; - } - - private static GreetType GetGreetType(GrpcGreetType gtDto) - { - return gtDto switch - { - GrpcGreetType.Greet => GreetType.Greet, - GrpcGreetType.GreetDm => GreetType.GreetDm, - GrpcGreetType.Bye => GreetType.Bye, - GrpcGreetType.Boost => GreetType.Boost, - _ => throw new ArgumentOutOfRangeException(nameof(gtDto), gtDto, null) - }; - } -} diff --git a/src/EllieBot/Services/GrpcApi/NCanvasSvc.cs b/src/EllieBot/Services/GrpcApi/NCanvasSvc.cs deleted file mode 100644 index 8e99fb4..0000000 --- a/src/EllieBot/Services/GrpcApi/NCanvasSvc.cs +++ /dev/null @@ -1,95 +0,0 @@ -using Google.Protobuf.WellKnownTypes; -using Grpc.Core; -using EllieBot.Db.Models; -using EllieBot.Modules.Games; -using SixLabors.ImageSharp.PixelFormats; - -namespace EllieBot.GrpcApi; - -public class NCanvasSvc : GrpcNCanvas.GrpcNCanvasBase, IGrpcSvc, IEService -{ - private readonly INCanvasService _nCanvas; - private readonly DiscordSocketClient _client; - - public NCanvasSvc(INCanvasService nCanvas, DiscordSocketClient client) - { - _nCanvas = nCanvas; - _client = client; - } - - public ServerServiceDefinition Bind() - => GrpcNCanvas.BindService(this); - - [GrpcNoAuthRequired] - public override async Task GetCanvas(Empty request, ServerCallContext context) - { - var pixels = await _nCanvas.GetCanvas(); - var reply = new CanvasReply() - { - Width = _nCanvas.GetWidth(), - Height = _nCanvas.GetHeight() - }; - reply.Pixels.AddRange(pixels); - return reply; - } - - [GrpcNoAuthRequired] - public override async Task GetPixel(GetPixelRequest request, ServerCallContext context) - { - var pixel = await _nCanvas.GetPixel(request.X, request.Y); - if (pixel is null) - throw new RpcException(new Status(StatusCode.NotFound, "Pixel not found")); - - var reply = MapPixelToGrpcPixel(pixel); - return reply; - } - - private GetPixelReply MapPixelToGrpcPixel(NCPixel pixel) - { - var reply = new GetPixelReply - { - Color = "#" + new Rgba32(pixel.Color).ToHex(), - PackedColor = pixel.Color, - Position = new kwum(pixel.Position).ToString(), - PositionX = pixel.Position % _nCanvas.GetWidth(), - PositionY = pixel.Position / _nCanvas.GetWidth(), - // Owner = await ((IDiscordClient)_client).GetUserAsync(pixel.OwnerId)?.ToString() ?? string.Empty, - // OwnerId = pixel.OwnerId.ToString(), - Price = pixel.Price, - Text = pixel.Text - }; - return reply; - } - - [GrpcNoAuthRequired] - public override async Task SetPixel(SetPixelRequest request, ServerCallContext context) - { - if (!kwum.TryParse(request.Position, out var pos)) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Position is invalid")); - - if (!Rgba32.TryParseHex(request.Color, out var clr)) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Color is invalid")); - - var userId = context.RequestHeaders.GetUserId(); - var result = await _nCanvas.SetPixel(pos, clr.PackedValue, request.Text, userId, request.Price); - var reply = new SetPixelReply() - { - Success = result == SetPixelResult.Success, - Error = result switch - { - SetPixelResult.Success => string.Empty, - SetPixelResult.InsufficientPayment => "You have to pay equal or more than the price.", - SetPixelResult.NotEnoughMoney => "You don't have enough currency. ", - SetPixelResult.InvalidInput => - $"Invalid input. Position has to be >= 0 and < {_nCanvas.GetWidth()}x{_nCanvas.GetHeight()}", - _ => throw new ArgumentOutOfRangeException() - } - }; - - var pixel = await _nCanvas.GetPixel(pos); - if (pixel is not null) - reply.Pixel = MapPixelToGrpcPixel(pixel); - - return reply; - } -} diff --git a/src/EllieBot/Services/GrpcApi/OtherSvc.cs b/src/EllieBot/Services/GrpcApi/OtherSvc.cs deleted file mode 100644 index 8138345..0000000 --- a/src/EllieBot/Services/GrpcApi/OtherSvc.cs +++ /dev/null @@ -1,253 +0,0 @@ -using Google.Protobuf.WellKnownTypes; -using Grpc.Core; -using EllieBot.Modules.Gambling.Services; -using EllieBot.Modules.Xp.Services; - -namespace EllieBot.GrpcApi; - -public static class GrpcApiExtensions -{ - public static ulong GetUserId(this ServerCallContext context) - => ulong.Parse(context.RequestHeaders.FirstOrDefault(x => x.Key == "userid")!.Value); -} - -public sealed class OtherSvc : GrpcOther.GrpcOtherBase, IGrpcSvc, IEService -{ - private readonly DiscordSocketClient _client; - private readonly XpService _xp; - private readonly ICurrencyService _cur; - private readonly WaifuService _waifus; - private readonly IStatsService _stats; - private readonly CommandHandler _cmdHandler; - - public OtherSvc( - DiscordSocketClient client, - XpService xp, - ICurrencyService cur, - WaifuService waifus, - IStatsService stats, - CommandHandler cmdHandler) - { - _client = client; - _xp = xp; - _cur = cur; - _waifus = waifus; - _stats = stats; - _cmdHandler = cmdHandler; - } - - public ServerServiceDefinition Bind() - => GrpcOther.BindService(this); - - [GrpcNoAuthRequired] - public override Task BotOnGuild(BotOnGuildRequest request, ServerCallContext context) - { - var guild = _client.GetGuild(request.GuildId); - - var reply = new BotOnGuildReply - { - Success = guild is not null - }; - - return Task.FromResult(reply); - } - - public override Task GetRoles(GetRolesRequest request, ServerCallContext context) - { - var g = _client.GetGuild(request.GuildId); - var roles = g?.Roles; - var reply = new GetRolesReply(); - reply.Roles.AddRange(roles?.Select(x => new RoleReply() - { - Id = x.Id, - Name = x.Name, - Color = x.Color.ToString(), - IconUrl = x.GetIconUrl() ?? string.Empty, - }) - ?? new List()); - - return Task.FromResult(reply); - } - - public override async Task GetTextChannels( - GetTextChannelsRequest request, - ServerCallContext context) - { - IGuild g = _client.GetGuild(request.GuildId); - var reply = new GetTextChannelsReply(); - - var chs = await g.GetTextChannelsAsync(); - - reply.TextChannels.AddRange(chs.Select(x => new TextChannelReply() - { - Id = x.Id, - Name = x.Name, - })); - - return reply; - } - - - [GrpcNoAuthRequired] - public override async Task GetCurrencyLb(GetLbRequest request, ServerCallContext context) - { - var users = await _cur.GetTopRichest(_client.CurrentUser.Id, request.Page, request.PerPage); - - var reply = new CurrencyLbReply(); - var entries = users.Select(x => - { - var user = _client.GetUser(x.UserId); - return Task.FromResult(new CurrencyLbEntryReply() - { - Amount = x.CurrencyAmount, - User = user?.ToString() ?? x.Username, - UserId = x.UserId, - Avatar = user?.RealAvatarUrl().ToString() ?? x.RealAvatarUrl()?.ToString() - }); - }); - - reply.Entries.AddRange(await entries.WhenAll()); - - return reply; - } - - [GrpcNoAuthRequired] - public override async Task GetXpLb(GetLbRequest request, ServerCallContext context) - { - var users = await _xp.GetGlobalUserXps(request.Page); - - var reply = new XpLbReply(); - - var entries = users.Select(x => - { - var lvl = new LevelStats(x.TotalXp); - - return new XpLbEntryReply() - { - Level = lvl.Level, - TotalXp = x.TotalXp, - User = x.Username, - UserId = x.UserId - }; - }); - - reply.Entries.AddRange(entries); - - return reply; - } - - [GrpcNoAuthRequired] - public override async Task GetWaifuLb(GetLbRequest request, ServerCallContext context) - { - var waifus = await _waifus.GetTopWaifusAtPage(request.Page, request.PerPage); - - var reply = new WaifuLbReply(); - reply.Entries.AddRange(waifus.Select(x => new WaifuLbEntry() - { - ClaimedBy = x.ClaimerName ?? string.Empty, - IsMutual = x.ClaimerName == x.Affinity, - Value = x.Price, - User = x.WaifuName, - })); - return reply; - } - - [GrpcNoAuthRequired] - public override async Task GetShardStats( - Empty request, - IServerStreamWriter responseStream, - ServerCallContext context) - { - while (true) - { - var stats = new ShardStatsReply() - { - Id = _client.ShardId, - Commands = _stats.CommandsRan, - Uptime = _stats.GetUptimeString(), - Status = GetConnectionState(_client.ConnectionState), - GuildCount = _client.Guilds.Count, - }; - - await responseStream.WriteAsync(stats); - await Task.Delay(1000); - } - } - - [GrpcNoAuthRequired] - public override async Task GetCommandFeed( - Empty request, - IServerStreamWriter responseStream, - ServerCallContext context) - { - var taskCompletion = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - - Task OnCommandExecuted(IUserMessage userMessage, CommandInfo commandInfo) - { - try - { - responseStream.WriteAsync(new() - { - Command = commandInfo.Name - }); - } - catch - { - _cmdHandler.CommandExecuted -= OnCommandExecuted; - taskCompletion.TrySetResult(true); - } - - return Task.CompletedTask; - } - - _cmdHandler.CommandExecuted += OnCommandExecuted; - - await taskCompletion.Task; - } - - private string GetConnectionState(ConnectionState clientConnectionState) - { - return clientConnectionState switch - { - ConnectionState.Connected => "Connected", - ConnectionState.Connecting => "Connecting", - _ => "Disconnected" - }; - } - - public override async Task GetServerInfo(ServerInfoRequest request, ServerCallContext context) - { - var info = await _stats.GetGuildInfoAsync(request.GuildId); - - var reply = new GetServerInfoReply() - { - Id = info.Id, - Name = info.Name, - IconUrl = info.IconUrl, - OwnerId = info.OwnerId, - OwnerName = info.Owner, - TextChannels = info.TextChannels, - VoiceChannels = info.VoiceChannels, - MemberCount = info.MemberCount, - CreatedAt = info.CreatedAt.Ticks, - }; - - reply.Features.AddRange(info.Features); - reply.Emojis.AddRange(info.Emojis.Select(x => new EmojiReply() - { - Name = x.Name, - Url = x.Url, - Code = x.ToString() - })); - - reply.Roles.AddRange(info.Roles.Select(x => new RoleReply() - { - Id = x.Id, - Name = x.Name, - IconUrl = x.GetIconUrl() ?? string.Empty, - Color = x.Color.ToString() - })); - - return reply; - } -} \ No newline at end of file diff --git a/src/EllieBot/Services/GrpcApi/WarnSvc.cs b/src/EllieBot/Services/GrpcApi/WarnSvc.cs deleted file mode 100644 index b67cec7..0000000 --- a/src/EllieBot/Services/GrpcApi/WarnSvc.cs +++ /dev/null @@ -1,224 +0,0 @@ -using Grpc.Core; -using EllieBot.Db.Models; -using EllieBot.Modules.Administration.Services; -using Enum = System.Enum; - -namespace EllieBot.GrpcApi; - -public sealed class WarnSvc : GrpcWarn.GrpcWarnBase, IGrpcSvc, IEService -{ - private readonly UserPunishService _ups; - private readonly DiscordSocketClient _client; - - public WarnSvc(UserPunishService ups, DiscordSocketClient client) - { - _ups = ups; - _client = client; - } - - public ServerServiceDefinition Bind() - => GrpcWarn.BindService(this); - - public override async Task GetWarnSettings( - WarnSettingsRequest request, - ServerCallContext context) - { - var list = await _ups.WarnPunishList(request.GuildId); - - var wsr = new WarnSettingsReply(); - - (wsr.ExpiryDays, wsr.DeleteOnExpire) = await _ups.GetWarnExpire(request.GuildId); - - wsr.Punishments.AddRange(list.Select(x => new WarnPunishment() - { - Action = x.Punishment.ToString(), - Duration = x.Time, - Threshold = x.Count, - Role = x.RoleId is ulong rid - ? _client.GetGuild(request.GuildId)?.GetRole(rid)?.Name ?? x.RoleId?.ToString() ?? string.Empty - : string.Empty - })); - - return wsr; - } - - public override async Task SetWarnExpiry( - SetWarnExpiryRequest request, - ServerCallContext context) - { - if (request.ExpiryDays > 366) - { - return new SetWarnExpiryReply() - { - Success = false - }; - } - - await _ups.WarnExpireAsync(request.GuildId, request.ExpiryDays, request.DeleteOnExpire); - - return new SetWarnExpiryReply() - { - Success = true - }; - } - - public override async Task DeleteWarnp(DeleteWarnpRequest request, ServerCallContext context) - { - var succ = await _ups.WarnPunishRemove(request.GuildId, request.Threshold); - - return new DeleteWarnpReply - { - Success = succ - }; - } - - public override async Task AddWarnp(AddWarnpRequest request, ServerCallContext context) - { - if (request.Punishment.Threshold <= 0) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Threshold must be greater than 0")); - - var g = _client.GetGuild(request.GuildId); - - if (g is null) - throw new RpcException(new Status(StatusCode.NotFound, "Guild not found")); - - if (!Enum.TryParse(request.Punishment.Action, out var action)) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Invalid action")); - - IRole? role = null; - if (action == PunishmentAction.AddRole && ulong.TryParse(request.Punishment.Role, out var roleId)) - { - role = g.GetRole(roleId); - - if (role is null) - return new AddWarnpReply() - { - Success = false - }; - - if (!ulong.TryParse(context.RequestHeaders.GetValue("userid"), out var userId)) - return new AddWarnpReply() - { - Success = false - }; - - var user = await ((IGuild)g).GetUserAsync(userId); - - if (user is null) - throw new RpcException(new Status(StatusCode.NotFound, "User not found")); - - var userMaxRole = user.GetRoles().MaxBy(x => x.Position)?.Position ?? 0; - if (g.OwnerId != user.Id && userMaxRole <= role.Position) - { - return new AddWarnpReply() - { - Success = false - }; - } - } - - var duration = TimeSpan.FromMinutes(request.Punishment.Duration); - - var succ = await _ups.WarnPunish(request.GuildId, - request.Punishment.Threshold, - action, - duration, - role - ); - - return new AddWarnpReply() - { - Success = succ - }; - } - - public override async Task GetLatestWarnings( - GetLatestWarningsRequest request, - ServerCallContext context) - { - var (latest, count) = await _ups.GetLatestWarnings(request.GuildId, request.Page); - - var reply = new GetLatestWarningsReply() - { - TotalCount = count - }; - - reply.Warnings.AddRange(latest.Select(MapWarningToGrpcWarning)); - - return reply; - } - - public override async Task GetUserWarnings( - GetUserWarningsRequest request, - ServerCallContext context) - { - IReadOnlyCollection latest = []; - var count = 0; - if (ulong.TryParse(request.User, out var userId)) - { - (latest, count) = await _ups.GetUserWarnings(request.GuildId, userId, request.Page); - } - else if (_client.GetGuild(request.GuildId)?.Users.FirstOrDefault(x => x.Username == request.User) is { } user) - { - (latest, count) = await _ups.GetUserWarnings(request.GuildId, user.Id, request.Page); - } - else - { - } - - var reply = new GetUserWarningsReply - { - TotalCount = count - }; - - reply.Warnings.AddRange(latest.Select(MapWarningToGrpcWarning)); - - return reply; - } - - private Warning MapWarningToGrpcWarning(Db.Models.Warning x) - { - return new Warning - { - Id = new kwum(x.Id).ToString(), - Forgiven = x.Forgiven, - ForgivenBy = x.ForgivenBy ?? string.Empty, - Reason = x.Reason ?? string.Empty, - Timestamp = x.DateAdded is { } da ? Ellie.Common.Extensions.ToTimestamp(da) : 0, - Weight = x.Weight, - Moderator = x.Moderator ?? string.Empty, - User = _client.GetUser(x.UserId)?.Username ?? x.UserId.ToString(), - UserId = x.UserId - }; - } - - public override async Task ForgiveWarning( - ForgiveWarningRequest request, - ServerCallContext context) - { - if (!kwum.TryParse(request.WarnId, out var wid)) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Invalid warning ID")); - - var succ = await _ups.ForgiveWarning(request.GuildId, wid, request.ModName); - - return new ForgiveWarningReply - { - Success = succ - }; - } - - public override async Task DeleteWarning( - ForgiveWarningRequest request, - ServerCallContext context) - { - if (!kwum.TryParse(request.WarnId, out var wid)) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Invalid warning ID")); - - var succ = await _ups.WarnDelete(request.GuildId, wid); - - return new ForgiveWarningReply - { - Success = succ - }; - } -} \ No newline at end of file diff --git a/src/EllieBot/Services/GrpcApi/XpSvc.cs b/src/EllieBot/Services/GrpcApi/XpSvc.cs deleted file mode 100644 index 6d66fd8..0000000 --- a/src/EllieBot/Services/GrpcApi/XpSvc.cs +++ /dev/null @@ -1,282 +0,0 @@ -using Google.Protobuf.WellKnownTypes; -using Grpc.Core; -using EllieBot.Db.Models; -using EllieBot.Modules.Gambling.Bank; -using EllieBot.Modules.EllieExpressions; -using EllieBot.Modules.Utility; -using EllieBot.Modules.Xp.Services; - -namespace EllieBot.GrpcApi; - -public class XpSvc : GrpcXp.GrpcXpBase, IGrpcSvc, IEService -{ - private readonly XpService _xp; - private readonly DiscordSocketClient _client; - private readonly IUserService _duSvc; - - public XpSvc(XpService xp, DiscordSocketClient client, IUserService duSvc) - { - _xp = xp; - _client = client; - _duSvc = duSvc; - } - - public ServerServiceDefinition Bind() - => GrpcXp.BindService(this); - - public override async Task GetXpSettings( - GetXpSettingsRequest request, - ServerCallContext context) - { - await Task.Yield(); - - var guild = _client.GetGuild(request.GuildId); - - if (guild is null) - throw new RpcException(new Status(StatusCode.NotFound, "Guild not found")); - - var excludedChannels = _xp.GetExcludedChannels(request.GuildId); - var excludedRoles = _xp.GetExcludedRoles(request.GuildId); - var isServerExcluded = _xp.IsServerExcluded(request.GuildId); - - var reply = new GetXpSettingsReply(); - - reply.Exclusions.AddRange(excludedChannels - .Select(x => new ExclItemReply() - { - Id = x, - Type = "Channel", - Name = guild.GetChannel(x)?.Name ?? "????" - }) - .Concat(excludedRoles - .Select(x => new ExclItemReply() - { - Id = x, - Type = "Role", - Name = guild.GetRole(x)?.Name ?? "????" - }))); - - var curRews = _xp.GetCurrencyRewards(request.GuildId); - var roleRews = _xp.GetRoleRewards(request.GuildId); - - var rews = curRews.Select(x => new RewItemReply() - { - Level = x.Level, - Type = "Currency", - Value = x.Amount.ToString() - }); - - rews = rews.Concat(roleRews.Select(x => new RewItemReply() - { - Level = x.Level, - Type = x.Remove ? "RemoveRole" : "AddRole", - Value = guild.GetRole(x.RoleId)?.ToString() ?? x.RoleId.ToString() - })) - .OrderBy(x => x.Level); - - reply.Rewards.AddRange(rews); - - reply.ServerExcluded = isServerExcluded; - - return reply; - } - - public override async Task AddExclusion(AddExclusionRequest request, ServerCallContext context) - { - await Task.Yield(); - - var success = false; - var guild = _client.GetGuild(request.GuildId); - - if (guild is null) - throw new RpcException(new Status(StatusCode.NotFound, "Guild not found")); - - if (request.Type == "Role") - { - if (guild.GetRole(request.Id) is null) - return new() - { - Success = false - }; - - success = _xp.ToggleExcludeRole(request.GuildId, request.Id); - } - else if (request.Type == "Channel") - { - if (guild.GetTextChannel(request.Id) is null) - return new() - { - Success = false - }; - - success = _xp.ToggleExcludeChannel(request.GuildId, request.Id); - } - - return new() - { - Success = success - }; - } - - public override Task DeleteExclusion( - DeleteExclusionRequest request, - ServerCallContext context) - { - var success = false; - if (request.Type == "Role") - success = _xp.ToggleExcludeRole(request.GuildId, request.Id); - else - success = _xp.ToggleExcludeChannel(request.GuildId, request.Id); - - return Task.FromResult(new DeleteExclusionReply - { - Success = success - }); - } - - public override async Task AddReward(AddRewardRequest request, ServerCallContext context) - { - await Task.Yield(); - - var success = false; - var guild = _client.GetGuild(request.GuildId); - - if (guild is null) - throw new RpcException(new Status(StatusCode.NotFound, "Guild not found")); - - if (request.Type == "AddRole" || request.Type == "RemoveRole") - { - if (!ulong.TryParse(request.Value, out var rid)) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Invalid role id")); - - var role = guild.GetRole(rid); - if (role is null) - return new() - { - Success = false - }; - - _xp.SetRoleReward(request.GuildId, request.Level, rid, request.Type == "RemoveRole"); - success = true; - } - // else if (request.Type == "Currency") - // { - // if (!int.TryParse(request.Value, out var amount)) - // throw new RpcException(new Status(StatusCode.InvalidArgument, "Invalid amount")); - // - // _xp.SetCurrencyReward(request.GuildId, request.Level, amount); - // success = true; - // } - - return new() - { - Success = success - }; - } - - public override Task DeleteReward(DeleteRewardRequest request, ServerCallContext context) - { - var success = false; - - if (request.Type == "AddRole" || request.Type == "RemoveRole") - { - _xp.ResetRoleReward(request.GuildId, request.Level); - success = true; - } - else if (request.Type == "Currency") - { - _xp.SetCurrencyReward(request.GuildId, request.Level, 0); - success = true; - } - - return Task.FromResult(new DeleteRewardReply - { - Success = success - }); - } - - public override async Task ResetUserXp(ResetUserXpRequest request, ServerCallContext context) - { - await _xp.XpReset(request.GuildId, request.UserId); - - return new ResetUserXpReply - { - Success = true - }; - } - - public override async Task GetXpLb(GetXpLbRequest request, ServerCallContext context) - { - if (request.Page < 1) - throw new RpcException(new Status(StatusCode.InvalidArgument, "Page must be greater than or equal to 1")); - - var guild = _client.GetGuild(request.GuildId); - - if (guild is null) - throw new RpcException(new Status(StatusCode.NotFound, "Guild not found")); - - var data = await _xp.GetGuildUserXps(request.GuildId, request.Page - 1); - var total = await _xp.GetTotalGuildUsers(request.GuildId); - - var reply = new GetXpLbReply - { - Total = total - }; - - var users = await data - .Select(async x => - { - var user = guild.GetUser(x.UserId); - - if (user is null) - { - var du = await _duSvc.GetUserAsync(x.UserId); - if (du is null) - return new XpLbUserReply - { - UserId = x.UserId, - Avatar = string.Empty, - Username = string.Empty, - Xp = x.Xp, - Level = new LevelStats(x.Xp).Level - }; - - return new XpLbUserReply() - { - UserId = x.UserId, - Avatar = du.RealAvatarUrl()?.ToString() ?? string.Empty, - Username = du.ToString() ?? string.Empty, - Xp = x.Xp, - Level = new LevelStats(x.Xp).Level - }; - } - - return new XpLbUserReply - { - UserId = x.UserId, - Avatar = user?.GetAvatarUrl() ?? string.Empty, - Username = user?.ToString() ?? string.Empty, - Xp = x.Xp, - Level = new LevelStats(x.Xp).Level - }; - }) - .WhenAll(); - - reply.Users.AddRange(users); - - return reply; - } - - public override async Task SetServerExclusion( - SetServerExclusionRequest request, - ServerCallContext context) - { - await Task.Yield(); - - var newValue = _xp.ToggleExcludeServer(request.GuildId); - return new() - { - Success = newValue - }; - } -} \ No newline at end of file diff --git a/src/EllieBot/Services/GrpcApiPermsInterceptor.cs b/src/EllieBot/Services/GrpcApiPermsInterceptor.cs deleted file mode 100644 index 6e4b6cf..0000000 --- a/src/EllieBot/Services/GrpcApiPermsInterceptor.cs +++ /dev/null @@ -1,119 +0,0 @@ -using Grpc.Core; -using Grpc.Core.Interceptors; - -namespace EllieBot.GrpcApi; - -public sealed partial class GrpcApiPermsInterceptor : Interceptor -{ - private const GuildPerm DEFAULT_PERMISSION = GuildPermission.Administrator; - - private readonly DiscordSocketClient _client; - - public GrpcApiPermsInterceptor(DiscordSocketClient client) - { - _client = client; - } - - public async Task RequestHandler(ServerCallContext context) - { - try - { - var method = context.Method[(context.Method.LastIndexOf('/') + 1)..]; - - // get metadata - var metadata = context - .RequestHeaders - .ToDictionary(x => x.Key, x => x.Value); - - Log.Information("grpc | g: {GuildId} | u: {UserID} | cmd: {Method}", - metadata.TryGetValue("guildid", out var gidString) ? gidString : "none", - metadata.TryGetValue("userid", out var uidString) ? uidString : "none", - method); - - - // there always has to be a user who makes the call - if (!metadata.ContainsKey("userid")) - throw new RpcException(new(StatusCode.Unauthenticated, "userid has to be specified.")); - - // get the method name without the service name - - // if the method is explicitly marked as not requiring auth - if (_noAuthRequired.Contains(method)) - return; - - // otherwise the method requires auth, and if it requires auth then the guildid has to be specified - if (string.IsNullOrWhiteSpace(gidString)) - throw new RpcException(new(StatusCode.Unauthenticated, "guildid has to be specified.")); - - var userId = ulong.Parse(metadata["userid"]); - var guildId = ulong.Parse(gidString); - - // check if the user has the required permission - if (_perms.TryGetValue(method, out var perm)) - { - await EnsureUserHasPermission(guildId, userId, perm); - } - else - { - // if not then use the default, which is Administrator permission - await EnsureUserHasPermission(guildId, userId, DEFAULT_PERMISSION); - } - } - catch (Exception ex) - { - Log.Error(ex, "Error thrown by {ContextMethod}", context.Method); - throw; - } - } - - private async Task EnsureUserHasPermission(ulong guildId, ulong userId, GuildPerm perm) - { - IGuild guild = _client.GetGuild(guildId); - var user = guild is null ? null : await guild.GetUserAsync(userId); - - if (user is null) - throw new RpcException(new Status(StatusCode.NotFound, "User not found")); - - if (!user.GuildPermissions.Has(perm)) - throw new RpcException(new Status(StatusCode.PermissionDenied, - $"You need {perm} permission to use this method")); - } - - public override async Task ClientStreamingServerHandler( - IAsyncStreamReader requestStream, - ServerCallContext context, - ClientStreamingServerMethod continuation) - { - await RequestHandler(context); - return await continuation(requestStream, context); - } - - public override async Task DuplexStreamingServerHandler( - IAsyncStreamReader requestStream, - IServerStreamWriter responseStream, - ServerCallContext context, - DuplexStreamingServerMethod continuation) - { - await RequestHandler(context); - await continuation(requestStream, responseStream, context); - } - - public override async Task ServerStreamingServerHandler( - TRequest request, - IServerStreamWriter responseStream, - ServerCallContext context, - ServerStreamingServerMethod continuation) - { - await RequestHandler(context); - await continuation(request, responseStream, context); - } - - public override async Task UnaryServerHandler( - TRequest request, - ServerCallContext context, - UnaryServerMethod continuation) - { - await RequestHandler(context); - return await continuation(request, context); - } -} \ No newline at end of file diff --git a/src/EllieBot/Services/GrpcApiService.cs b/src/EllieBot/Services/GrpcApiService.cs deleted file mode 100644 index 6703b51..0000000 --- a/src/EllieBot/Services/GrpcApiService.cs +++ /dev/null @@ -1,75 +0,0 @@ -using Grpc.Core; -using Grpc.Core.Interceptors; -using EllieBot.Common.ModuleBehaviors; - -namespace EllieBot.GrpcApi; - -public class GrpcApiService : IEService, IReadyExecutor -{ - private Server? _app; - - private readonly DiscordSocketClient _client; - private readonly IEnumerable _svcs; - private readonly IBotCredsProvider _creds; - - public GrpcApiService( - DiscordSocketClient client, - IEnumerable svcs, - IBotCredsProvider creds) - { - _client = client; - _svcs = svcs; - _creds = creds; - } - - public Task OnReadyAsync() - { - var creds = _creds.GetCreds(); - if (creds.GrpcApi is null || !creds.GrpcApi.Enabled) - return Task.CompletedTask; - - try - { - var host = creds.GrpcApi.Host; - var port = creds.GrpcApi.Port + _client.ShardId; - - var interceptor = new GrpcApiPermsInterceptor(_client); - - var serverCreds = ServerCredentials.Insecure; - - if (creds.GrpcApi is - { - CertPrivateKey: not null and not "", - CertChain: not null and not "" - } cert) - { - serverCreds = new SslServerCredentials( - new[] { new KeyCertificatePair(cert.CertChain, cert.CertPrivateKey) }); - } - - _app = new() - { - Ports = - { - new(host, port, serverCreds), - } - }; - - foreach (var svc in _svcs) - { - _app.Services.Add(svc.Bind().Intercept(interceptor)); - } - - _app.Start(); - - Log.Information("Grpc Api Server started on port {Host}:{Port}", host, port); - } - catch (Exception ex) - { - Log.Error(ex, "Error starting Grpc Api Server"); - _app?.ShutdownAsync().GetAwaiter().GetResult(); - } - - return Task.CompletedTask; - } -} \ No newline at end of file diff --git a/src/EllieBot/Services/IGrpcSvc.cs b/src/EllieBot/Services/IGrpcSvc.cs deleted file mode 100644 index ef516e4..0000000 --- a/src/EllieBot/Services/IGrpcSvc.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Grpc.Core; - -namespace EllieBot.GrpcApi; - -public interface IGrpcSvc -{ - ServerServiceDefinition Bind(); -} \ No newline at end of file diff --git a/src/EllieBot/_common/Impl/BotCredsProvider.cs b/src/EllieBot/Services/Impl/BotCredsProvider.cs similarity index 82% rename from src/EllieBot/_common/Impl/BotCredsProvider.cs rename to src/EllieBot/Services/Impl/BotCredsProvider.cs index 915e813..5c156db 100644 --- a/src/EllieBot/_common/Impl/BotCredsProvider.cs +++ b/src/EllieBot/Services/Impl/BotCredsProvider.cs @@ -1,6 +1,8 @@ #nullable disable using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Primitives; using EllieBot.Common.Yml; +using Newtonsoft.Json; namespace EllieBot.Services; @@ -21,6 +23,7 @@ public sealed class BotCredsProvider : IBotCredsProvider private readonly object _reloadLock = new(); + private readonly IDisposable _changeToken; public BotCredsProvider(int? totalShards = null, string credPath = null) { @@ -47,19 +50,18 @@ public sealed class BotCredsProvider : IBotCredsProvider // this can fail in docker containers } + MigrateCredentials(); + + if (!File.Exists(CredsPath)) + { + Log.Warning( + "{CredsPath} is missing. Attempting to load creds from environment variables prefixed with 'EllieBot_'. Example is in {CredsExamplePath}", + CredsPath, + CredsExamplePath); + } try { - MigrateCredentials(); - - if (!File.Exists(CredsPath)) - { - Log.Warning( - "{CredsPath} is missing. Attempting to load creds from environment variables prefixed with 'EllieBot_'. Example is in {CredsExamplePath}", - CredsPath, - CredsExamplePath); - } - _config = new ConfigurationBuilder().AddYamlFile(CredsPath, false, true) .AddEnvironmentVariables("EllieBot_") .Build(); @@ -69,6 +71,7 @@ public sealed class BotCredsProvider : IBotCredsProvider Console.WriteLine(ex.ToString()); } + _changeToken = ChangeToken.OnChange(() => _config.GetReloadToken(), Reload); Reload(); } @@ -119,7 +122,7 @@ public sealed class BotCredsProvider : IBotCredsProvider } } - public void ModifyCredsFile(Action func) + public void ModifyCredsFile(Action func) { var ymlData = File.ReadAllText(CREDS_FILE_NAME); var creds = Yaml.Deserializer.Deserialize(ymlData); @@ -137,18 +140,23 @@ public sealed class BotCredsProvider : IBotCredsProvider var creds = Yaml.Deserializer.Deserialize(File.ReadAllText(CREDS_FILE_NAME)); if (creds.Version <= 5) { - creds.BotCache = BotCacheImplemenation.Memory; + creds.BotCache = BotCacheImplemenation.Redis; + } + if (creds.Version <= 6) + { + creds.Version = 7; + File.WriteAllText(CREDS_FILE_NAME, Yaml.Serializer.Serialize(creds)); } - if (creds.Version < 13) + if (creds.Version <= 8) { - creds.Version = 13; + creds.Version = 9; File.WriteAllText(CREDS_FILE_NAME, Yaml.Serializer.Serialize(creds)); } } } - public IBotCreds GetCreds() + public IBotCredentials GetCreds() { lock (_reloadLock) { diff --git a/src/EllieBot/_common/Impl/GoogleApiService.cs b/src/EllieBot/Services/Impl/GoogleApiService.cs similarity index 94% rename from src/EllieBot/_common/Impl/GoogleApiService.cs rename to src/EllieBot/Services/Impl/GoogleApiService.cs index 03dd2a6..9d4a494 100644 --- a/src/EllieBot/_common/Impl/GoogleApiService.cs +++ b/src/EllieBot/Services/Impl/GoogleApiService.cs @@ -75,7 +75,7 @@ public sealed partial class GoogleApiService : IGoogleApiService, IEService return (await query.ExecuteAsync()).Items.Select(i => "https://www.youtube.com/watch?v=" + i.Id.VideoId).Skip(1); } - public async Task> GetVideoLinksByKeywordAsync(string keywords, int count = 1) + public async Task> GetVideoLinksByKeywordAsync(string keywords, int count = 1) { if (string.IsNullOrWhiteSpace(keywords)) throw new ArgumentNullException(nameof(keywords)); @@ -87,7 +87,7 @@ public sealed partial class GoogleApiService : IGoogleApiService, IEService query.Q = keywords; query.Type = "video"; query.SafeSearch = SearchResource.ListRequest.SafeSearchEnum.Strict; - return (await query.ExecuteAsync()).Items.Select(i => "https://www.youtube.com/watch?v=" + i.Id.VideoId).ToArray(); + return (await query.ExecuteAsync()).Items.Select(i => "https://www.youtube.com/watch?v=" + i.Id.VideoId); } public async Task> GetVideoInfosByKeywordAsync( @@ -201,12 +201,9 @@ public sealed partial class GoogleApiService : IGoogleApiService, IEService { string text; - if (!Languages.ContainsKey(targetLanguage)) + if (!Languages.ContainsKey(sourceLanguage) || !Languages.ContainsKey(targetLanguage)) throw new ArgumentException(nameof(sourceLanguage) + "/" + nameof(targetLanguage)); - if (string.IsNullOrWhiteSpace(sourceLanguage) || !Languages.ContainsKey(sourceLanguage)) - sourceLanguage = "auto"; - var url = new Uri(string.Format( "https://translate.googleapis.com/translate_a/single?client=gtx&sl={0}&tl={1}&dt=t&q={2}", @@ -226,7 +223,7 @@ public sealed partial class GoogleApiService : IGoogleApiService, IEService private string ConvertToLanguageCode(string language) { Languages.TryGetValue(language, out var mode); - return string.IsNullOrWhiteSpace(mode) ? language : mode; + return mode; } } diff --git a/src/EllieBot/_common/Impl/GoogleApiService_SupportedLanguages.cs b/src/EllieBot/Services/Impl/GoogleApiService_SupportedLanguages.cs similarity index 99% rename from src/EllieBot/_common/Impl/GoogleApiService_SupportedLanguages.cs rename to src/EllieBot/Services/Impl/GoogleApiService_SupportedLanguages.cs index 300964d..b4aa70a 100644 --- a/src/EllieBot/_common/Impl/GoogleApiService_SupportedLanguages.cs +++ b/src/EllieBot/Services/Impl/GoogleApiService_SupportedLanguages.cs @@ -154,6 +154,7 @@ public sealed partial class GoogleApiService } Languages = langs; + } } \ No newline at end of file diff --git a/src/EllieBot/_common/Impl/ImageCache.cs b/src/EllieBot/Services/Impl/ImageCache.cs similarity index 91% rename from src/EllieBot/_common/Impl/ImageCache.cs rename to src/EllieBot/Services/Impl/ImageCache.cs index cf18590..4fc4e72 100644 --- a/src/EllieBot/_common/Impl/ImageCache.cs +++ b/src/EllieBot/Services/Impl/ImageCache.cs @@ -60,6 +60,12 @@ public sealed class ImageCache : IImageCache, IEService public Task GetXpBackgroundImageAsync() => GetImageDataAsync(_ic.Data.Xp.Bg); + public Task GetRategirlBgAsync() + => GetImageDataAsync(_ic.Data.Rategirl.Matrix); + + public Task GetRategirlDotAsync() + => GetImageDataAsync(_ic.Data.Rategirl.Dot); + public Task GetDiceAsync(int num) => GetImageDataAsync(_ic.Data.Dice[num]); diff --git a/src/EllieBot/_common/Impl/LocalDataCache.cs b/src/EllieBot/Services/Impl/LocalDataCache.cs similarity index 100% rename from src/EllieBot/_common/Impl/LocalDataCache.cs rename to src/EllieBot/Services/Impl/LocalDataCache.cs diff --git a/src/EllieBot/_common/Impl/Localization.cs b/src/EllieBot/Services/Impl/Localization.cs similarity index 99% rename from src/EllieBot/_common/Impl/Localization.cs rename to src/EllieBot/Services/Impl/Localization.cs index a1ff55d..3c2cb5b 100644 --- a/src/EllieBot/_common/Impl/Localization.cs +++ b/src/EllieBot/Services/Impl/Localization.cs @@ -1,4 +1,5 @@ #nullable disable +using EllieBot.Db; using Newtonsoft.Json; using System.Globalization; diff --git a/src/EllieBot/_common/Impl/PubSub/JsonSeria.cs b/src/EllieBot/Services/Impl/PubSub/JsonSeria.cs similarity index 95% rename from src/EllieBot/_common/Impl/PubSub/JsonSeria.cs rename to src/EllieBot/Services/Impl/PubSub/JsonSeria.cs index 25c6b96..413b8f8 100644 --- a/src/EllieBot/_common/Impl/PubSub/JsonSeria.cs +++ b/src/EllieBot/Services/Impl/PubSub/JsonSeria.cs @@ -7,7 +7,6 @@ public class JsonSeria : ISeria { private readonly JsonSerializerOptions _serializerOptions = new() { - IncludeFields = true, Converters = { new Rgba32Converter(), diff --git a/src/EllieBot/_common/Impl/PubSub/RedisPubSub.cs b/src/EllieBot/Services/Impl/PubSub/RedisPubSub.cs similarity index 95% rename from src/EllieBot/_common/Impl/PubSub/RedisPubSub.cs rename to src/EllieBot/Services/Impl/PubSub/RedisPubSub.cs index 6a20888..fd4a36c 100644 --- a/src/EllieBot/_common/Impl/PubSub/RedisPubSub.cs +++ b/src/EllieBot/Services/Impl/PubSub/RedisPubSub.cs @@ -4,11 +4,11 @@ namespace EllieBot.Common; public sealed class RedisPubSub : IPubSub { - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly ConnectionMultiplexer _multi; private readonly ISeria _serializer; - public RedisPubSub(ConnectionMultiplexer multi, ISeria serializer, IBotCreds creds) + public RedisPubSub(ConnectionMultiplexer multi, ISeria serializer, IBotCredentials creds) { _multi = multi; _serializer = serializer; diff --git a/src/EllieBot/_common/Impl/PubSub/YamlSeria.cs b/src/EllieBot/Services/Impl/PubSub/YamlSeria.cs similarity index 100% rename from src/EllieBot/_common/Impl/PubSub/YamlSeria.cs rename to src/EllieBot/Services/Impl/PubSub/YamlSeria.cs diff --git a/src/EllieBot/_common/Impl/RedisBotCache.cs b/src/EllieBot/Services/Impl/RedisBotCache.cs similarity index 99% rename from src/EllieBot/_common/Impl/RedisBotCache.cs rename to src/EllieBot/Services/Impl/RedisBotCache.cs index 7e37d9c..259b820 100644 --- a/src/EllieBot/_common/Impl/RedisBotCache.cs +++ b/src/EllieBot/Services/Impl/RedisBotCache.cs @@ -3,6 +3,7 @@ using OneOf.Types; using StackExchange.Redis; using System.Text.Json; using System.Text.Json.Serialization; +using YamlDotNet.Core.Tokens; namespace EllieBot.Common; diff --git a/src/EllieBot/_common/Impl/RedisBotStringsProvider.cs b/src/EllieBot/Services/Impl/RedisBotStringsProvider.cs similarity index 97% rename from src/EllieBot/_common/Impl/RedisBotStringsProvider.cs rename to src/EllieBot/Services/Impl/RedisBotStringsProvider.cs index 504fff6..c0bef49 100644 --- a/src/EllieBot/_common/Impl/RedisBotStringsProvider.cs +++ b/src/EllieBot/Services/Impl/RedisBotStringsProvider.cs @@ -15,13 +15,13 @@ public class RedisBotStringsProvider : IBotStringsProvider private readonly ConnectionMultiplexer _redis; private readonly IStringsSource _source; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; public RedisBotStringsProvider( ConnectionMultiplexer redis, DiscordSocketClient discordClient, IStringsSource source, - IBotCreds creds) + IBotCredentials creds) { _redis = redis; _source = source; diff --git a/src/EllieBot/_common/Impl/RemoteGrpcCoordinator.cs b/src/EllieBot/Services/Impl/RemoteGrpcCoordinator.cs similarity index 94% rename from src/EllieBot/_common/Impl/RemoteGrpcCoordinator.cs rename to src/EllieBot/Services/Impl/RemoteGrpcCoordinator.cs index cd1ad8f..de56a39 100644 --- a/src/EllieBot/_common/Impl/RemoteGrpcCoordinator.cs +++ b/src/EllieBot/Services/Impl/RemoteGrpcCoordinator.cs @@ -11,7 +11,7 @@ public class RemoteGrpcCoordinator : ICoordinator, IReadyExecutor private readonly Coordinator.Coordinator.CoordinatorClient _coordClient; private readonly DiscordSocketClient _client; - public RemoteGrpcCoordinator(IBotCreds creds, DiscordSocketClient client) + public RemoteGrpcCoordinator(IBotCredentials creds, DiscordSocketClient client) { var coordUrl = string.IsNullOrWhiteSpace(creds.CoordinatorUrl) ? "http://localhost:3442" : creds.CoordinatorUrl; @@ -90,7 +90,8 @@ public class RemoteGrpcCoordinator : ICoordinator, IReadyExecutor { if (!gracefulImminent) { - Log.Warning(ex, "Hearbeat failed and graceful shutdown was not expected: {Message}", + Log.Warning(ex, + "Hearbeat failed and graceful shutdown was not expected: {Message}", ex.Message); break; } diff --git a/src/EllieBot/Services/SvcExtensions.cs b/src/EllieBot/Services/SvcExtensions.cs deleted file mode 100644 index c60b77d..0000000 --- a/src/EllieBot/Services/SvcExtensions.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Grpc.Core; - -namespace EllieBot.GrpcApi; - -public static class SvcExtensions -{ - public static ulong GetUserId(this Metadata meta) - => ulong.Parse(meta.FirstOrDefault(x => x.Key == "userid")!.Value); -} \ No newline at end of file diff --git a/src/EllieBot/_common/Abstractions/Extensions/EnumerableExtensions.cs b/src/EllieBot/_common/Abstractions/Extensions/EnumerableExtensions.cs index 1ebec24..3cedd0e 100644 --- a/src/EllieBot/_common/Abstractions/Extensions/EnumerableExtensions.cs +++ b/src/EllieBot/_common/Abstractions/Extensions/EnumerableExtensions.cs @@ -71,22 +71,6 @@ public static class EnumerableExtensions this IEnumerable> dict) where TKey : notnull => new(dict); - - /// - /// Initializes a new instance of the class - /// that contains elements copied from the specified - /// has the default concurrency level, has the default initial capacity, - /// and uses the default comparer for the key type. - /// - /// - /// The whose elements are copied to the new - /// . - /// - /// A new instance of the class - public static ConcurrentHashSet ToConcurrentSet( - this IReadOnlyCollection dict) - where TValue : notnull - => new(dict); public static IndexedCollection ToIndexed(this IEnumerable enumerable) where T : class, IIndexed diff --git a/src/EllieBot/_common/Abstractions/Extensions/StringExtensions.cs b/src/EllieBot/_common/Abstractions/Extensions/StringExtensions.cs index 2515e45..c96f74a 100644 --- a/src/EllieBot/_common/Abstractions/Extensions/StringExtensions.cs +++ b/src/EllieBot/_common/Abstractions/Extensions/StringExtensions.cs @@ -82,14 +82,14 @@ public static class StringExtensions // Step 3 for (var i = 1; i <= n; i++) //Step 4 - for (var j = 1; j <= m; j++) - { - // Step 5 - var cost = t[j - 1] == s[i - 1] ? 0 : 1; + for (var j = 1; j <= m; j++) + { + // Step 5 + var cost = t[j - 1] == s[i - 1] ? 0 : 1; - // Step 6 - d[i, j] = Math.Min(Math.Min(d[i - 1, j] + 1, d[i, j - 1] + 1), d[i - 1, j - 1] + cost); - } + // Step 6 + d[i, j] = Math.Min(Math.Min(d[i - 1, j] + 1, d[i, j - 1] + 1), d[i - 1, j - 1] + cost); + } // Step 7 return d[n, m]; @@ -147,5 +147,5 @@ public static class StringExtensions var newString = str.UnescapeUnicodeCodePoint(); return newString; }); - + } \ No newline at end of file diff --git a/src/EllieBot/_common/Abstractions/Helpers/LogSetup.cs b/src/EllieBot/_common/Abstractions/Helpers/LogSetup.cs index 3d4edec..8983740 100644 --- a/src/EllieBot/_common/Abstractions/Helpers/LogSetup.cs +++ b/src/EllieBot/_common/Abstractions/Helpers/LogSetup.cs @@ -6,9 +6,9 @@ namespace Ellie.Common; public static class LogSetup { - public static void SetupLogger(object source, IBotCreds creds) + public static void SetupLogger(object source) { - var config = new LoggerConfiguration().MinimumLevel.Override("Microsoft", LogEventLevel.Information) + Log.Logger = new LoggerConfiguration().MinimumLevel.Override("Microsoft", LogEventLevel.Information) .MinimumLevel.Override("System", LogEventLevel.Information) .MinimumLevel.Override("Microsoft.AspNetCore", LogEventLevel.Warning) .Enrich.FromLogContext() @@ -16,13 +16,8 @@ public static class LogSetup theme: GetTheme(), outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] | #{LogSource} | {Message:lj}{NewLine}{Exception}") - .Enrich.WithProperty("LogSource", source); - - if (!string.IsNullOrWhiteSpace(creds.Seq.Url)) - config = config.WriteTo.Seq(creds.Seq.Url, apiKey: creds.Seq.ApiKey); - - Log.Logger = config - .CreateLogger(); + .Enrich.WithProperty("LogSource", source) + .CreateLogger(); Console.OutputEncoding = Encoding.UTF8; } diff --git a/src/EllieBot/_common/Abstractions/Kwum.cs b/src/EllieBot/_common/Abstractions/Kwum.cs index ad3768e..267d38b 100644 --- a/src/EllieBot/_common/Abstractions/Kwum.cs +++ b/src/EllieBot/_common/Abstractions/Kwum.cs @@ -76,9 +76,6 @@ public readonly struct kwum : IEquatable public override string ToString() { - if (_value == 0) - return VALID_CHARACTERS[0].ToString(); - var count = VALID_CHARACTERS.Length; var localValue = _value; var arrSize = (int)Math.Log(localValue, count) + 1; diff --git a/src/EllieBot/_common/Abstractions/creds/IBotCreds.cs b/src/EllieBot/_common/Abstractions/creds/IBotCredentials.cs similarity index 94% rename from src/EllieBot/_common/Abstractions/creds/IBotCreds.cs rename to src/EllieBot/_common/Abstractions/creds/IBotCredentials.cs index 83d19b2..faeae4f 100644 --- a/src/EllieBot/_common/Abstractions/creds/IBotCreds.cs +++ b/src/EllieBot/_common/Abstractions/creds/IBotCredentials.cs @@ -1,7 +1,7 @@ #nullable disable namespace EllieBot; -public interface IBotCreds +public interface IBotCredentials { string Token { get; } string EllieAiToken { get; } @@ -29,8 +29,6 @@ public interface IBotCreds string TwitchClientSecret { get; set; } GoogleApiConfig Google { get; set; } BotCacheImplemenation BotCache { get; set; } - Creds.GrpcApiConfig GrpcApi { get; set; } - SeqConfig Seq { get; set; } } public interface IVotesSettings diff --git a/src/EllieBot/_common/Abstractions/creds/IBotCredsProvider.cs b/src/EllieBot/_common/Abstractions/creds/IBotCredsProvider.cs index bb39339..ecc90f0 100644 --- a/src/EllieBot/_common/Abstractions/creds/IBotCredsProvider.cs +++ b/src/EllieBot/_common/Abstractions/creds/IBotCredsProvider.cs @@ -3,6 +3,6 @@ public interface IBotCredsProvider { public void Reload(); - public IBotCreds GetCreds(); - public void ModifyCredsFile(Action func); + public IBotCredentials GetCreds(); + public void ModifyCredsFile(Action func); } \ No newline at end of file diff --git a/src/EllieBot/_common/Abstractions/strings/CommandStrings.cs b/src/EllieBot/_common/Abstractions/strings/CommandStrings.cs index 64efd85..77f16be 100644 --- a/src/EllieBot/_common/Abstractions/strings/CommandStrings.cs +++ b/src/EllieBot/_common/Abstractions/strings/CommandStrings.cs @@ -31,5 +31,5 @@ public sealed record class CommandStringParam // public string Type { get; set; } [YamlMember(Alias = "desc", ScalarStyle = ScalarStyle.DoubleQuoted)] - public string Desc{ get; set; } + public string Desc { get; set; } } \ No newline at end of file diff --git a/src/EllieBot/_common/Attributes/CmdAttribute.cs b/src/EllieBot/_common/Attributes/CmdAttribute.cs index b778c7d..363348c 100644 --- a/src/EllieBot/_common/Attributes/CmdAttribute.cs +++ b/src/EllieBot/_common/Attributes/CmdAttribute.cs @@ -15,4 +15,4 @@ public sealed class CmdAttribute : CommandAttribute Remarks = memberName.ToLowerInvariant(); Summary = memberName.ToLowerInvariant(); } -} +} \ No newline at end of file diff --git a/src/EllieBot/_common/Attributes/NoPublicBotAttribute.cs b/src/EllieBot/_common/Attributes/NoPublicBotAttribute.cs index 183fee5..2ce8ccc 100644 --- a/src/EllieBot/_common/Attributes/NoPublicBotAttribute.cs +++ b/src/EllieBot/_common/Attributes/NoPublicBotAttribute.cs @@ -1,4 +1,6 @@ #nullable disable +using System.Diagnostics.CodeAnalysis; + namespace EllieBot.Common; [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)] @@ -10,7 +12,7 @@ public sealed class NoPublicBotAttribute : PreconditionAttribute IServiceProvider services) { #if GLOBAL_ELLIE - return Task.FromResult(PreconditionResult.FromError("Not available on the public bot. To learn how to selfhost a private bot, click [here](https://docs.elliebot.net).")); + return Task.FromResult(PreconditionResult.FromError("Not available on the public bot. To learn how to selfhost a private bot, click [here](https://docs.elliebot.net/ellie/).")); #else return Task.FromResult(PreconditionResult.FromSuccess()); #endif diff --git a/src/EllieBot/_common/Configs/BotConfig.cs b/src/EllieBot/_common/Configs/BotConfig.cs index 1f691ed..0908577 100644 --- a/src/EllieBot/_common/Configs/BotConfig.cs +++ b/src/EllieBot/_common/Configs/BotConfig.cs @@ -12,7 +12,7 @@ namespace EllieBot.Common.Configs; public sealed partial class BotConfig : ICloneable { [Comment("""DO NOT CHANGE""")] - public int Version { get; set; } = 8; + public int Version { get; set; } = 7; [Comment(""" Most commands, when executed, have a small colored line @@ -28,7 +28,7 @@ public sealed partial class BotConfig : ICloneable public CultureInfo DefaultLocale { get; set; } [Comment(""" - Style in which executed commands will show up in the logs. + Style in which executed commands will show up in the console. Allowed values: Simple, Normal, None """)] public ConsoleOutputType ConsoleOutputType { get; set; } @@ -84,6 +84,19 @@ public sealed partial class BotConfig : ICloneable [Comment("""Which string will be used to recognize the commands""")] public string Prefix { get; set; } + [Comment(""" + Toggles whether your bot will group greet/bye messages into a single message every 5 seconds. + 1st user who joins will get greeted immediately + If more users join within the next 5 seconds, they will be greeted in groups of 5. + This will cause %user.mention% and other placeholders to be replaced with multiple users. + Keep in mind this might break some of your embeds - for example if you have %user.avatar% in the thumbnail, + it will become invalid, as it will resolve to a list of avatars of grouped users. + note: This setting is primarily used if you're afraid of raids, or you're running medium/large bots where some + servers might get hundreds of people join at once. This is used to prevent the bot from getting ratelimited, + and (slightly) reduce the greet spam in those servers. + """)] + public bool GroupGreets { get; set; } + [Comment(""" Whether the bot will rotate through all specified statuses. This setting can be changed via .ropl command. @@ -116,7 +129,7 @@ public sealed partial class BotConfig : ICloneable }, { "name": "List of all Commands", - "value": "https://commands.elliebot.net", + "value": "https://commands.elliebot.net/", "inline": false }, { @@ -131,6 +144,7 @@ public sealed partial class BotConfig : ICloneable Blocked = blocked; Prefix = "."; RotateStatuses = false; + GroupGreets = false; DmHelpTextKeywords = [ "help", @@ -193,4 +207,4 @@ public enum ConsoleOutputType Normal = 0, Simple = 1, None = 2 -} +} \ No newline at end of file diff --git a/src/EllieBot/_common/Creds.cs b/src/EllieBot/_common/Creds.cs index deaf3fd..295b1de 100644 --- a/src/EllieBot/_common/Creds.cs +++ b/src/EllieBot/_common/Creds.cs @@ -1,33 +1,32 @@ -#nullable disable +#nullable disable using EllieBot.Common.Yml; namespace EllieBot.Common; -public sealed class Creds : IBotCreds +public sealed class Creds : IBotCredentials { [Comment("""DO NOT CHANGE""")] - public int Version { get; set; } = 13; + public int Version { get; set; } [Comment("""Bot token. Do not share with anyone ever -> https://discordapp.com/developers/applications/""")] public string Token { get; set; } [Comment(""" - List of Ids of the users who have bot owner permissions - **DO NOT ADD PEOPLE YOU DON'T TRUST** - """)] + List of Ids of the users who have bot owner permissions + **DO NOT ADD PEOPLE YOU DON'T TRUST** + """)] public ICollection OwnerIds { get; set; } - - [Comment( - "Keep this on 'true' unless you're sure your bot shouldn't use privileged intents or you're waiting to be accepted")] + + [Comment("Keep this on 'true' unless you're sure your bot shouldn't use privileged intents or you're waiting to be accepted")] public bool UsePrivilegedIntents { get; set; } [Comment(""" - The number of shards that the bot will be running on. - Leave at 1 if you don't know what you're doing. - - note: If you are planning to have more than one shard, then you must change botCache to 'redis'. - Also, in that case you should be using EllieBot.Coordinator to start the bot, and it will correctly override this value. - """)] + The number of shards that the bot will be running on. + Leave at 1 if you don't know what you're doing. + + note: If you are planning to have more than one shard, then you must change botCache to 'redis'. + Also, in that case you should be using EllieBot.Coordinator to start the bot, and it will correctly override this value. + """)] public int TotalShards { get; set; } [Comment(""" @@ -36,37 +35,36 @@ public sealed class Creds : IBotCreds Go to the Keys page and click "Generate New Key" and copy it here You and anyone else with the permission to run `.prompt` command will be able to use natural language to run bot's commands. For example '@Bot how's the weather in Paris' will return the current weather in Paris as if you were to run `.weather Paris` command. - ⚠ This does not currently work and is a work in progress. """)] public string EllieAiToken { get; set; } - - [Comment( + + [Comment( """ - Login to https://console.cloud.google.com, create a new project, go to APIs & Services -> Library -> YouTube Data API and enable it. - Then, go to APIs and Services -> Credentials and click Create credentials -> API key. - Used only for Youtube Data Api (at the moment). - """)] + Login to https://console.cloud.google.com, create a new project, go to APIs & Services -> Library -> YouTube Data API and enable it. + Then, go to APIs and Services -> Credentials and click Create credentials -> API key. + Used only for Youtube Data Api (at the moment). + """)] public string GoogleApiKey { get; set; } - - [Comment( + + [Comment( """ - Create a new custom search here https://programmablesearchengine.google.com/cse/create/new - Enable SafeSearch - Remove all Sites to Search - Enable Search the entire web - Copy the 'Search Engine ID' to the SearchId field - - Do all steps again but enable image search for the ImageSearchId - """)] + Create a new custom search here https://programmablesearchengine.google.com/cse/create/new + Enable SafeSearch + Remove all Sites to Search + Enable Search the entire web + Copy the 'Search Engine ID' to the SearchId field + + Do all steps again but enable image search for the ImageSearchId + """)] public GoogleApiConfig Google { get; set; } [Comment("""Settings for voting system for discordbots. Meant for use on global Ellie.""")] public VotesSettings Votes { get; set; } [Comment(""" - Patreon auto reward system settings. - go to https://www.patreon.com/portal -> my clients -> create client - """)] + Patreon auto reward system settings. + go to https://www.patreon.com/portal -> my clients -> create client + """)] public PatreonSettings Patreon { get; set; } [Comment("""Api key for sending stats to DiscordBotList.""")] @@ -77,27 +75,27 @@ public sealed class Creds : IBotCreds [Comment(@"OpenAi api key.")] public string Gpt3ApiKey { get; set; } - + [Comment(""" - Which cache implementation should bot use. - 'memory' - Cache will be in memory of the bot's process itself. Only use this on bots with a single shard. When the bot is restarted the cache is reset. - 'redis' - Uses redis (which needs to be separately downloaded and installed). The cache will persist through bot restarts. You can configure connection string in creds.yml - """)] + Which cache implementation should bot use. + 'memory' - Cache will be in memory of the bot's process itself. Only use this on bots with a single shard. When the bot is restarted the cache is reset. + 'redis' - Uses redis (which needs to be separately downloaded and installed). The cache will persist through bot restarts. You can configure connection string in creds.yml + """)] public BotCacheImplemenation BotCache { get; set; } - + [Comment(""" - Redis connection string. Don't change if you don't know what you're doing. - Only used if botCache is set to 'redis' - """)] + Redis connection string. Don't change if you don't know what you're doing. + Only used if botCache is set to 'redis' + """)] public string RedisOptions { get; set; } [Comment("""Database options. Don't change if you don't know what you're doing. Leave null for default values""")] public DbOptions Db { get; set; } [Comment(""" - Address and port of the coordinator endpoint. Leave empty for default. - Change only if you've changed the coordinator address or port. - """)] + Address and port of the coordinator endpoint. Leave empty for default. + Change only if you've changed the coordinator address or port. + """)] public string CoordinatorUrl { get; set; } [Comment( @@ -105,34 +103,34 @@ public sealed class Creds : IBotCreds public string RapidApiKey { get; set; } [Comment(""" - https://locationiq.com api key (register and you will receive the token in the email). - Used only for .time command. - """)] + https://locationiq.com api key (register and you will receive the token in the email). + Used only for .time command. + """)] public string LocationIqApiKey { get; set; } [Comment(""" - https://timezonedb.com api key (register and you will receive the token in the email). - Used only for .time command - """)] + https://timezonedb.com api key (register and you will receive the token in the email). + Used only for .time command + """)] public string TimezoneDbApiKey { get; set; } [Comment(""" - https://pro.coinmarketcap.com/account/ api key. There is a free plan for personal use. - Used for cryptocurrency related commands. - """)] + https://pro.coinmarketcap.com/account/ api key. There is a free plan for personal use. + Used for cryptocurrency related commands. + """)] public string CoinmarketcapApiKey { get; set; } - - // [Comment(@"https://polygon.io/dashboard/api-keys api key. Free plan allows for 5 queries per minute. - // Used for stocks related commands.")] - // public string PolygonIoApiKey { get; set; } + +// [Comment(@"https://polygon.io/dashboard/api-keys api key. Free plan allows for 5 queries per minute. +// Used for stocks related commands.")] +// public string PolygonIoApiKey { get; set; } [Comment("""Api key used for Osu related commands. Obtain this key at https://osu.ppy.sh/p/api""")] public string OsuApiKey { get; set; } [Comment(""" - Optional Trovo client id. - You should use this if Trovo stream notifications stopped working or you're getting ratelimit errors. - """)] + Optional Trovo client id. + You should use this if Trovo stream notifications stopped working or you're getting ratelimit errors. + """)] public string TrovoClientId { get; set; } [Comment("""Obtain by creating an application at https://dev.twitch.tv/console/apps""")] @@ -142,35 +140,23 @@ public sealed class Creds : IBotCreds public string TwitchClientSecret { get; set; } [Comment(""" - Command and args which will be used to restart the bot. - Only used if bot is executed directly (NOT through the coordinator) - placeholders: - {0} -> shard id - {1} -> total shards - Linux default - cmd: dotnet - args: "EllieBot.dll -- {0}" - Windows default - cmd: EllieBot.exe - args: "{0}" - """)] + Command and args which will be used to restart the bot. + Only used if bot is executed directly (NOT through the coordinator) + placeholders: + {0} -> shard id + {1} -> total shards + Linux default + cmd: dotnet + args: "EllieBot.dll -- {0}" + Windows default + cmd: EllieBot.exe + args: "{0}" + """)] public RestartConfig RestartCommand { get; set; } - - [Comment(""" - Settings for the grpc api. - We don't provide support for this. - If you leave certPath empty, the api will run on http. - """)] - public GrpcApiConfig GrpcApi { get; set; } - - [Comment(""" - Url and api key to a seq server. If url is set, bot will try to send logs to it. - """)] - public SeqConfig Seq { get; set; } - public Creds() { + Version = 9; Token = string.Empty; UsePrivilegedIntents = true; OwnerIds = new List(); @@ -193,27 +179,24 @@ public sealed class Creds : IBotCreds RestartCommand = new RestartConfig(); Google = new GoogleApiConfig(); - - GrpcApi = new(); - Seq = new(); } - + public class DbOptions : IDbOptions { [Comment(""" - Database type. "sqlite", "mysql" and "postgresql" are supported. - Default is "sqlite" - """)] + Database type. "sqlite", "mysql" and "postgresql" are supported. + Default is "sqlite" + """)] public string Type { get; set; } [Comment(""" - Database connection string. - You MUST change this if you're not using "sqlite" type. - Default is "Data Source=data/EllieBot.db" - Example for mysql: "Server=localhost;Port=3306;Uid=root;Pwd=my_super_secret_mysql_password;Database=ellie" - Example for postgresql: "Server=localhost;Port=5432;User Id=postgres;Password=my_super_secret_postgres_password;Database=ellie;" - """)] + Database connection string. + You MUST change this if you're not using "sqlite" type. + Default is "Data Source=data/EllieBot.db" + Example for mysql: "Server=localhost;Port=3306;Uid=root;Pwd=my_super_secret_mysql_password;Database=ellie" + Example for postgresql: "Server=localhost;Port=5432;User Id=postgres;Password=my_super_secret_postgres_password;Database=ellie;" + """)] public string ConnectionString { get; set; } } @@ -248,29 +231,29 @@ public sealed class Creds : IBotCreds public sealed record VotesSettings : IVotesSettings { [Comment(""" - top.gg votes service url - This is the url of your instance of the EllieBot.Votes api - Example: https://votes.my.cool.bot.com - """)] + top.gg votes service url + This is the url of your instance of the EllieBot.Votes api + Example: https://votes.my.cool.bot.com + """)] public string TopggServiceUrl { get; set; } [Comment(""" - Authorization header value sent to the TopGG service url with each request - This should be equivalent to the TopggKey in your EllieBot.Votes api appsettings.json file - """)] + Authorization header value sent to the TopGG service url with each request + This should be equivalent to the TopggKey in your EllieBot.Votes api appsettings.json file + """)] public string TopggKey { get; set; } [Comment(""" - discords.com votes service url - This is the url of your instance of the EllieBot.Votes api - Example: https://votes.my.cool.bot.com - """)] + discords.com votes service url + This is the url of your instance of the EllieBot.Votes api + Example: https://votes.my.cool.bot.com + """)] public string DiscordsServiceUrl { get; set; } [Comment(""" - Authorization header value sent to the Discords service url with each request - This should be equivalent to the DiscordsKey in your EllieBot.Votes api appsettings.json file - """)] + Authorization header value sent to the Discords service url with each request + This should be equivalent to the DiscordsKey in your EllieBot.Votes api appsettings.json file + """)] public string DiscordsKey { get; set; } public VotesSettings() @@ -289,25 +272,13 @@ public sealed class Creds : IBotCreds DiscordsKey = discordsKey; } } - - public sealed record GrpcApiConfig - { - public bool Enabled { get; set; } = false; - public string CertChain { get; set; } = string.Empty; - public string CertPrivateKey { get; set; } = string.Empty; - public string Host { get; set; } = "localhost"; - public int Port { get; set; } = 43120; - } -} - -public sealed class SeqConfig -{ - public string Url { get; init; } - public string ApiKey { get; init; } } public class GoogleApiConfig : IGoogleApiConfig { public string SearchId { get; init; } public string ImageSearchId { get; init; } -} \ No newline at end of file +} + + + diff --git a/src/EllieBot/_common/Currency/ICurrencyService.cs b/src/EllieBot/_common/Currency/ICurrencyService.cs index 4fe8b5c..35e8273 100644 --- a/src/EllieBot/_common/Currency/ICurrencyService.cs +++ b/src/EllieBot/_common/Currency/ICurrencyService.cs @@ -40,11 +40,4 @@ public interface ICurrencyService TxData? txData); Task> GetTopRichest(ulong ignoreId, int page = 0, int perPage = 9); - - Task> GetTransactionsAsync( - ulong userId, - int page, - int perPage = 15); - - Task GetTransactionsCountAsync(ulong userId); } \ No newline at end of file diff --git a/src/EllieBot/_common/Currency/ITxTracker.cs b/src/EllieBot/_common/Currency/ITxTracker.cs index 6324901..d7cad66 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(ulong userId, long amount, TxData? txData); - Task TrackRemove(ulong userId, long amount, TxData? txData); + Task TrackAdd(long amount, TxData? txData); + Task TrackRemove(long amount, TxData? txData); } \ No newline at end of file diff --git a/src/EllieBot/_common/DbService.cs b/src/EllieBot/_common/DbService.cs index 089c1c2..46d2016 100644 --- a/src/EllieBot/_common/DbService.cs +++ b/src/EllieBot/_common/DbService.cs @@ -1,5 +1,4 @@ #nullable disable - using Microsoft.EntityFrameworkCore; namespace EllieBot.Services; diff --git a/src/EllieBot/_common/DownloadTracker.cs b/src/EllieBot/_common/DownloadTracker.cs index e780fb6..b886228 100644 --- a/src/EllieBot/_common/DownloadTracker.cs +++ b/src/EllieBot/_common/DownloadTracker.cs @@ -14,7 +14,6 @@ public class DownloadTracker : IEService public async Task EnsureUsersDownloadedAsync(IGuild guild) { #if GLOBAL_ELLIE - await Task.CompletedTask; return; #endif await _downloadUsersSemaphore.WaitAsync(); diff --git a/src/EllieBot/_common/EllieTypeReader.cs b/src/EllieBot/_common/EllieTypeReader.cs index f14aa1e..bab013e 100644 --- a/src/EllieBot/_common/EllieTypeReader.cs +++ b/src/EllieBot/_common/EllieTypeReader.cs @@ -1,5 +1,4 @@ #nullable disable - namespace EllieBot.Common.TypeReaders; [MeansImplicitUse(ImplicitUseTargetFlags.Default | ImplicitUseTargetFlags.WithInheritors)] diff --git a/src/EllieBot/_common/Gambling/Slot/SlotGame.cs b/src/EllieBot/_common/Gambling/Slot/SlotGame.cs index 7e4f69f..83e92eb 100644 --- a/src/EllieBot/_common/Gambling/Slot/SlotGame.cs +++ b/src/EllieBot/_common/Gambling/Slot/SlotGame.cs @@ -11,9 +11,9 @@ public class SlotGame { var rolls = new[] { - (byte)_rng.Next(0, 7), - (byte)_rng.Next(0, 7), - (byte)_rng.Next(0, 7) + (byte)_rng.Next(0, 6), + (byte)_rng.Next(0, 6), + (byte)_rng.Next(0, 6) }; ref var a = ref rolls[0]; @@ -24,24 +24,24 @@ public class SlotGame var winType = SlotWinType.None; if (a == b && b == c) { - if (a == 6) + if (a == 5) { winType = SlotWinType.TrippleJoker; - multi = 25; + multi = 30; } else { winType = SlotWinType.TrippleNormal; - multi = 15; + multi = 10; } } - else if (a == 6 && (b == 6 || c == 6) - || (b == 6 && c == 6)) + else if (a == 5 && (b == 5 || c == 5) + || (b == 5 && c == 5)) { winType = SlotWinType.DoubleJoker; - multi = 6; + multi = 4; } - else if (a == 6 || b == 6 || c == 6) + else if (a == 5 || b == 5 || c == 5) { winType = SlotWinType.SingleJoker; multi = 1; diff --git a/src/EllieBot/_common/ImageUrls.cs b/src/EllieBot/_common/ImageUrls.cs index 401803a..5dc9557 100644 --- a/src/EllieBot/_common/ImageUrls.cs +++ b/src/EllieBot/_common/ImageUrls.cs @@ -8,11 +8,12 @@ namespace EllieBot.Common; public partial class ImageUrls : ICloneable { [Comment("DO NOT CHANGE")] - public int Version { get; set; } = 6; + public int Version { get; set; } = 4; public CoinData Coins { get; set; } public Uri[] Currency { get; set; } public Uri[] Dice { get; set; } + public RategirlData Rategirl { get; set; } public XpData Xp { get; set; } public SlotData Slots { get; set; } @@ -29,6 +30,12 @@ public partial class ImageUrls : ICloneable public Uri[] Tails { get; set; } } + public class RategirlData + { + public Uri Matrix { get; set; } + public Uri Dot { get; set; } + } + public class XpData { public Uri Bg { get; set; } diff --git a/src/EllieBot/_common/Interaction/EllieInteraction.cs b/src/EllieBot/_common/Interaction/EllieInteraction.cs index 0206599..3a24470 100644 --- a/src/EllieBot/_common/Interaction/EllieInteraction.cs +++ b/src/EllieBot/_common/Interaction/EllieInteraction.cs @@ -70,7 +70,7 @@ public abstract class EllieInteractionBase { if (_singleUse) _interactionCompletedSource.TrySetResult(true); - + await ExecuteOnActionAsync(smc); if (!smc.HasResponded) diff --git a/src/EllieBot/_common/Interaction/IEllieInteractionService.cs b/src/EllieBot/_common/Interaction/IEllieInteractionService.cs index 26adc74..093e4bd 100644 --- a/src/EllieBot/_common/Interaction/IEllieInteractionService.cs +++ b/src/EllieBot/_common/Interaction/IEllieInteractionService.cs @@ -29,5 +29,4 @@ public interface IEllieInteractionService ModalBuilder modal, Func onTrigger, bool singleUse = true); - } \ No newline at end of file diff --git a/src/EllieBot/_common/Interaction/Models/EllieButtonInteraction.cs b/src/EllieBot/_common/Interaction/Models/EllieButtonInteraction.cs index 676ab5d..0a80839 100644 --- a/src/EllieBot/_common/Interaction/Models/EllieButtonInteraction.cs +++ b/src/EllieBot/_common/Interaction/Models/EllieButtonInteraction.cs @@ -19,5 +19,4 @@ public sealed class EllieButtonInteractionHandler : EllieInteractionBase public override void AddTo(ComponentBuilder cb) => cb.WithButton(Button); - } \ No newline at end of file diff --git a/src/EllieBot/_common/JsonConverters/CultureInfoConverter.cs b/src/EllieBot/_common/JsonConverters/CultureInfoConverter.cs index 969a416..0c26f15 100644 --- a/src/EllieBot/_common/JsonConverters/CultureInfoConverter.cs +++ b/src/EllieBot/_common/JsonConverters/CultureInfoConverter.cs @@ -11,4 +11,4 @@ public class CultureInfoConverter : JsonConverter public override void Write(Utf8JsonWriter writer, CultureInfo value, JsonSerializerOptions options) => writer.WriteStringValue(value.Name); -} +} \ No newline at end of file diff --git a/src/EllieBot/_common/JsonConverters/Rgba32Converter.cs b/src/EllieBot/_common/JsonConverters/Rgba32Converter.cs index 4b2a313..906db1e 100644 --- a/src/EllieBot/_common/JsonConverters/Rgba32Converter.cs +++ b/src/EllieBot/_common/JsonConverters/Rgba32Converter.cs @@ -7,7 +7,7 @@ namespace EllieBot.Common.JsonConverters; public class Rgba32Converter : JsonConverter { public override Rgba32 Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - => Rgba32.ParseHex(reader.GetString()!); + => Rgba32.ParseHex(reader.GetString()); public override void Write(Utf8JsonWriter writer, Rgba32 value, JsonSerializerOptions options) => writer.WriteStringValue(value.ToHex()); diff --git a/src/EllieBot/_common/Linq2DbExpressions.cs b/src/EllieBot/_common/Linq2DbExpressions.cs index baa1f74..53c90e6 100644 --- a/src/EllieBot/_common/Linq2DbExpressions.cs +++ b/src/EllieBot/_common/Linq2DbExpressions.cs @@ -1,6 +1,5 @@ #nullable disable using LinqToDB; -using Microsoft.EntityFrameworkCore; using System.Linq.Expressions; namespace EllieBot.Common; diff --git a/src/EllieBot/_common/Marmalade/Common/MarmaladeIoCKernelModule.cs b/src/EllieBot/_common/Marmalade/Common/MarmaladeIoCKernelModule.cs index 3b9c450..e55ddff 100644 --- a/src/EllieBot/_common/Marmalade/Common/MarmaladeIoCKernelModule.cs +++ b/src/EllieBot/_common/Marmalade/Common/MarmaladeIoCKernelModule.cs @@ -34,7 +34,7 @@ public sealed class MarmaladeNinjectIocModule : IIocModule, IDisposable if (isLoaded) return; - foreach (var (type, _) in _types) + foreach (var (type, data) in _types) { var attribute = type.GetCustomAttribute()!; diff --git a/src/EllieBot/_common/Marmalade/Common/MarmaladeLoaderService.cs b/src/EllieBot/_common/Marmalade/Common/MarmaladeLoaderService.cs index 06bebb5..a17e05a 100644 --- a/src/EllieBot/_common/Marmalade/Common/MarmaladeLoaderService.cs +++ b/src/EllieBot/_common/Marmalade/Common/MarmaladeLoaderService.cs @@ -250,7 +250,6 @@ public sealed class MarmaladeLoaderService : IMarmaladeLoaderService, IReadyExec } catch (Exception ex) when (ex is FileNotFoundException or BadImageFormatException) { - Log.Error(ex, "An error occurred loading a marmalade"); return MarmaladeLoadResult.NotFound; } catch (Exception ex) @@ -331,38 +330,27 @@ public sealed class MarmaladeLoaderService : IMarmaladeLoaderService, IReadyExec throw new FileNotFoundException($"Marmalade dll not found: {path}"); strings = MarmaladeStrings.CreateDefault(dir); - var ctx = new MarmaladeAssemblyLoadContext(path); + var ctx = new MarmaladeAssemblyLoadContext(Path.GetDirectoryName(path)!); var a = ctx.LoadFromAssemblyPath(Path.GetFullPath(path)); - // ctx.LoadDependencies(a); + ctx.LoadDependencies(a); - iocModule = null; // load services - try + iocModule = new MarmaladeNinjectIocModule(_cont, a, safeName); + iocModule.Load(); + + var sis = LoadCanariesFromAssembly(safeName, a); + typeReaders = LoadTypeReadersFromAssembly(a, strings); + + if (sis.Count == 0) { - iocModule = new MarmaladeNinjectIocModule(_cont, a, safeName); - iocModule.Load(); - - var sis = LoadCanariesFromAssembly(safeName, a); - typeReaders = LoadTypeReadersFromAssembly(a, strings); - - if (sis.Count == 0) - { - iocModule.Unload(); - ctx.Unload(); - return false; - } - - ctxWr = new(ctx); - canaryData = sis; - - return true; - } - catch - { - iocModule?.Unload(); - ctx.Unload(); - throw; + iocModule.Unload(); + return false; } + + ctxWr = new(ctx); + canaryData = sis; + + return true; } private static readonly Type _paramParserType = typeof(ParamParser<>); diff --git a/src/EllieBot/_common/Marmalade/Common/Models/CanaryCommandData.cs b/src/EllieBot/_common/Marmalade/Common/Models/CanaryCommandData.cs index cc5ab35..8244576 100644 --- a/src/EllieBot/_common/Marmalade/Common/Models/CanaryCommandData.cs +++ b/src/EllieBot/_common/Marmalade/Common/Models/CanaryCommandData.cs @@ -1,4 +1,5 @@ -using System.Reflection; +using EllieBot.Marmalade; +using System.Reflection; namespace EllieBot.Marmalade; diff --git a/src/EllieBot/_common/ModuleBehaviors/IExecPostCommand.cs b/src/EllieBot/_common/ModuleBehaviors/IExecPostCommand.cs index bad88f8..b97f584 100644 --- a/src/EllieBot/_common/ModuleBehaviors/IExecPostCommand.cs +++ b/src/EllieBot/_common/ModuleBehaviors/IExecPostCommand.cs @@ -3,7 +3,7 @@ namespace EllieBot.Common.ModuleBehaviors; /// /// This interface's method is executed after the command successfully finished execution. /// ***There is no support for this method in EllieBot services.*** -/// It is only meant to be used in medusa system +/// It is only meant to be used in marmalade system /// public interface IExecPostCommand : IBehavior { diff --git a/src/EllieBot/_common/DryIocExtensions.cs b/src/EllieBot/_common/NinjectIKernelExtensions.cs similarity index 80% rename from src/EllieBot/_common/DryIocExtensions.cs rename to src/EllieBot/_common/NinjectIKernelExtensions.cs index c7d8c2a..5b5b909 100644 --- a/src/EllieBot/_common/DryIocExtensions.cs +++ b/src/EllieBot/_common/NinjectIKernelExtensions.cs @@ -20,6 +20,14 @@ public static class DryIocExtensions return container; } + public static IContainer AddSingleton(this IContainer container, Func factory) + where TImpl : TSvc + { + container.RegisterDelegate(factory, Reuse.Singleton); + + return container; + } + public static IContainer AddSingleton(this IContainer container) { container.Register(Reuse.Singleton); diff --git a/src/EllieBot/_common/Patronage/IPatronageService.cs b/src/EllieBot/_common/Patronage/IPatronageService.cs index 379de6b..650bf06 100644 --- a/src/EllieBot/_common/Patronage/IPatronageService.cs +++ b/src/EllieBot/_common/Patronage/IPatronageService.cs @@ -1,4 +1,7 @@ -namespace EllieBot.Modules.Patronage; +using EllieBot.Db.Models; +using OneOf; + +namespace EllieBot.Modules.Patronage; /// /// Manages patrons and provides access to their data diff --git a/src/EllieBot/_common/Patronage/QuotaLimit.cs b/src/EllieBot/_common/Patronage/QuotaLimit.cs index 5669c0c..ed2cae9 100644 --- a/src/EllieBot/_common/Patronage/QuotaLimit.cs +++ b/src/EllieBot/_common/Patronage/QuotaLimit.cs @@ -1,4 +1,6 @@ -namespace EllieBot.Modules.Patronage; +using EllieBot.Db.Models; + +namespace EllieBot.Modules.Patronage; /// /// Represents information about why the user has triggered a quota limit diff --git a/src/EllieBot/_common/Replacements/Impl/ReplacementContext.cs b/src/EllieBot/_common/Replacements/Impl/ReplacementContext.cs index 4e87ce9..b321941 100644 --- a/src/EllieBot/_common/Replacements/Impl/ReplacementContext.cs +++ b/src/EllieBot/_common/Replacements/Impl/ReplacementContext.cs @@ -7,7 +7,7 @@ public sealed class ReplacementContext public DiscordSocketClient? Client { get; } public IGuild? Guild { get; } public IMessageChannel? Channel { get; } - public IUser? User { get; } + public IUser[]? Users { get; } private readonly List _overrides = new(); private readonly HashSet _tokens = new(); @@ -21,11 +21,10 @@ public sealed class ReplacementContext public IReadOnlyList RegexOverrides => _regexOverrides.AsReadOnly(); - public ReplacementContext(ICommandContext cmdContext) - : this(cmdContext.Client as DiscordSocketClient, - cmdContext.Guild, - cmdContext.Channel, - cmdContext.User) + public ReplacementContext(ICommandContext cmdContext) : this(cmdContext.Client as DiscordSocketClient, + cmdContext.Guild, + cmdContext.Channel, + cmdContext.User) { } @@ -33,12 +32,12 @@ public sealed class ReplacementContext DiscordSocketClient? client = null, IGuild? guild = null, IMessageChannel? channel = null, - IUser? user = null) + params IUser[]? users) { Client = client; Guild = guild; Channel = channel; - User = user; + Users = users; } public ReplacementContext WithOverride(string key, Func> repFactory) @@ -54,6 +53,7 @@ public sealed class ReplacementContext public ReplacementContext WithOverride(string key, Func repFactory) => WithOverride(key, () => new ValueTask(repFactory())); + public ReplacementContext WithOverride(Regex regex, Func> repFactory) { if (_regexPatterns.Add(regex.ToString())) diff --git a/src/EllieBot/_common/Replacements/Impl/ReplacementRegistrator.default.cs b/src/EllieBot/_common/Replacements/Impl/ReplacementRegistrator.default.cs index 0d8e43f..d42bba6 100644 --- a/src/EllieBot/_common/Replacements/Impl/ReplacementRegistrator.default.cs +++ b/src/EllieBot/_common/Replacements/Impl/ReplacementRegistrator.default.cs @@ -12,11 +12,7 @@ public sealed partial class ReplacementPatternStore { Register("%bot.time%", static () - => TimestampTag.FromDateTime(DateTime.UtcNow, TimestampTagStyles.ShortTime).ToString()); - - Register("%bot.date%", - static () - => TimestampTag.FromDateTime(DateTime.UtcNow, TimestampTagStyles.ShortTime).ToString()); + => DateTime.Now.ToString("HH:mm " + TimeZoneInfo.Local.StandardName.GetInitials())); } private void WithClient() @@ -65,20 +61,6 @@ public sealed partial class ReplacementPatternStore private void WithUsers() { - Register("%user%", static (IUser user) => user.Mention); - Register("%user.mention%", static (IUser user) => user.Mention); - Register("%user.fullname%", static (IUser user) => user.ToString()!); - Register("%user.name%", static (IUser user) => user.Username); - Register("%user.displayname%", static (IUser user) => user is IGuildUser gu ? gu.DisplayName : user.Username); - Register("%user.discrim%", static (IUser user) => user.Discriminator); - Register("%user.avatar%", static (IUser user) => user.RealAvatarUrl().ToString()); - Register("%user.id%", static (IUser user) => user.Id.ToString()); - Register("%user.created_time%", static (IUser user) => user.CreatedAt.ToString("HH:mm")); - Register("%user.created_date%", static (IUser user) => user.CreatedAt.ToString("dd.MM.yyyy")); - Register("%user.joined_time%", static (IGuildUser user) => user.JoinedAt?.ToString("HH:mm") ?? "??:??"); - Register("%user.joined_date%", - static (IGuildUser user) => user.JoinedAt?.ToString("dd.MM.yyyy") ?? "??.??.????"); - Register("%user%", static (IUser[] users) => string.Join(" ", users.Select(user => user.Mention))); Register("%user.mention%", diff --git a/src/EllieBot/_common/Replacements/Impl/ReplacementService.cs b/src/EllieBot/_common/Replacements/Impl/ReplacementService.cs index 18712d8..4d17213 100644 --- a/src/EllieBot/_common/Replacements/Impl/ReplacementService.cs +++ b/src/EllieBot/_common/Replacements/Impl/ReplacementService.cs @@ -40,8 +40,8 @@ public sealed class ReplacementService : IReplacementService, IEService if (repCtx.Guild is not null) obj.Add(repCtx.Guild); - if (repCtx.User is not null) - obj.Add(repCtx.User); + if (repCtx.Users is not null) + obj.Add(repCtx.Users); if (repCtx.Channel is not null) obj.Add(repCtx.Channel); @@ -86,9 +86,9 @@ public sealed class ReplacementService : IReplacementService, IEService objs.Add(repCtx.Channel); } - if (repCtx.User is not null) + if (repCtx.Users is not null) { - objs.Add(repCtx.User); + objs.Add(repCtx.Users); } if (repCtx.Guild is not null) @@ -117,9 +117,9 @@ public sealed class ReplacementService : IReplacementService, IEService objs.Add(repCtx.Channel); } - if (repCtx.User is not null) + if (repCtx.Users is not null) { - objs.Add(repCtx.User); + objs.Add(repCtx.Users); } if (repCtx.Guild is not null) diff --git a/src/EllieBot/_common/Replacements/Impl/Replacer.cs b/src/EllieBot/_common/Replacements/Impl/Replacer.cs index adc5e4d..9b43331 100644 --- a/src/EllieBot/_common/Replacements/Impl/Replacer.cs +++ b/src/EllieBot/_common/Replacements/Impl/Replacer.cs @@ -9,8 +9,8 @@ public sealed partial class Replacer private readonly IEnumerable _regexReps; private readonly object[] _inputData; - // [GeneratedRegex(@"\%[\p{L}\p{N}\._]*[\p{L}\p{N}]+[\p{L}\p{N}\._]*\%")] - // private static partial Regex TokenExtractionRegex(); + [GeneratedRegex(@"\%[\p{L}\p{N}\._]*[\p{L}\p{N}]+[\p{L}\p{N}\._]*\%")] + private static partial Regex TokenExtractionRegex(); public Replacer(IEnumerable reps, IEnumerable regexReps, object[] inputData) { @@ -24,19 +24,19 @@ public sealed partial class Replacer if (string.IsNullOrWhiteSpace(input)) return input; - // var matches = TokenExtractionRegex().IsMatch(input); + var matches = TokenExtractionRegex().IsMatch(input); - // if (matches) - // { - foreach (var rep in _reps) + if (matches) { - if (input.Contains(rep.Token, StringComparison.InvariantCulture)) + foreach (var rep in _reps) { - var objs = GetParams(rep.InputTypes); - input = input.Replace(rep.Token, await rep.GetValueAsync(objs), StringComparison.InvariantCulture); + if (input.Contains(rep.Token, StringComparison.InvariantCulture)) + { + var objs = GetParams(rep.InputTypes); + input = input.Replace(rep.Token, await rep.GetValueAsync(objs), StringComparison.InvariantCulture); + } } } - // } foreach (var rep in _regexReps) { @@ -47,7 +47,7 @@ public sealed partial class Replacer if (match.Success) { sb.Append(input, 0, match.Index) - .Append(await rep.GetValueAsync(match, objs)); + .Append(await rep.GetValueAsync(match, objs)); var lastIndex = match.Index + match.Length; sb.Append(input, lastIndex, input.Length - lastIndex); @@ -91,18 +91,16 @@ public sealed partial class Replacer => new() { Embeds = await embedArr.Embeds.Map(async e => await ReplaceAsync(e) with - { - Color = e.Color - }) - .WhenAll(), + { + Color = e.Color + }).WhenAll(), Content = await ReplaceAsync(embedArr.Content) }; private async ValueTask ReplaceAsync(SmartPlainText plain) => await ReplaceAsync(plain.Text); - private async Task ReplaceAsync(T embedData) - where T : SmartEmbedTextBase, new() + private async Task ReplaceAsync(T embedData) where T : SmartEmbedTextBase, new() { var newEmbedData = new T { @@ -119,14 +117,13 @@ public sealed partial class Replacer IconUrl = await ReplaceAsync(embedData.Author.IconUrl) }, Fields = await Task.WhenAll(embedData - .Fields? - .Map(async f => new SmartTextEmbedField - { - Name = await ReplaceAsync(f.Name), - Value = await ReplaceAsync(f.Value), - Inline = f.Inline - }) - ?? []), + .Fields? + .Map(async f => new SmartTextEmbedField + { + Name = await ReplaceAsync(f.Name), + Value = await ReplaceAsync(f.Value), + Inline = f.Inline + }) ?? []), Footer = embedData.Footer is null ? null : new() diff --git a/src/EllieBot/_common/Sender/MessageSenderService.cs b/src/EllieBot/_common/Sender/MessageSenderService.cs index 88f1c40..f91f1ab 100644 --- a/src/EllieBot/_common/Sender/MessageSenderService.cs +++ b/src/EllieBot/_common/Sender/MessageSenderService.cs @@ -1,4 +1,5 @@ using EllieBot.Common.Configs; +using System.Diagnostics.CodeAnalysis; namespace EllieBot.Extensions; diff --git a/src/EllieBot/_common/Sender/ResponseBuilder.cs b/src/EllieBot/_common/Sender/ResponseBuilder.cs index f209770..60783de 100644 --- a/src/EllieBot/_common/Sender/ResponseBuilder.cs +++ b/src/EllieBot/_common/Sender/ResponseBuilder.cs @@ -1,4 +1,6 @@ -using System.Collections.ObjectModel; +using EllieBot.Common.Configs; +using EllieBot.Db.Models; +using System.Collections.ObjectModel; namespace EllieBot.Extensions; @@ -287,9 +289,9 @@ public sealed partial class ResponseBuilder return this; } - public ResponseBuilder UserBasedMentions(IGuildUser? permUser = null) + public ResponseBuilder UserBasedMentions() { - sanitizeMentions = !((InternalResolveUser() as IGuildUser ?? permUser)?.GuildPermissions.MentionEveryone ?? false); + sanitizeMentions = !((InternalResolveUser() as IGuildUser)?.GuildPermissions.MentionEveryone ?? false); return this; } diff --git a/src/EllieBot/_common/ServiceCollectionExtensions.cs b/src/EllieBot/_common/ServiceCollectionExtensions.cs index 2326ebb..3a59226 100644 --- a/src/EllieBot/_common/ServiceCollectionExtensions.cs +++ b/src/EllieBot/_common/ServiceCollectionExtensions.cs @@ -51,9 +51,7 @@ public static class ServiceCollectionExtensions svcs.RegisterMany(Reuse.Singleton); svcs.AddSingleton(); - svcs.AddSingleton(); - svcs.AddSingleton(); - svcs.AddSingleton(); + svcs.AddSingleton(); svcs.AddSingleton(); svcs.AddSingleton(); svcs.AddSingleton(); @@ -61,7 +59,7 @@ public static class ServiceCollectionExtensions return svcs; } - public static IContainer AddCache(this IContainer cont, IBotCreds creds) + public static IContainer AddCache(this IContainer cont, IBotCredentials creds) { if (creds.BotCache == BotCacheImplemenation.Redis) { diff --git a/src/EllieBot/_common/Services/CommandHandler.cs b/src/EllieBot/_common/Services/CommandHandler.cs index a9c81a1..2061b29 100644 --- a/src/EllieBot/_common/Services/CommandHandler.cs +++ b/src/EllieBot/_common/Services/CommandHandler.cs @@ -1,6 +1,7 @@ #nullable disable using EllieBot.Common.Configs; using EllieBot.Common.ModuleBehaviors; +using EllieBot.Db; using ExecuteResult = Discord.Commands.ExecuteResult; using PreconditionResult = Discord.Commands.PreconditionResult; @@ -165,7 +166,7 @@ public class CommandHandler : IEService, IReadyExecutor, ICommandHandler Log.Information("Succ | g:{GuildId} | c: {ChannelId} | u: {UserId} | msg: {Message}", channel?.Guild.Id.ToString() ?? "-", channel?.Id.ToString() ?? "-", - usrMsg.Author.Id.ToString(), + usrMsg.Author.Id, usrMsg.Content.TrimTo(10)); } diff --git a/src/EllieBot/_common/Services/Currency/CurrencyService.cs b/src/EllieBot/_common/Services/Currency/CurrencyService.cs index 974febd..9cb4037 100644 --- a/src/EllieBot/_common/Services/Currency/CurrencyService.cs +++ b/src/EllieBot/_common/Services/Currency/CurrencyService.cs @@ -1,6 +1,7 @@ #nullable disable using LinqToDB; using LinqToDB.EntityFrameworkCore; +using EllieBot.Db; using EllieBot.Db.Models; using EllieBot.Services.Currency; @@ -55,14 +56,14 @@ public sealed class CurrencyService : ICurrencyService, IEService { await using var ctx = _db.GetDbContext(); await ctx - .GetTable() - .Where(x => userIds.Contains(x.UserId)) - .UpdateAsync(du => new() - { - CurrencyAmount = du.CurrencyAmount >= amount - ? du.CurrencyAmount - amount - : 0 - }); + .GetTable() + .Where(x => userIds.Contains(x.UserId)) + .UpdateAsync(du => new() + { + CurrencyAmount = du.CurrencyAmount >= amount + ? du.CurrencyAmount - amount + : 0 + }); await ctx.SaveChangesAsync(); return; } @@ -77,7 +78,7 @@ public sealed class CurrencyService : ICurrencyService, IEService { var wallet = await GetWalletAsync(userId); await wallet.Add(amount, txData); - await _txTracker.TrackAdd(userId, amount, txData); + await _txTracker.TrackAdd(amount, txData); } public async Task AddAsync( @@ -97,7 +98,7 @@ public sealed class CurrencyService : ICurrencyService, IEService var wallet = await GetWalletAsync(userId); var result = await wallet.Take(amount, txData); if (result) - await _txTracker.TrackRemove(userId, amount, txData); + await _txTracker.TrackRemove(amount, txData); return result; } @@ -112,29 +113,4 @@ public sealed class CurrencyService : ICurrencyService, IEService await using var uow = _db.GetDbContext(); return await uow.Set().GetTopRichest(ignoreId, page, perPage); } - - public async Task> GetTransactionsAsync( - ulong userId, - int page, - int perPage = 15) - { - await using var uow = _db.GetDbContext(); - - var trs = await uow.GetTable() - .Where(x => x.UserId == userId) - .OrderByDescending(x => x.DateAdded) - .Skip(perPage * page) - .Take(perPage) - .ToListAsyncLinqToDB(); - - return trs; - } - - public async Task GetTransactionsCountAsync(ulong userId) - { - await using var uow = _db.GetDbContext(); - return await uow.GetTable() - .Where(x => x.UserId == userId) - .CountAsyncLinqToDB(); - } } \ No newline at end of file diff --git a/src/EllieBot/_common/Services/Currency/DefaultWallet.cs b/src/EllieBot/_common/Services/Currency/DefaultWallet.cs index 1021e40..a556985 100644 --- a/src/EllieBot/_common/Services/Currency/DefaultWallet.cs +++ b/src/EllieBot/_common/Services/Currency/DefaultWallet.cs @@ -77,7 +77,8 @@ public class DefaultWallet : IWallet .InsertOrUpdateAsync(() => new() { UserId = userId, - Username = "??Unknown", + Username = "Unknown", + Discriminator = "????", CurrencyAmount = amount, }, (old) => new() diff --git a/src/EllieBot/_common/Services/Currency/GamblingTxTracker.cs b/src/EllieBot/_common/Services/Currency/GamblingTxTracker.cs index 5a40474..5751281 100644 --- a/src/EllieBot/_common/Services/Currency/GamblingTxTracker.cs +++ b/src/EllieBot/_common/Services/Currency/GamblingTxTracker.cs @@ -1,11 +1,8 @@ using LinqToDB; -using LinqToDB.Data; using LinqToDB.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; using EllieBot.Services.Currency; using EllieBot.Db.Models; -using EllieBot.Modules.Gambling; -using System.Collections.Concurrent; namespace EllieBot.Services; @@ -13,11 +10,15 @@ 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 NonBlocking.ConcurrentDictionary globalStats = new(); - private ConcurrentBag userStats = new(); + private ConcurrentDictionary _stats = new(); private readonly DbService _db; @@ -27,333 +28,83 @@ 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 { - // update betstats - var keys = globalStats.Keys; + var keys = _stats.Keys; foreach (var key in keys) { - if (globalStats.TryRemove(key, out var stat)) + if (_stats.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 betstats gambling tx tracker"); + Log.Error(ex, "An error occurred in gambling tx tracker"); + } + finally + { + await trans.CommitAsync(); } } } - 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; - - // rakeback - var rakebacks = new Dictionary(); - - // update userstats - 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), - }))) - { - rakebacks.TryAdd(k.UserId, 0m); - rakebacks[k.UserId] += x.TotalBet * GetHouseEdge(k.Game) * BASE_RAKEBACK; - - - // 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 - }); - } - - foreach (var (k, v) in rakebacks) - { - await _db.GetDbContext() - .GetTable() - .InsertOrUpdateAsync(() => new() - { - UserId = k, - Amount = v - }, - (old) => new() - { - Amount = old.Amount + v - }, - () => new() - { - UserId = k - }); - } - } - catch (Exception ex) - { - Log.Error(ex, "An error occurred in UserBetStats gambling tx tracker"); - } - } - } - - private const decimal BASE_RAKEBACK = 0.05m; - - public Task TrackAdd(ulong userId, long amount, TxData? txData) + public Task TrackAdd(long amount, TxData? txData) { if (txData is null) return Task.CompletedTask; - + if (_gamblingTypes.Contains(txData.Type)) { - globalStats.AddOrUpdate(txData.Type, + _stats.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(ulong userId, long amount, TxData? txData) + public Task TrackRemove(long amount, TxData? txData) { if (txData is null) return Task.CompletedTask; - + if (_gamblingTypes.Contains(txData.Type)) { - globalStats.AddOrUpdate(txData.Type, + _stats.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 decimal GetHouseEdge(GamblingGame game) - => game switch - { - GamblingGame.Betflip => 0.025m, - GamblingGame.Betroll => 0.04m, - GamblingGame.Betdraw => 0.04m, - GamblingGame.Slots => 0.034m, - GamblingGame.Blackjack => 0.02m, - GamblingGame.Lula => 0.025m, - GamblingGame.Race => 0.06m, - _ => 0 - }; - - -} - -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 -} - -public sealed class Rakeback -{ - public ulong UserId { get; set; } - public decimal Amount { get; set; } } \ No newline at end of file diff --git a/src/EllieBot/_common/Services/IGoogleApiService.cs b/src/EllieBot/_common/Services/IGoogleApiService.cs index d9fa0c7..856bd51 100644 --- a/src/EllieBot/_common/Services/IGoogleApiService.cs +++ b/src/EllieBot/_common/Services/IGoogleApiService.cs @@ -5,7 +5,7 @@ public interface IGoogleApiService { IReadOnlyDictionary Languages { get; } - Task> GetVideoLinksByKeywordAsync(string keywords, int count = 1); + Task> GetVideoLinksByKeywordAsync(string keywords, int count = 1); Task> GetVideoInfosByKeywordAsync(string keywords, int count = 1); Task> GetPlaylistIdsByKeywordsAsync(string keywords, int count = 1); Task> GetRelatedVideosAsync(string id, int count = 1, string user = null); diff --git a/src/EllieBot/_common/Services/IStatsService.cs b/src/EllieBot/_common/Services/IStatsService.cs index 3f73495..3dee0a6 100644 --- a/src/EllieBot/_common/Services/IStatsService.cs +++ b/src/EllieBot/_common/Services/IStatsService.cs @@ -49,8 +49,8 @@ public interface IStatsService /// double GetPrivateMemoryMegabytes(); - GuildInfo GetGuildInfoAsync(string name); - Task GetGuildInfoAsync(ulong id); + GuildInfo GetGuildInfo(string name); + GuildInfo GetGuildInfo(ulong id); } public record struct GuildInfo diff --git a/src/EllieBot/_common/Services/Impl/BlacklistService.cs b/src/EllieBot/_common/Services/Impl/BlacklistService.cs index 6655149..ac01491 100644 --- a/src/EllieBot/_common/Services/Impl/BlacklistService.cs +++ b/src/EllieBot/_common/Services/Impl/BlacklistService.cs @@ -4,127 +4,80 @@ using LinqToDB.Data; using LinqToDB.EntityFrameworkCore; using EllieBot.Common.ModuleBehaviors; using EllieBot.Db.Models; -using System.Collections.Frozen; namespace EllieBot.Modules.Permissions.Services; -public sealed class BlacklistService : IExecOnMessage, IReadyExecutor +public sealed class BlacklistService : IExecOnMessage { public int Priority => int.MaxValue; private readonly DbService _db; private readonly IPubSub _pubSub; - private readonly IBotCreds _creds; - private readonly DiscordSocketClient _client; + private readonly IBotCredentials _creds; + private IReadOnlyList blacklist; - private FrozenSet blacklistedGuilds = new HashSet().ToFrozenSet(); - private FrozenSet blacklistedUsers = new HashSet().ToFrozenSet(); - private FrozenSet blacklistedChannels = new HashSet().ToFrozenSet(); + private readonly TypedKey _blPubKey = new("blacklist.reload"); - private readonly TypedKey _blPubKey = new("blacklist.reload"); - - public BlacklistService( - DbService db, - IPubSub pubSub, - IBotCreds creds, - DiscordSocketClient client) + public BlacklistService(DbService db, IPubSub pubSub, IBotCredentials creds) { _db = db; _pubSub = pubSub; _creds = creds; - _client = client; - _pubSub.Sub(_blPubKey, async _ => await Reload(false)); - } - - public async Task OnReadyAsync() - { - _client.JoinedGuild += async (g) => - { - if (blacklistedGuilds.Contains(g.Id)) - { - await g.LeaveAsync(); - } - }; - - await Reload(false); + Reload(false); + _pubSub.Sub(_blPubKey, OnReload); } private ValueTask OnReload(BlacklistEntry[] newBlacklist) { - if (newBlacklist is null) - return default; - - blacklistedGuilds = - new HashSet(newBlacklist.Where(x => x.Type == BlacklistType.Server).Select(x => x.ItemId)) - .ToFrozenSet(); - blacklistedChannels = - new HashSet(newBlacklist.Where(x => x.Type == BlacklistType.Channel).Select(x => x.ItemId)) - .ToFrozenSet(); - blacklistedUsers = - new HashSet(newBlacklist.Where(x => x.Type == BlacklistType.User).Select(x => x.ItemId)) - .ToFrozenSet(); - + blacklist = newBlacklist; return default; } public Task ExecOnMessageAsync(IGuild guild, IUserMessage usrMsg) { - if (blacklistedGuilds.Contains(guild.Id)) + foreach (var bl in blacklist) { - Log.Information("Blocked input from blacklisted guild: {GuildName} [{GuildId}]", - guild.Name, - guild.Id.ToString()); - return Task.FromResult(true); - } + if (guild is not null && bl.Type == BlacklistType.Server && bl.ItemId == guild.Id) + { + Log.Information("Blocked input from blacklisted guild: {GuildName} [{GuildId}]", guild.Name, guild.Id); - if (blacklistedChannels.Contains(usrMsg.Channel.Id)) - { - Log.Information("Blocked input from blacklisted channel: {ChannelName} [{ChannelId}]", - usrMsg.Channel.Name, - usrMsg.Channel.Id.ToString()); - } + return Task.FromResult(true); + } + if (bl.Type == BlacklistType.Channel && bl.ItemId == usrMsg.Channel.Id) + { + Log.Information("Blocked input from blacklisted channel: {ChannelName} [{ChannelId}]", + usrMsg.Channel.Name, + usrMsg.Channel.Id); - if (blacklistedUsers.Contains(usrMsg.Author.Id)) - { - Log.Information("Blocked input from blacklisted user: {UserName} [{UserId}]", - usrMsg.Author.ToString(), - usrMsg.Author.Id.ToString()); - return Task.FromResult(true); + return Task.FromResult(true); + } + + if (bl.Type == BlacklistType.User && bl.ItemId == usrMsg.Author.Id) + { + Log.Information("Blocked input from blacklisted user: {UserName} [{UserId}]", + usrMsg.Author.ToString(), + usrMsg.Author.Id); + + return Task.FromResult(true); + } } return Task.FromResult(false); } - public async Task> GetBlacklist(BlacklistType type) + public IReadOnlyList GetBlacklist() + => blacklist; + + public void Reload(bool publish = true) { - await using var uow = _db.GetDbContext(); - - return await uow - .GetTable() - .Where(x => x.Type == type) - .ToListAsync(); - } - - public async Task Reload(bool publish = true) - { - var totalShards = _creds.TotalShards; - await using var uow = _db.GetDbContext(); - var items = uow.GetTable() - .Where(x => x.Type != BlacklistType.Server - || (x.Type == BlacklistType.Server - && Linq2DbExpressions.GuildOnShard(x.ItemId, totalShards, _client.ShardId))) - .ToArray(); - - + using var uow = _db.GetDbContext(); + var toPublish = uow.GetTable().ToArray(); + blacklist = toPublish; if (publish) - { - await _pubSub.Pub(_blPubKey, true); - } - - await OnReload(items); + _pubSub.Pub(_blPubKey, toPublish); } public async Task Blacklist(BlacklistType type, ulong id) @@ -135,34 +88,34 @@ public sealed class BlacklistService : IExecOnMessage, IReadyExecutor await using var uow = _db.GetDbContext(); await uow - .GetTable() - .InsertAsync(() => new() - { - ItemId = id, - Type = type, - }); + .GetTable() + .InsertAsync(() => new() + { + ItemId = id, + Type = type, + }); if (type == BlacklistType.User) { await uow.GetTable() - .Where(x => x.UserId == id) - .UpdateAsync(_ => new() - { - CurrencyAmount = 0 - }); + .Where(x => x.UserId == id) + .UpdateAsync(_ => new() + { + CurrencyAmount = 0 + }); } - await Reload(); + Reload(); } public async Task UnBlacklist(BlacklistType type, ulong id) { await using var uow = _db.GetDbContext(); await uow.GetTable() - .Where(bi => bi.ItemId == id && bi.Type == type) - .DeleteAsync(); + .Where(bi => bi.ItemId == id && bi.Type == type) + .DeleteAsync(); - await Reload(); + Reload(); } public async Task BlacklistUsers(IReadOnlyCollection toBlacklist) @@ -177,12 +130,12 @@ public sealed class BlacklistService : IExecOnMessage, IReadyExecutor var blList = toBlacklist.ToList(); await uow.GetTable() - .Where(x => blList.Contains(x.UserId)) - .UpdateAsync(_ => new() - { - CurrencyAmount = 0 - }); + .Where(x => blList.Contains(x.UserId)) + .UpdateAsync(_ => new() + { + CurrencyAmount = 0 + }); - await Reload(); + Reload(); } } \ No newline at end of file diff --git a/src/EllieBot/_common/Services/Impl/IImageCache.cs b/src/EllieBot/_common/Services/Impl/IImageCache.cs index 5a7e01c..890eeea 100644 --- a/src/EllieBot/_common/Services/Impl/IImageCache.cs +++ b/src/EllieBot/_common/Services/Impl/IImageCache.cs @@ -6,6 +6,8 @@ public interface IImageCache Task GetTailsImageAsync(); Task GetCurrencyImageAsync(); Task GetXpBackgroundImageAsync(); + Task GetRategirlBgAsync(); + Task GetRategirlDotAsync(); Task GetDiceAsync(int num); Task GetSlotEmojiAsync(int number); Task GetSlotBgAsync(); diff --git a/src/EllieBot/_common/Services/Impl/ImagesConfig.cs b/src/EllieBot/_common/Services/Impl/ImagesConfig.cs index c36c20a..821d717 100644 --- a/src/EllieBot/_common/Services/Impl/ImagesConfig.cs +++ b/src/EllieBot/_common/Services/Impl/ImagesConfig.cs @@ -15,34 +15,5 @@ public sealed class ImagesConfig : ConfigServiceBase public ImagesConfig(IConfigSeria serializer, IPubSub pubSub) : base(PATH, serializer, pubSub, _changeKey) { - Migrate(); - } - - private void Migrate() - { - if (data.Version < 5) - { - ModifyConfig(c => - { - c.Version = 5; - }); - } - - if (data.Version < 6) - { - ModifyConfig(c => - { - if (c.Slots.Emojis?.Length == 6) - { - c.Slots.Emojis = - [ - new("https://cdn.nadeko.bot/slots/15.png"), - ..c.Slots.Emojis - ]; - } - - c.Version = 6; - }); - } } } \ No newline at end of file diff --git a/src/EllieBot/_common/Services/Impl/SingleProcessCoordinator.cs b/src/EllieBot/_common/Services/Impl/SingleProcessCoordinator.cs index ffa5323..0784fc7 100644 --- a/src/EllieBot/_common/Services/Impl/SingleProcessCoordinator.cs +++ b/src/EllieBot/_common/Services/Impl/SingleProcessCoordinator.cs @@ -5,10 +5,10 @@ namespace EllieBot.Services; public class SingleProcessCoordinator : ICoordinator { - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly DiscordSocketClient _client; - public SingleProcessCoordinator(IBotCreds creds, DiscordSocketClient client) + public SingleProcessCoordinator(IBotCredentials creds, DiscordSocketClient client) { _creds = creds; _client = client; diff --git a/src/EllieBot/_common/Services/Impl/StatsService.cs b/src/EllieBot/_common/Services/Impl/StatsService.cs index ea80362..ef7ea80 100644 --- a/src/EllieBot/_common/Services/Impl/StatsService.cs +++ b/src/EllieBot/_common/Services/Impl/StatsService.cs @@ -29,7 +29,7 @@ public sealed class StatsService : IStatsService, IReadyExecutor, IEService private readonly Process _currentProcess = Process.GetCurrentProcess(); private readonly DiscordSocketClient _client; - private readonly IBotCreds _creds; + private readonly IBotCredentials _creds; private readonly DateTime _started; private long textChannels; @@ -42,7 +42,7 @@ public sealed class StatsService : IStatsService, IReadyExecutor, IEService public StatsService( DiscordSocketClient client, CommandHandler cmdHandler, - IBotCreds creds, + IBotCredentials creds, IHttpClientFactory factory) { _client = client; @@ -55,60 +55,76 @@ public sealed class StatsService : IStatsService, IReadyExecutor, IEService _client.ChannelCreated += c => { - if (c is IVoiceChannel) - Interlocked.Increment(ref voiceChannels); - else if (c is ITextChannel) - Interlocked.Increment(ref textChannels); + _ = Task.Run(() => + { + if (c is ITextChannel) + Interlocked.Increment(ref textChannels); + else if (c is IVoiceChannel) + Interlocked.Increment(ref voiceChannels); + }); return Task.CompletedTask; }; _client.ChannelDestroyed += c => { - if (c is IVoiceChannel) - Interlocked.Decrement(ref voiceChannels); - else if (c is ITextChannel) - Interlocked.Decrement(ref textChannels); + _ = Task.Run(() => + { + if (c is ITextChannel) + Interlocked.Decrement(ref textChannels); + else if (c is IVoiceChannel) + Interlocked.Decrement(ref voiceChannels); + }); return Task.CompletedTask; }; _client.GuildAvailable += g => { - var tc = g.Channels.Count(cx => cx is ITextChannel and not IVoiceChannel); - var vc = g.Channels.Count(cx => cx is IVoiceChannel); - Interlocked.Add(ref textChannels, tc); - Interlocked.Add(ref voiceChannels, vc); - + _ = Task.Run(() => + { + var tc = g.Channels.Count(cx => cx is ITextChannel); + var vc = g.Channels.Count - tc; + Interlocked.Add(ref textChannels, tc); + Interlocked.Add(ref voiceChannels, vc); + }); return Task.CompletedTask; }; _client.JoinedGuild += g => { - var tc = g.Channels.Count(cx => cx is ITextChannel and not IVoiceChannel); - var vc = g.Channels.Count(cx => cx is IVoiceChannel); - Interlocked.Add(ref textChannels, tc); - Interlocked.Add(ref voiceChannels, vc); - + _ = Task.Run(() => + { + var tc = g.Channels.Count(cx => cx is ITextChannel); + var vc = g.Channels.Count - tc; + Interlocked.Add(ref textChannels, tc); + Interlocked.Add(ref voiceChannels, vc); + }); return Task.CompletedTask; }; _client.GuildUnavailable += g => { - var tc = g.Channels.Count(cx => cx is ITextChannel and not IVoiceChannel); - var vc = g.Channels.Count(cx => cx is IVoiceChannel); - Interlocked.Add(ref textChannels, -tc); - Interlocked.Add(ref voiceChannels, -vc); + _ = Task.Run(() => + { + var tc = g.Channels.Count(cx => cx is ITextChannel); + var vc = g.Channels.Count - tc; + Interlocked.Add(ref textChannels, -tc); + Interlocked.Add(ref voiceChannels, -vc); + }); return Task.CompletedTask; }; _client.LeftGuild += g => { - var tc = g.Channels.Count(cx => cx is ITextChannel and not IVoiceChannel); - var vc = g.Channels.Count(cx => cx is IVoiceChannel); - Interlocked.Add(ref textChannels, -tc); - Interlocked.Add(ref voiceChannels, -vc); + _ = Task.Run(() => + { + var tc = g.Channels.Count(cx => cx is ITextChannel); + var vc = g.Channels.Count - tc; + Interlocked.Add(ref textChannels, -tc); + Interlocked.Add(ref voiceChannels, -vc); + }); return Task.CompletedTask; }; @@ -117,7 +133,7 @@ public sealed class StatsService : IStatsService, IReadyExecutor, IEService private void InitializeChannelCount() { var guilds = _client.Guilds; - textChannels = guilds.Sum(static g => g.Channels.Count(static cx => cx is ITextChannel and not IVoiceChannel)); + textChannels = guilds.Sum(static g => g.Channels.Count(static cx => cx is ITextChannel)); voiceChannels = guilds.Sum(static g => g.Channels.Count(static cx => cx is IVoiceChannel)); } @@ -161,39 +177,38 @@ public sealed class StatsService : IStatsService, IReadyExecutor, IEService public string GetUptimeString(string separator = ", ") { var time = GetUptime(); - + if (time.Days > 0) return $"{time.Days}d {time.Hours}h {time.Minutes}m"; - + if (time.Hours > 0) return $"{time.Hours}h {time.Minutes}m"; - + if (time.Minutes > 0) return $"{time.Minutes}m {time.Seconds}s"; - + return $"{time.Seconds}s"; } - + public double GetPrivateMemoryMegabytes() { _currentProcess.Refresh(); return _currentProcess.PrivateMemorySize64 / 1.Megabytes(); } - public GuildInfo GetGuildInfoAsync(string name) + public GuildInfo GetGuildInfo(string name) => throw new NotImplementedException(); - public async Task GetGuildInfoAsync(ulong id) + public GuildInfo GetGuildInfo(ulong id) { var g = _client.GetGuild(id); - var ig = (IGuild)g; - + return new GuildInfo() { Id = g.Id, IconUrl = g.IconUrl, Name = g.Name, - Owner = (await ig.GetUserAsync(g.OwnerId))?.Username ?? "??Unknown", + Owner = g.Owner.Username, OwnerId = g.OwnerId, CreatedAt = g.CreatedAt.UtcDateTime, VoiceChannels = g.VoiceChannels.Count, @@ -204,4 +219,4 @@ public sealed class StatsService : IStatsService, IReadyExecutor, IEService MemberCount = g.MemberCount, }; } -} \ No newline at end of file +} diff --git a/src/EllieBot/_common/Services/Impl/YtdlOperation.cs b/src/EllieBot/_common/Services/Impl/YtdlOperation.cs index 4100265..3813b80 100644 --- a/src/EllieBot/_common/Services/Impl/YtdlOperation.cs +++ b/src/EllieBot/_common/Services/Impl/YtdlOperation.cs @@ -8,10 +8,12 @@ namespace EllieBot.Services; public class YtdlOperation { private readonly string _baseArgString; + private readonly bool _isYtDlp; - public YtdlOperation(string baseArgString) + public YtdlOperation(string baseArgString, bool isYtDlp = false) { _baseArgString = baseArgString; + _isYtDlp = isYtDlp; } private Process CreateProcess(string[] args) @@ -21,7 +23,7 @@ public class YtdlOperation { StartInfo = new() { - FileName = "yt-dlp", + FileName = _isYtDlp ? "yt-dlp" : "youtube-dl", Arguments = string.Format(_baseArgString, newArgs), UseShellExecute = false, RedirectStandardError = true, @@ -45,18 +47,18 @@ public class YtdlOperation var str = await process.StandardOutput.ReadToEndAsync(); var err = await process.StandardError.ReadToEndAsync(); if (!string.IsNullOrEmpty(err)) - Log.Warning("yt-dlp warning: {YtdlWarning}", err); + Log.Warning("YTDL warning: {YtdlWarning}", err); return str; } catch (Win32Exception) { - Log.Error("yt-dlp is likely not installed. Please install it before running the command again"); + Log.Error("youtube-dl is likely not installed. Please install it before running the command again"); return default; } catch (Exception ex) { - Log.Error(ex, "Exception running yt-dlp: {ErrorMessage}", ex.Message); + Log.Error(ex, "Exception running youtube-dl: {ErrorMessage}", ex.Message); return default; } } diff --git a/src/EllieBot/_common/Settings/BotConfigService.cs b/src/EllieBot/_common/Settings/BotConfigService.cs index 5e98049..477f080 100644 --- a/src/EllieBot/_common/Settings/BotConfigService.cs +++ b/src/EllieBot/_common/Settings/BotConfigService.cs @@ -69,11 +69,5 @@ public sealed class BotConfigService : ConfigServiceBase c.Version = 7; c.IgnoreOtherBots = true; }); - - if(data.Version < 8) - ModifyConfig(c => - { - c.Version = 8; - }); } } \ No newline at end of file diff --git a/src/EllieBot/_common/SmartText/SmartEmbedText.cs b/src/EllieBot/_common/SmartText/SmartEmbedText.cs index d06e72b..b52c0cb 100644 --- a/src/EllieBot/_common/SmartText/SmartEmbedText.cs +++ b/src/EllieBot/_common/SmartText/SmartEmbedText.cs @@ -69,7 +69,6 @@ public abstract record SmartEmbedTextBase : SmartText => !string.IsNullOrWhiteSpace(Title) || !string.IsNullOrWhiteSpace(Description) || !string.IsNullOrWhiteSpace(Url) - || !string.IsNullOrWhiteSpace(Author?.Name) || !string.IsNullOrWhiteSpace(Thumbnail) || !string.IsNullOrWhiteSpace(Image) || (Footer is not null diff --git a/src/EllieBot/_common/TypeReaders/Models/StoopidTime.cs b/src/EllieBot/_common/TypeReaders/Models/StoopidTime.cs index 0c5eca9..08c69b8 100644 --- a/src/EllieBot/_common/TypeReaders/Models/StoopidTime.cs +++ b/src/EllieBot/_common/TypeReaders/Models/StoopidTime.cs @@ -52,14 +52,4 @@ public class StoopidTime Time = ts }; } - - public static implicit operator TimeSpan(StoopidTime st) - => st.Time; - - public static implicit operator StoopidTime(TimeSpan ts) - => new() - { - Input = ts.ToString(), - Time = ts - }; } \ No newline at end of file diff --git a/src/EllieBot/_common/_Extensions/BotCredentialsExtensions.cs b/src/EllieBot/_common/_Extensions/BotCredentialsExtensions.cs index 0166335..890bab3 100644 --- a/src/EllieBot/_common/_Extensions/BotCredentialsExtensions.cs +++ b/src/EllieBot/_common/_Extensions/BotCredentialsExtensions.cs @@ -2,9 +2,9 @@ namespace EllieBot.Extensions; public static class BotCredentialsExtensions { - public static bool IsOwner(this IBotCreds creds, IUser user) + public static bool IsOwner(this IBotCredentials creds, IUser user) => creds.IsOwner(user.Id); - public static bool IsOwner(this IBotCreds creds, ulong userId) + public static bool IsOwner(this IBotCredentials creds, ulong userId) => creds.OwnerIds.Contains(userId); } \ No newline at end of file diff --git a/src/EllieBot/_common/_Extensions/DbExtensions.cs b/src/EllieBot/_common/_Extensions/DbExtensions.cs index 0975a1f..58a9abd 100644 --- a/src/EllieBot/_common/_Extensions/DbExtensions.cs +++ b/src/EllieBot/_common/_Extensions/DbExtensions.cs @@ -1,4 +1,5 @@ using Microsoft.EntityFrameworkCore; +using EllieBot.Db; using EllieBot.Db.Models; namespace EllieBot.Extensions; diff --git a/src/EllieBot/_common/_Extensions/Extensions.cs b/src/EllieBot/_common/_Extensions/Extensions.cs index 5a21861..33aa564 100644 --- a/src/EllieBot/_common/_Extensions/Extensions.cs +++ b/src/EllieBot/_common/_Extensions/Extensions.cs @@ -1,3 +1,4 @@ +using System.Diagnostics; using System.Globalization; using System.Text.Json; using System.Text.RegularExpressions; @@ -103,7 +104,7 @@ public static class Extensions /// /// First 10 characters of teh bot token. /// - public static string RedisKey(this IBotCreds bc) + public static string RedisKey(this IBotCredentials bc) => bc.Token[..10]; public static bool IsAuthor(this IMessage msg, IDiscordClient client) diff --git a/src/EllieBot/_common/_Extensions/Rgba32Extensions.cs b/src/EllieBot/_common/_Extensions/Rgba32Extensions.cs index 6fb4c7c..a0cd408 100644 --- a/src/EllieBot/_common/_Extensions/Rgba32Extensions.cs +++ b/src/EllieBot/_common/_Extensions/Rgba32Extensions.cs @@ -24,7 +24,7 @@ public static class Rgba32Extensions using var frame = imgArray[i].Frames.CloneFrame(frameNumber % imgArray[i].Frames.Count); var offset = xOffset; imgFrame.Mutate(x => x.DrawImage(frame, new Point(offset, 0), new GraphicsOptions())); - xOffset += imgArray[i].Bounds.Width; + xOffset += imgArray[i].Bounds().Width; } } diff --git a/src/EllieBot/clean-migrations.ps1 b/src/EllieBot/clean-migrations.ps1 deleted file mode 100644 index 7db1541..0000000 --- a/src/EllieBot/clean-migrations.ps1 +++ /dev/null @@ -1,49 +0,0 @@ -# WORK IN PROGRESS - -# Define the folders to search for designer.cs files -$folders = @("Migrations/PostgreSql", "Migrations/Sqlite") - -# Loop through each folder -foreach ($folder in $folders) { - # Get all designer.cs files in the folder and subfolders - $files = Get-ChildItem -Path $folder -Filter *.designer.cs -Recurse - - $excludedPattern = "cleanup|mysql-init|squash|rero-cascade" - -$filteredFiles = $files | Where-Object { $_.Name -notmatch $excludedPattern } - # Loop through each file - foreach ($file in ($files | Where-Object { $_.Name -notmatch $excludedPattern })) { - # Read the contents of the file - $content = Get-Content -Path $file.FullName | Select-Object -First 30 - - # Find the attribute lines - $attributes = $content | Where-Object { $_ -match '\[.*\]' } | ForEach-Object { ' ' + $_.Trim() } - - # Find the namespace - $namespace = $content | Where-Object { $_ -match 'namespace' } | ForEach-Object { $_.Split(' ')[1] } - - # Find the class name - $class_name = $content | Where-Object { $_ -match 'partial class' } | ForEach-Object { $_.Trim().Split(' ')[2] } - - # Replace the contents with the new template - $new_content = @" -// -using EllieBot.Db; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace $namespace -{ -$($attributes -join "`n") - partial class $class_name - { - } -} -"@ - - # Write the new contents to the file - Set-Content -Path $file.FullName -Value $new_content - } -} \ No newline at end of file diff --git a/src/EllieBot/creds_example.yml b/src/EllieBot/creds_example.yml index 977b597..17e45e9 100644 --- a/src/EllieBot/creds_example.yml +++ b/src/EllieBot/creds_example.yml @@ -80,6 +80,7 @@ db: # Database connection string. # You MUST change this if you're not using "sqlite" type. # Default is "Data Source=data/EllieBot.db" + # Example for mysql: "Server=localhost;Port=3306;Uid=root;Pwd=my_super_secret_mysql_password;Database=ellie" # Example for postgresql: "Server=localhost;Port=5432;User Id=postgres;Password=my_super_secret_postgres_password;Database=ellie;" connectionString: Data Source=data/EllieBot.db # Address and port of the coordinator endpoint. Leave empty for default. diff --git a/src/EllieBot/data/aliases.yml b/src/EllieBot/data/aliases.yml index 8589812..d8c13df 100644 --- a/src/EllieBot/data/aliases.yml +++ b/src/EllieBot/data/aliases.yml @@ -208,8 +208,7 @@ setavatar: - setav setbanner: - setbanner -setactivity: - - setactivity +setgame: - setgame send: - send @@ -343,56 +342,28 @@ allcmdcooldowns: - cmdcds quoteadd: - quoteadd - - qa - - qadd - - quadd - . quoteedit: - quoteedit - - qe - - que - qedit quoteprint: - quoteprint - - qp - - qup - .. - - qprint quoteshow: - quoteshow - - qsh - qshow - - qushow quotesearch: - quotesearch - - qse - qsearch quoteid: - quoteid - qid quotedelete: - quotedelete - - qd - qdel - - qdelete quotedeleteauthor: - quotedeleteauthor - - qda - qdelauth -quotesexport: - - quotesexport - - qex - - qexport -quotesimport: - - quotesimport - - qim - - qimp - - qimport -quotelist: - - quotelist - - qli - - quli - - qulist draw: - draw drawnew: @@ -616,6 +587,10 @@ pokemon: pokemonability: - pokemonability - pokeab +memelist: + - memelist +memegen: + - memegen weather: - weather - we @@ -699,10 +674,10 @@ guide: - readme calcops: - calcops -quotesdeleteall: - - quotesdeleteall - - qdall - - qdeleteall +delallquotes: + - delallquotes + - daq + - delallq greetdmmsg: - greetdmmsg cash: @@ -789,12 +764,15 @@ autotranslate: - autotranslate - at - autotrans +listquotes: + - listquotes + - liqu typedel: - typedel typelist: - typelist -serverlist: - - serverlist +listservers: + - listservers cleverbot: - cleverbot - chatbot @@ -826,6 +804,8 @@ autodisconnect: define: - define - def +activity: + - activity setstatus: - setstatus invitecreate: @@ -848,10 +828,6 @@ eventstart: - eventstart betstats: - betstats - - bs -gamblestats: - - gamblestats - - gs bettest: - bettest slot: @@ -863,11 +839,6 @@ affinity: waifuclaim: - waifuclaim - claim - - wc -waifuclaims: - - waifuclaims - - claims - - wcs waifureset: - waifureset waifutransfer: @@ -884,6 +855,8 @@ divorce: waifuinfo: - waifuinfo - waifustats +mal: + - mal setmusicchannel: - setmusicchannel - smch @@ -1175,6 +1148,8 @@ discordpermoverridelist: - dpoli discordpermoverridereset: - dpor +rafflecur: + - rafflecur timelyset: - timelyset timely: @@ -1191,6 +1166,8 @@ massban: - massban masskill: - masskill +rollduel: + - rollduel reroadd: - reroadd - reroa @@ -1232,6 +1209,8 @@ roleid: agerestricttoggle: - nsfwtoggle - artoggle +economy: + - economy purgeuser: - purgeuser imageonlychannel: @@ -1244,6 +1223,12 @@ linkonlychannel: - linkssonly coordreload: - coordreload +quotesexport: + - quotesexport + - qexport +quotesimport: + - quotesimport + - qimport showembed: - showembed # EllieExpressions @@ -1431,45 +1416,4 @@ coins: afk: - afk keep: - - keep -leaveunkeptservers: - - leaveunkeptservers -ncanvas: - - ncanvas - - nc - - ncanv -ncsetimg: - - ncsetimg - - ncsi -ncsetpixel: - - ncsetpixel - - ncsp - - ncs -nczoom: - - nczoom - - ncz -ncpixel: - - ncpixel - - ncp - - ncgp -ncreset: - - ncreset -translateflags: - - translateflags - - trfl - - fltr - - transflags -rakeback: - - rakeback - - rb -betstatsreset: - - betstatsreset - - bsr - - bsreset -gamblestatsreset: - - gamblestatsreset - - gsr - - gsreset -snipe: - - snipe - - sn \ No newline at end of file + - keep \ No newline at end of file diff --git a/src/EllieBot/data/bot.yml b/src/EllieBot/data/bot.yml index e15bbc1..55a1d51 100644 --- a/src/EllieBot/data/bot.yml +++ b/src/EllieBot/data/bot.yml @@ -1,5 +1,5 @@ # DO NOT CHANGE -version: 8 +version: 7 # Most commands, when executed, have a small colored line # next to the response. The color depends whether the command # is completed, errored or in progress (pending) @@ -15,7 +15,7 @@ color: pending: faa61a # Default bot language. It has to be in the list of supported languages (.langli) defaultLocale: en-US -# Style in which executed commands will show up in the logs. +# Style in which executed commands will show up in the console. # Allowed values: Simple, Normal, None consoleOutputType: Normal # Whether the bot will check for new releases every hour @@ -80,6 +80,16 @@ blocked: modules: [] # Which string will be used to recognize the commands prefix: . +# Toggles whether your bot will group greet/bye messages into a single message every 5 seconds. +# 1st user who joins will get greeted immediately +# If more users join within the next 5 seconds, they will be greeted in groups of 5. +# This will cause %user.mention% and other placeholders to be replaced with multiple users. +# Keep in mind this might break some of your embeds - for example if you have %user.avatar% in the thumbnail, +# it will become invalid, as it will resolve to a list of avatars of grouped users. +# note: This setting is primarily used if you're afraid of raids, or you're running medium/large bots where some +# servers might get hundreds of people join at once. This is used to prevent the bot from getting ratelimited, +# and (slightly) reduce the greet spam in those servers. +groupGreets: false # Whether the bot will rotate through all specified statuses. # This setting can be changed via .ropl command. # See RotatingStatuses submodule in Administration. diff --git a/src/EllieBot/data/commandlist.json b/src/EllieBot/data/commandlist.json deleted file mode 100644 index 216bee4..0000000 --- a/src/EllieBot/data/commandlist.json +++ /dev/null @@ -1,8031 +0,0 @@ -{ - "Administration": [ - { - "Aliases": [ - ".imageonlychannel", - ".imageonly", - ".imagesonly" - ], - "Description": "Toggles whether the channel only allows images.\nUsers who send more than a few non-image messages will be banned from using the channel. ", - "Usage": [ - ".imageonlychannel" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".linkonlychannel", - ".linkonly", - ".linkssonly" - ], - "Description": "Toggles whether the channel only allows links.\nUsers who send more than a few non-link messages will be banned from using the channel. ", - "Usage": [ - ".linkonlychannel" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".slowmode" - ], - "Description": "Toggles slowmode on the current channel with the specified amount of time. Provide no parameters to disable.", - "Usage": [ - ".slowmode", - ".slowmode 27s", - ".slowmode 3h15m5s" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageChannels Channel Permission" - ] - }, - { - "Aliases": [ - ".delmsgoncmd", - ".dmc" - ], - "Description": "Toggles the automatic deletion of the user's successful command message to prevent chat flood. You can use it either as a server toggle, channel whitelist, or channel blacklist, as channel option has 3 settings: Enable (always do it on this channel), Disable (never do it on this channel), and Inherit (respect server setting). Use `list` parameter to see the current states.", - "Usage": [ - ".delmsgoncmd", - ".delmsgoncmd channel enable", - ".delmsgoncmd ch inherit", - ".delmsgoncmd list" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".deafen", - ".deaf" - ], - "Description": "Deafens mentioned user or users.", - "Usage": [ - ".deafen \"@Someguy\"", - ".deafen \"@Someguy\" \"@Someguy\"" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "DeafenMembers Server Permission" - ] - }, - { - "Aliases": [ - ".undeafen", - ".undef" - ], - "Description": "Undeafens mentioned user or users.", - "Usage": [ - ".undeafen \"@Someguy\"", - ".undeafen \"@Someguy\" \"@Someguy\"" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "DeafenMembers Server Permission" - ] - }, - { - "Aliases": [ - ".delvoichanl", - ".dvch" - ], - "Description": "Deletes a voice channel with a given name.", - "Usage": [ - ".delvoichanl VoiceChannelName" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageChannels Server Permission" - ] - }, - { - "Aliases": [ - ".creatvoichanl", - ".cvch" - ], - "Description": "Creates a new voice channel with a given name.", - "Usage": [ - ".creatvoichanl VoiceChannelName" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageChannels Server Permission" - ] - }, - { - "Aliases": [ - ".deltxtchanl", - ".dtch" - ], - "Description": "Deletes a text channel with a given name.", - "Usage": [ - ".deltxtchanl TextChannelName" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageChannels Server Permission" - ] - }, - { - "Aliases": [ - ".creatxtchanl", - ".ctch" - ], - "Description": "Creates a new text channel with a given name.", - "Usage": [ - ".creatxtchanl TextChannelName" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageChannels Server Permission" - ] - }, - { - "Aliases": [ - ".settopic", - ".st" - ], - "Description": "Sets a topic on the current channel.", - "Usage": [ - ".settopic My new topic" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageChannels Server Permission" - ] - }, - { - "Aliases": [ - ".setchanlname", - ".schn" - ], - "Description": "Changes the name of the current channel.", - "Usage": [ - ".setchanlname NewName" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageChannels Server Permission" - ] - }, - { - "Aliases": [ - ".nsfwtoggle", - ".artoggle" - ], - "Description": "Toggles whether the current channel is age-restricted.", - "Usage": [ - ".nsfwtoggle" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageChannels Server Permission" - ] - }, - { - "Aliases": [ - ".edit" - ], - "Description": "Edits bot's message, you have to specify message ID and new text. You can optionally specify target channel.\nSupports [embeds](https://eb.elliebot.net/)", - "Usage": [ - ".edit 7479498384 Hi :^)", - ".edit #other-channel 771562360594628608 New message!", - ".edit #other-channel 771562360594628608 {\"description\":\"hello\"}" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageMessages Channel Permission" - ] - }, - { - "Aliases": [ - ".delete", - ".del" - ], - "Description": "Deletes a single message given the channel and message ID. If channel is ommited, message will be searched for in the current channel. You can also specify time parameter after which the message will be deleted (up to 7 days). This timer won't persist through bot restarts.", - "Usage": [ - ".delete #chat 771562360594628608", - ".delete 771562360594628608", - ".delete 771562360594628608 5m" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageMessages Channel Permission" - ] - }, - { - "Aliases": [ - ".threadcreate", - ".thcr" - ], - "Description": "Create a public thread with the specified title. You may optionally reply to a message to have it as a starting point.", - "Usage": [ - ".threadcreate Q&A" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "CreatePublicThreads Channel Permission" - ] - }, - { - "Aliases": [ - ".threaddelete", - ".thdel", - ".thrm" - ], - "Description": "Delete a thread with the specified name in this channel. Case insensitive.", - "Usage": [ - ".threaddelete Q&A" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageThreads Channel Permission" - ] - }, - { - "Aliases": [ - ".autopublish" - ], - "Description": "Make the bot automatically publish all messages posted in the news channel this command was executed in.", - "Usage": [ - ".autopublish" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageMessages Channel Permission" - ] - }, - { - "Aliases": [ - ".setnick" - ], - "Description": "Changes the nickname of the bot on this server. You can also target other users to change their nickname.", - "Usage": [ - ".setnick BotNickname", - ".setnick @SomeUser New Nickname" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageNicknames Server Permission" - ] - }, - { - "Aliases": [ - ".setserverbanner", - ".serverbanner" - ], - "Description": "Sets a new banner image for the current server. Parameter is a direct link to an image.", - "Usage": [ - ".setserverbanner https://cdn.elliebot.net/Ellie.png" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".setservericon", - ".servericon" - ], - "Description": "Sets a new icon image for the current server. Parameter is a direct link to an image.", - "Usage": [ - ".setservericon https://cdn.elliebot.net/Ellie.png" - ], - "Submodule": "Administration", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".autoassignrole", - ".aar" - ], - "Description": "Toggles the role which will be assigned to every user who joins the server.\nYou can run this command multiple times to add multiple roles (up to 3).\nSpecifying the role that is already added will remove that role from the list.\nProvide no parameters to list current roles.", - "Usage": [ - ".autoassignrole", - ".autoassignrole RoleName" - ], - "Submodule": "AutoAssignRoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".cleanupguilddata" - ], - "Description": "Deletes data for all servers bot is no longer a member of from the database.\nThis is a highly destructive and irreversible command.", - "Usage": [ - ".cleanupguilddata" - ], - "Submodule": "CleanupCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".keep" - ], - "Description": "The current server, won't be deleted from Ellie's database during the purge.", - "Usage": [ - ".keep" - ], - "Submodule": "CleanupCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".leaveunkeptservers" - ], - "Description": "Leaves all servers whose owners didn't run .keep", - "Usage": [ - ".leaveunkeptservers" - ], - "Submodule": "CleanupCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".sqlselect" - ], - "Description": "Executes provided sql query and returns the results. Dangerous.", - "Usage": [ - ".sqlselect SELECT * FROM DiscordUser LIMIT 5" - ], - "Submodule": "DangerousCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".sqlselectcsv" - ], - "Description": "Executes provided sql query and returns the results in a csv file. Dangerous.", - "Usage": [ - ".sqlselectcsv SELECT * FROM DiscordUser LIMIT 5" - ], - "Submodule": "DangerousCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".sqlexec" - ], - "Description": "Executes provided sql command and returns the number of affected rows. Dangerous.", - "Usage": [ - ".sqlexec UPDATE DiscordUser SET CurrencyAmount=CurrencyAmount+1234" - ], - "Submodule": "DangerousCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".purgeuser" - ], - "Description": "Purge user from the database completely. This includes currency, xp, clubs that user owns, waifu info", - "Usage": [ - ".purgeuser @Oblivion" - ], - "Submodule": "DangerousCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".deletexp" - ], - "Description": "Deletes everything from UserXpStats, Clubs and sets users' TotalXP to 0.", - "Usage": [ - ".deletexp" - ], - "Submodule": "DangerousCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".deletewaifus" - ], - "Description": "Deletes everything from WaifuUpdates, WaifuItem and WaifuInfo tables.", - "Usage": [ - ".deletewaifus" - ], - "Submodule": "DangerousCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".deletewaifu" - ], - "Description": "Deletes everything from WaifuUpdates, WaifuItem and WaifuInfo tables for the specified user. Also makes specified user's waifus free.", - "Usage": [ - ".deletewaifu" - ], - "Submodule": "DangerousCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".deletecurrency" - ], - "Description": "Deletes everything from Currency and CurrencyTransactions.", - "Usage": [ - ".deletecurrency" - ], - "Submodule": "DangerousCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".gamevoicechannel", - ".gvc" - ], - "Description": "Toggles game voice channel feature in the voice channel you're currently in. Users who join the game voice channel will get automatically redirected to the voice channel with the name of their current game, if it exists. Can't move users to channels that the bot has no connect permission for. One per server.", - "Usage": [ - ".gamevoicechannel" - ], - "Submodule": "GameVoiceChannelCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".boost" - ], - "Description": "Toggles announcements on the current channel when someone boosts the server.", - "Usage": [ - ".boost" - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".boostdel" - ], - "Description": "Sets the time it takes (in seconds) for boost messages to be auto-deleted. Set it to `0` to disable automatic deletion.", - "Usage": [ - ".boostdel 0", - ".boostdel 30" - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".boostmsg" - ], - "Description": "Sets a new boost announcement message which will be shown in the current channel. \nUsing this command with no message will show the current boost message. \nSupports [placeholders](https://docs.elliebot.net/ellie/features/placeholders/) and [embeds](https://eb.elliebot.net/)", - "Usage": [ - ".boostmsg %user.mention% has boosted the server!!!" - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".greet" - ], - "Description": "Toggles announcements on the current channel when someone joins the server.", - "Usage": [ - ".greet" - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".greetdel", - ".grdel" - ], - "Description": "Sets the time it takes (in seconds) for greet messages to be auto-deleted. Set it to `0` to disable automatic deletion.", - "Usage": [ - ".greetdel 0", - ".greetdel 30" - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".greetmsg" - ], - "Description": "Sets a new join announcement message which will be shown in the current channel.\nUsing this command with no message will show the current greet message. \nSupports [placeholders](https://docs.elliebot.net/ellie/features/placeholders/) and [embeds](https://eb.elliebot.net/)", - "Usage": [ - ".greetmsg Welcome, %user.mention%." - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".greetdm" - ], - "Description": "Toggles whether greet messages will be sent in a DM (This is separate from `.greet` - you can have both, one or neither enabled).", - "Usage": [ - ".greetdm" - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".greetdmmsg" - ], - "Description": "Sets a new join announcement message which will be sent to the user who joined. Type `%user.mention%` if you want to mention the new member. Using it with no message will show the current DM greet message. You can use embed json from instead of a regular text, if you want the message to be embedded.", - "Usage": [ - ".greetdmmsg Welcome to the server, %user.mention%" - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".bye" - ], - "Description": "Toggles announcements on the current channel when someone leaves the server.", - "Usage": [ - ".bye" - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".byedel" - ], - "Description": "Sets the time it takes (in seconds) for bye messages to be auto-deleted. Set it to `0` to disable automatic deletion.", - "Usage": [ - ".byedel 0", - ".byedel 30" - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".byemsg" - ], - "Description": "Sets a new leave announcement message which will be shown in the current channel. \nUsing this command with no message will show the current bye message. \nSupports [placeholders](https://docs.elliebot.net/ellie/features/placeholders/) and [embeds](https://eb.elliebot.net/)", - "Usage": [ - ".byemsg %user.name% has left." - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".greettest" - ], - "Description": "Sends the greet message in the current channel as if you just joined the server. You can optionally specify a different user.", - "Usage": [ - ".greettest", - ".greettest @SomeoneElse" - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".greetdmtest" - ], - "Description": "Sends the greet direct message to you as if you just joined the server. You can optionally specify a different user.", - "Usage": [ - ".greetdmtest", - ".greetdmtest @SomeoneElse" - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".byetest" - ], - "Description": "Sends the bye message in the current channel as if you just left the server. You can optionally specify a different user.", - "Usage": [ - ".byetest", - ".byetest @SomeoneElse" - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".boosttest" - ], - "Description": "Sends the boost message in the current channel as if you just boosted the server.\nYou can optionally specify a different user.", - "Usage": [ - ".boosttest", - ".boosttest @SomeoneElse" - ], - "Submodule": "GreetCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageServer Server Permission" - ] - }, - { - "Aliases": [ - ".honeypot" - ], - "Description": "Toggles honeypot on the current channel.\nAnyone sending a message in this channel will be soft banned. (Banned and then unbanned)\nThis is useful for automatically getting rid of spam bots.", - "Usage": [ - ".honeypot" - ], - "Submodule": "HoneypotCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".languageset", - ".langset" - ], - "Description": "Sets this server's response language. If bot's response strings have been translated to that language, bot will use that language in this server. Reset by using `default` as the locale name. Provide no parameters to see currently set language.", - "Usage": [ - ".languageset de-DE", - ".languageset default" - ], - "Submodule": "LocalizationCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".langsetdefault", - ".langsetd" - ], - "Description": "Sets the bot's default response language. All servers which use a default locale will use this one. Setting to `default` will use the host's current culture. Provide no parameters to see currently set language.", - "Usage": [ - ".langsetdefault en-US", - ".langsetdefault default" - ], - "Submodule": "LocalizationCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".languageslist", - ".langli" - ], - "Description": "List of languages for which translation (or part of it) exist atm.", - "Usage": [ - ".languageslist" - ], - "Submodule": "LocalizationCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".muterole", - ".setmuterole" - ], - "Description": "Sets a name of the role which will be assigned to people who should be muted. Provide no arguments to see currently set mute role. Default is ellie-mute.", - "Usage": [ - ".muterole", - ".muterole Silenced" - ], - "Submodule": "MuteCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".mute" - ], - "Description": "Mutes a mentioned user both from speaking and chatting. You can also specify time string for how long the user should be muted. You can optionally specify a reason.", - "Usage": [ - ".mute @Someone", - ".mute @Someone too noisy", - ".mute 1h30m @Someone", - ".mute 1h30m @Someone too noisy" - ], - "Submodule": "MuteCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "MuteMembers, ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".unmute" - ], - "Description": "Unmutes a mentioned user previously muted with `.mute` command.", - "Usage": [ - ".unmute @Someone" - ], - "Submodule": "MuteCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "MuteMembers, ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".chatmute" - ], - "Description": "Prevents a mentioned user from chatting in text channels. You can also specify time string for how long the user should be muted. You can optionally specify a reason.", - "Usage": [ - ".chatmute @Someone", - ".chatmute @Someone stop writing", - ".chatmute 15m @Someone", - ".chatmute 1h30m @Someone", - ".chatmute 1h @Someone chill" - ], - "Submodule": "MuteCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".chatunmute" - ], - "Description": "Removes a mute role previously set on a mentioned user with `.chatmute` which prevented him from chatting in text channels.", - "Usage": [ - ".chatunmute @Someone" - ], - "Submodule": "MuteCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".voicemute" - ], - "Description": "Prevents a mentioned user from speaking in voice channels. User has to be in a voice channel in order for the command to have an effect. You can also specify time string for how long the user should be muted. You can optionally specify a reason.", - "Usage": [ - ".voicemute @Someone", - ".voicemute @Someone stop talking", - ".voicemute 15m @Someone", - ".voicemute 1h30m @Someone", - ".voicemute 1h @Someone silence" - ], - "Submodule": "MuteCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "MuteMembers Server Permission" - ] - }, - { - "Aliases": [ - ".voiceunmute" - ], - "Description": "Gives a previously voice-muted user a permission to speak.", - "Usage": [ - ".voiceunmute @Someguy" - ], - "Submodule": "MuteCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "MuteMembers Server Permission" - ] - }, - { - "Aliases": [ - ".dpo" - ], - "Description": "Overrides required user permissions that the command has with the specified ones. You can only use server-level permissions. This action will make the bot ignore user permission requirements which command has by default. Provide no permissions to reset to default.", - "Usage": [ - ".dpo .prune ManageMessages BanMembers", - ".dpo .prune" - ], - "Submodule": "DiscordPermOverrideCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".dpor" - ], - "Description": "Resets ALL currently set discord permission overrides on this server. This will make all commands have default discord permission requirements.", - "Usage": [ - ".dpor" - ], - "Submodule": "DiscordPermOverrideCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".dpol", - ".dpoli" - ], - "Description": "Lists all discord permission overrides on this server.", - "Usage": [ - ".dpol" - ], - "Submodule": "DiscordPermOverrideCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".rotateplaying", - ".ropl" - ], - "Description": "Toggles rotation of playing status of the dynamic strings you previously specified.", - "Usage": [ - ".rotateplaying" - ], - "Submodule": "PlayingRotateCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".addplaying", - ".adpl" - ], - "Description": "Adds a specified string to the list of playing strings to rotate. You have to pick either `Playing`, `Watching` or `Listening` as the first parameter.", - "Usage": [ - ".addplaying Playing with you", - ".addplaying Watching you sleep" - ], - "Submodule": "PlayingRotateCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".listplaying", - ".lipl" - ], - "Description": "Lists all playing statuses and their indexes.", - "Usage": [ - ".listplaying" - ], - "Submodule": "PlayingRotateCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".removeplaying", - ".rmpl" - ], - "Description": "Removes a playing status by index. Use `.lipl` to see indexes.", - "Usage": [ - ".removeplaying" - ], - "Submodule": "PlayingRotateCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".prefix" - ], - "Description": "Sets this server's prefix for all bot commands. Provide no parameters to see the current server prefix. **Setting prefix requires Administrator server permission.**", - "Usage": [ - ".prefix +" - ], - "Submodule": "PrefixCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".defprefix" - ], - "Description": "Sets bot's default prefix for all bot commands. Provide no parameters to see the current default prefix. This will not change this server's current prefix.", - "Usage": [ - ".defprefix +" - ], - "Submodule": "PrefixCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".antialt" - ], - "Description": "Applies a punishment action to any user whose account is younger than the specified threshold. \nAvailable Punishments are: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, RemoveRoles, AddRole, Warn, TimeOut\nYou can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h.\nMax message count is 10.\nProvide no parameters to disable.", - "Usage": [ - ".antialt 1h Ban", - ".antialt 3d Mute 1h" - ], - "Submodule": "ProtectionCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".antiraid" - ], - "Description": "Sets an anti-raid protection on the server.\n\nFirst parameter is number of people which will trigger the protection.\n\nSecond parameter is a time interval in which that number of people needs to join in order to trigger the protection.\n\nThird parameter is punishment for those people.\nAvailable punishments: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, RemoveRoles, AddRole, Warn, TimeOut\nYou can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h.\n\nProvide no parameters to disable.", - "Usage": [ - ".antiraid 5 20 Kick", - ".antiraid 7 9 Ban", - ".antiraid 10 10 Ban 6h30m", - ".antiraid" - ], - "Submodule": "ProtectionCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".antispam" - ], - "Description": "Applies a Punishment to people who repeat the same message X times in a row.\nAvailable Punishments are: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, RemoveRoles, AddRole, Warn, TimeOut\nYou can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h.\nMax message count is 10. \nProvide no parameters to disable.", - "Usage": [ - ".antispam 3 Mute", - ".antispam 5 Ban", - ".antispam 5 Ban 3h30m", - ".antispam" - ], - "Submodule": "ProtectionCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".antispamignore" - ], - "Description": "Toggles whether antispam ignores current channel. Antispam must be enabled.", - "Usage": [ - ".antispamignore" - ], - "Submodule": "ProtectionCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".antilist", - ".antilst" - ], - "Description": "Shows currently enabled protection features.", - "Usage": [ - ".antilist" - ], - "Submodule": "ProtectionCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".prune", - ".clear" - ], - "Description": "`.prune` removes all Ellie's messages in the last 100 messages. `.prune X` removes last `X` number of messages from the channel (up to 100). `.prune @Someone` removes all Someone's messages in the last 100 messages. `.prune @Someone X` removes last `X` number of 'Someone's' messages in the channel.", - "Usage": [ - ".prune", - ".prune -s", - ".prune 5", - ".prune 5 --safe", - ".prune @Someone", - ".prune @Someone --safe", - ".prune @Someone X", - ".prune @Someone X -s" - ], - "Submodule": "PruneCommands", - "Module": "Administration", - "Options": [ - "`--safe` (`-s`) Whether pinned messages should be deleted. ", - "`--after` (`-a`) Prune only messages after the specified message ID. " - ], - "Requirements": [] - }, - { - "Aliases": [ - ".prunecancel", - ".prunec" - ], - "Description": "Cancels an active prune if there is any.", - "Usage": [ - ".prunecancel" - ], - "Submodule": "PruneCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageMessages Channel Permission" - ] - }, - { - "Aliases": [ - ".reroadd", - ".reroa" - ], - "Description": "Specify a message id, emote and a role name to have the bot assign the specified role to the user who reacts to the specified message (in this channel) with the specified emoji.\nYou can optionally specify an exclusivity group. Default is group 0 which is non-exclusive. Other groups are exclusive. Exclusive groups will let the user only have one of the roles specified in that group.\nYou can optionally specify a level requirement after a group. Users who don't meet the level requirement will not receive the role.\nYou can have up to 50 reaction roles per server in total.", - "Usage": [ - ".reroadd 971276352684691466 😊 gamer", - ".reroadd 971276352684691466 😢 emo 1", - ".reroadd 971276352684691466 🤔 philosopher 5 20", - ".reroadd 971276352684691466 👨 normie 5 20" - ], - "Submodule": "ReactionRoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".rerolist", - ".reroli" - ], - "Description": "Lists all ReactionRole messages on this server with their message ids. Clicking/Tapping message ids will send you to that message.", - "Usage": [ - ".rerolist" - ], - "Submodule": "ReactionRoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".reroremove", - ".rerorm" - ], - "Description": "Remove all reaction roles from message specified by the id", - "Usage": [ - ".reroremove 971276352684691466" - ], - "Submodule": "ReactionRoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".rerodeleteall", - ".rerodela" - ], - "Description": "Deletes all reaction roles on the server. This action is irreversible.", - "Usage": [ - ".rerodeleteall" - ], - "Submodule": "ReactionRoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".rerotransfer", - ".rerot" - ], - "Description": "Transfers reaction roles from one message to another by specifying their ids. If the target message has reaction roles specified already, the reaction roles will be MERGED, not overwritten.", - "Usage": [ - ".rerotransfer 971276352684691466 971427748448964628" - ], - "Submodule": "ReactionRoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".setrole", - ".sr", - ".giverole" - ], - "Description": "Gives a role to a user. The role you specify has to be lower in the role hierarchy than your highest role.", - "Usage": [ - ".setrole @User Guest" - ], - "Submodule": "RoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".removerole", - ".rr" - ], - "Description": "Removes a role from a user. The role you specify has to be lower in the role hierarchy than your highest role.", - "Usage": [ - ".removerole @User Admin" - ], - "Submodule": "RoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".renamerole", - ".renr" - ], - "Description": "Renames a role. The role you specify has to be lower in the role hierarchy than your highest role.", - "Usage": [ - ".renamerole \"First role\" SecondRole" - ], - "Submodule": "RoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".removeallroles", - ".rar" - ], - "Description": "Removes all roles which are lower than your highest role in the role hierarchy from the user you specify.", - "Usage": [ - ".removeallroles @User" - ], - "Submodule": "RoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".createrole", - ".cr" - ], - "Description": "Creates a role with a given name.", - "Usage": [ - ".createrole Awesome Role" - ], - "Submodule": "RoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".deleterole", - ".dr" - ], - "Description": "Deletes a role with a given name.", - "Usage": [ - ".deleterole Awesome Role" - ], - "Submodule": "RoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".rolehoist", - ".rh" - ], - "Description": "Toggles whether this role is displayed in the sidebar or not. The role you specify has to be lower in the role hierarchy than your highest role.", - "Usage": [ - ".rolehoist Guests", - ".rolehoist Space Wizards" - ], - "Submodule": "RoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".rolecolor", - ".roleclr" - ], - "Description": "Set a role's color using its hex value. Provide no color in order to see the hex value of the color of the specified role. The role you specify has to be lower in the role hierarchy than your highest role.", - "Usage": [ - ".rolecolor Admin", - ".rolecolor ffba55 Admin" - ], - "Submodule": "RoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".stickyroles" - ], - "Description": "Toggles whether the bot will save the leaving users' roles, and reapply them once they re-join. The roles will be stored for up to 30 days.", - "Usage": [ - ".stickyroles" - ], - "Submodule": "RoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".adsarm" - ], - "Description": "Toggles the automatic deletion of the user's message and Ellie's confirmations for `.iam` and `.iamn` commands.", - "Usage": [ - ".adsarm" - ], - "Submodule": "SelfAssignedRolesCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".asar" - ], - "Description": "Adds a role to the list of self-assignable roles. You can also specify a group. If 'Exclusive self-assignable roles' feature is enabled (`.tesar`), users will be able to pick one role per group.", - "Usage": [ - ".asar Gamer", - ".asar 1 Alliance", - ".asar 1 Horde" - ], - "Submodule": "SelfAssignedRolesCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".sargn" - ], - "Description": "Sets a self assignable role group name. Provide no name to remove.", - "Usage": [ - ".sargn 1 Faction", - ".sargn 2" - ], - "Submodule": "SelfAssignedRolesCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".rsar" - ], - "Description": "Removes a specified role from the list of self-assignable roles.", - "Usage": [ - ".rsar Gamer", - ".rsar Alliance", - ".rsar Horde" - ], - "Submodule": "SelfAssignedRolesCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".lsar" - ], - "Description": "Lists self-assignable roles. Shows 20 roles per page.", - "Usage": [ - ".lsar", - ".lsar 2" - ], - "Submodule": "SelfAssignedRolesCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".togglexclsar", - ".tesar" - ], - "Description": "Toggles whether self-assigned roles are exclusive. While enabled, users can only have one self-assignable role per group.", - "Usage": [ - ".togglexclsar" - ], - "Submodule": "SelfAssignedRolesCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".rolelevelreq", - ".rlr" - ], - "Description": "Set a level requirement on a self-assignable role.", - "Usage": [ - ".rolelevelreq 5 SomeRole" - ], - "Submodule": "SelfAssignedRolesCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".iam" - ], - "Description": "Adds a role to you that you choose. Role must be on the list of self-assignable roles.", - "Usage": [ - ".iam Gamer" - ], - "Submodule": "SelfAssignedRolesCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".iamnot", - ".iamn" - ], - "Description": "Removes a specified role from you. Role must be on the list of self-assignable roles.", - "Usage": [ - ".iamnot Gamer" - ], - "Submodule": "SelfAssignedRolesCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".cacheusers" - ], - "Description": "Caches users of a Discord server and saves them to the database.", - "Usage": [ - ".cacheusers", - ".cacheusers serverId" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".doas", - ".execas" - ], - "Description": "Execute the command as if you were the target user. Requires bot ownership and server administrator permission.", - "Usage": [ - ".doas @Thief .give all @Admin" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".scadd", - ".startcmdadd" - ], - "Description": "Adds a command to the list of commands which will be executed automatically in the current channel, in the order they were added in, by the bot when it startups up.", - "Usage": [ - ".scadd .stats" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".acadd", - ".autocmdadd" - ], - "Description": "Adds a command to the list of commands which will be executed automatically every X seconds.", - "Usage": [ - ".acadd 60 .prune 1000" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".sclist", - ".startcmdlist" - ], - "Description": "Lists all startup commands in the order they will be executed in.", - "Usage": [ - ".sclist" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".aclist", - ".autolist", - ".autocommands", - ".autocmdlist" - ], - "Description": "Lists all auto commands and the intervals in which they execute.", - "Usage": [ - ".aclist" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".wait" - ], - "Description": "Used only as a startup command. Waits a certain number of milliseconds before continuing the execution of the following startup commands.", - "Usage": [ - ".wait 3000" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".acrm", - ".autocmdrm" - ], - "Description": "Removes an auto command on the specified index.", - "Usage": [ - ".acrm 3" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".scrm", - ".startcmdrm" - ], - "Description": "Removes a startup command on the specified index.", - "Usage": [ - ".scrm 3" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".scclear", - ".scclr" - ], - "Description": "Removes all startup commands.", - "Usage": [ - ".scclear" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".forwardmessages", - ".fwmsgs" - ], - "Description": "Toggles forwarding of non-command messages sent to bot's DM to the bot owners", - "Usage": [ - ".forwardmessages" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".forwardtoall", - ".fwtoall" - ], - "Description": "Toggles whether messages will be forwarded to all bot owners or only to the first one specified in the creds.yml file", - "Usage": [ - ".forwardtoall" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".forwardtochannel", - ".fwtoch", - ".fwtochannel" - ], - "Description": "Toggles forwarding of non-command messages sent to bot's DM to the current channel", - "Usage": [ - ".forwardtochannel" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".shardstats" - ], - "Description": "Stats for shards. Paginated with 25 shards per page.\nFormat: `[status] | # [shard_id] | [last_heartbeat] | [server_count]`", - "Usage": [ - ".shardstats", - ".shardstats 2" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".restartshard" - ], - "Description": "Try (re)connecting a shard with a certain shardid when it dies. No one knows will it work. Keep an eye on the console for errors.", - "Usage": [ - ".restartshard 2" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".leave" - ], - "Description": "Makes Ellie leave the server. Either server name or server ID is required.", - "Usage": [ - ".leave 123123123331" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".deleteemptyservers" - ], - "Description": "Deletes all servers in which the bot is the only member.", - "Usage": [ - ".deleteemptyservers" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".die" - ], - "Description": "Shuts the bot down.", - "Usage": [ - ".die" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".restart" - ], - "Description": "Restarts the bot. Might not work.", - "Usage": [ - ".restart" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".setname", - ".newnm" - ], - "Description": "Gives the bot a new name.", - "Usage": [ - ".setname BotName" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".setstatus" - ], - "Description": "Sets the bot's status. (Online/Idle/Dnd/Invisible)", - "Usage": [ - ".setstatus Idle" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".setavatar", - ".setav" - ], - "Description": "Sets a new avatar image for the EllieBot. Parameter is a direct link to an image.", - "Usage": [ - ".setavatar https://cdn.elliebot.net/Ellie.png" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".setbanner" - ], - "Description": "Sets a new banner image for the EllieBot. Parameter is a direct link to an image. Supports gifs.", - "Usage": [ - ".setbanner https://cdn.elliebot.net/Ellie.png" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".setactivity", - ".setgame" - ], - "Description": "Sets the bots game status to a Custom, Playing, Listening, or Watching status.", - "Usage": [ - ".setactivity Just chilling", - ".setactivity Playing with canaries", - ".setactivity Listening music" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".setstream" - ], - "Description": "Sets the bots stream. First parameter is the twitch link, second parameter is stream name.", - "Usage": [ - ".setstream TWITCHLINK Hello" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".send" - ], - "Description": "Sends a message to a channel or user.\nYou can write \"channel\" (literally word 'channel') first followed by the channel id or channel mention, or\nYou can write \"user\" (literally word 'user') first followed by the user id or user mention.\nAfter either one of those, specify the message to be sent.\nThis command can only be used by the Bot Owner.", - "Usage": [ - ".send channel 123123123132312 Stop spamming commands plz", - ".send user 1231231232132 I can see in the console what you're doing." - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".stringsreload" - ], - "Description": "Reloads localized bot strings.", - "Usage": [ - ".stringsreload" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".coordreload" - ], - "Description": "Reloads coordinator config", - "Usage": [ - ".coordreload" - ], - "Submodule": "SelfCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".logserver" - ], - "Description": "Enables or Disables ALL log events. If enabled, all log events will log to this channel.", - "Usage": [ - ".logserver enable", - ".logserver disable" - ], - "Submodule": "LogCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot", - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".logignore" - ], - "Description": "Toggles whether the `.log` and `.logserver` commands ignore the specified channel or user. Provide no arguments to see the list of currently ignored users and channels.", - "Usage": [ - ".logignore", - ".logignore @SomeUser", - ".logignore #some-channel" - ], - "Submodule": "LogCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot", - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".logevents" - ], - "Description": "Shows a list of all events you can subscribe to with `.log`", - "Usage": [ - ".logevents" - ], - "Submodule": "LogCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot", - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".log" - ], - "Description": "Toggles logging event. Disables it if it is active anywhere on the server. Enables if it isn't active. Use `.logevents` to see a list of all events you can subscribe to.", - "Usage": [ - ".log userpresence", - ".log userbanned" - ], - "Submodule": "LogCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot", - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".timezones" - ], - "Description": "Lists all timezones available on the system to be used with `.timezone`.", - "Usage": [ - ".timezones" - ], - "Submodule": "TimeZoneCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".timezone" - ], - "Description": "Sets this guilds timezone. This affects bot's time output in this server (logs, etc..) **Setting timezone requires Administrator server permission.**", - "Usage": [ - ".timezone", - ".timezone GMT Standard Time" - ], - "Submodule": "TimeZoneCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".warn" - ], - "Description": "Warns a user with an optional reason.\nYou can specify a warning weight integer before the user. For example, 3 would mean that this warning counts as 3 warnings.", - "Usage": [ - ".warn @Someone Very rude person", - ".warn 3 @Someone Very rude person" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "BanMembers Server Permission" - ] - }, - { - "Aliases": [ - ".warnexpire", - ".warne" - ], - "Description": "Gets or sets the number of days after which the warnings will be cleared automatically. This setting works retroactively. If you want to delete the warnings instead of clearing them, you can set the `--delete` optional parameter. Provide no parameter to see currently set expiry", - "Usage": [ - ".warnexpire", - ".warnexpire 3", - ".warnexpire 6 --delete" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": [ - "`--delete` (`-d`) Delete warnings instead of clearing them. " - ], - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".warnlog" - ], - "Description": "See a list of warnings of a certain user.", - "Usage": [ - ".warnlog @Someone" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "BanMembers Server Permission" - ] - }, - { - "Aliases": [ - ".warnlogall" - ], - "Description": "See a list of all warnings on the server. 15 users per page.", - "Usage": [ - ".warnlogall", - ".warnlogall 2" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "BanMembers Server Permission" - ] - }, - { - "Aliases": [ - ".warndelete", - ".warnrm", - ".warnd" - ], - "Description": "Deletes a warning from a user by its index.", - "Usage": [ - ".warndelete 3" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".warnclear", - ".warnc" - ], - "Description": "Clears all warnings from a certain user. You can specify a number to clear a specific one.", - "Usage": [ - ".warnclear @PoorDude 3", - ".warnclear @PoorDude" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "BanMembers Server Permission" - ] - }, - { - "Aliases": [ - ".warnpunish", - ".warnp" - ], - "Description": "Sets a punishment for a certain number of warnings. You can specify a time string after 'Ban' or *'Mute' punishments to make it a temporary mute/ban. Provide no punishment to remove. Available punishments: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, AddRole, RemoveRoles", - "Usage": [ - ".warnpunish 3", - ".warnpunish 5 Ban", - ".warnpunish 5 Mute 2d12h", - ".warnpunish 4 AddRole toxic 1h" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "BanMembers Server Permission" - ] - }, - { - "Aliases": [ - ".warnpunishlist", - ".warnpl" - ], - "Description": "Lists punishments for warnings.", - "Usage": [ - ".warnpunishlist" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".ban", - ".b" - ], - "Description": "Bans a user by ID or name with an optional message. You can specify a time string before the user name to ban the user temporarily.", - "Usage": [ - ".ban @Someone Get out!", - ".ban \"Some Guy#1234\" Your behaviour is toxic.", - ".ban 1d12h @Someone Come back when u chill" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "BanMembers Server Permission" - ] - }, - { - "Aliases": [ - ".banprune" - ], - "Description": "Sets how many days of messages will be deleted when a user is banned.\nOnly works if the user is banned via the .ban command or punishment.\nAllowed values: 0 - 7", - "Usage": [ - ".banprune 3" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "BanMembers Server Permission" - ] - }, - { - "Aliases": [ - ".banmessage", - ".banmsg", - ".bantemplate", - ".bantemp" - ], - "Description": "Sets a ban message template which will be used when a user is banned from this server. You can use embed strings and ban-specific placeholders: %ban.mod%, %ban.user%, %ban.duration% and %ban.reason%. You can disable ban message with `.banmsg -`", - "Usage": [ - ".banmessage %ban.user%, you've been banned from %server.name%. Reason: %ban.reason%", - ".banmessage { \"description\": \"%ban.user% you have been banned from %server.name% by %ban.mod%\" }" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "BanMembers Server Permission" - ] - }, - { - "Aliases": [ - ".banmsgreset" - ], - "Description": "Resets ban message to default. If you want to completely disable ban messages, use `.banmsg -`", - "Usage": [ - ".banmsgreset" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "BanMembers Server Permission" - ] - }, - { - "Aliases": [ - ".banmsgtest" - ], - "Description": "If ban message is not disabled, bot will send you the message as if you were banned by yourself. Used for testing the ban message.", - "Usage": [ - ".banmsgtest No reason", - ".banmsgtest 1h Test 1 hour ban message" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "BanMembers Server Permission" - ] - }, - { - "Aliases": [ - ".unban" - ], - "Description": "Unbans a user with the provided user#discrim or id.", - "Usage": [ - ".unban toastie_t0ast", - ".unban 123123123" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "BanMembers Server Permission" - ] - }, - { - "Aliases": [ - ".softban", - ".sb" - ], - "Description": "Bans and then unbans a user by ID or name with an optional message.", - "Usage": [ - ".softban @Someone Get out!", - ".softban \"Some Guy#1234\" Your behaviour is toxic." - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "KickMembers, ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".kick", - ".k" - ], - "Description": "Kicks a mentioned user.", - "Usage": [ - ".kick @Someone Get out!", - ".kick \"Some Guy#1234\" Your behaviour is toxic." - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "KickMembers Server Permission" - ] - }, - { - "Aliases": [ - ".timeout" - ], - "Description": "Times the user out for the specified amount of time. You may optionally specify a reason, which will be sent to the user.", - "Usage": [ - ".timeout @Someone 3h Shut up!", - ".timeout @Someone 1h30m" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ModerateMembers Server Permission" - ] - }, - { - "Aliases": [ - ".massban" - ], - "Description": "Bans multiple users at once. Specify a space separated list of IDs of users who you wish to ban.", - "Usage": [ - ".massban 123123123 3333333333 444444444" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "BanMembers Server Permission" - ] - }, - { - "Aliases": [ - ".masskill" - ], - "Description": "Specify a new-line separated list of `userid reason`. You can use Username#discrim instead of UserId. Specified users will be banned from the current server, blacklisted from the bot, and have all of their currency taken away.", - "Usage": [ - ".masskill BadPerson#1234 Toxic person" - ], - "Submodule": "UserPunishCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "BanMembers Server Permission" - ] - }, - { - "Aliases": [ - ".vcrolerm" - ], - "Description": "Removes any `.vcrole` associated with the specified channel ID. This is useful if your vcrole has been enabled on a VC which has been deleted.", - "Usage": [ - ".vcrolerm 123123123123123" - ], - "Submodule": "VcRoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".vcrole" - ], - "Description": "Sets or resets a role which will be given to users who join the voice channel you're in when you run this command. Provide no role name to disable. You must be in a voice channel to run this command.", - "Usage": [ - ".vcrole SomeRole", - ".vcrole" - ], - "Submodule": "VcRoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".vcrolelist" - ], - "Description": "Shows a list of currently set voice channel roles.", - "Usage": [ - ".vcrolelist" - ], - "Submodule": "VcRoleCommands", - "Module": "Administration", - "Options": null, - "Requirements": [] - } - ], - "Expressions": [ - { - "Aliases": [ - ".exprtoggleglobal", - ".extg" - ], - "Description": "Toggles whether global expressions are usable on this server.", - "Usage": [ - ".exprtoggleglobal" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".expradds", - ".exadds", - ".exas", - ".expraddserver" - ], - "Description": "Add an expression with a trigger and a response in this server. Bot will post a response whenever someone types the trigger word. This command is useful if you want to lower the permission requirement for managing expressions by using `.dpo`. Guide [here]().", - "Usage": [ - ".expradds \"hello\" Hi there %user.mention%" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".expradd", - ".exadd", - ".exa", - ".acr" - ], - "Description": "Add an expression with a trigger and a response. Bot will post a response whenever someone types the trigger word. Running this command in a server requires the Administrator permission. Running this command in DM is Bot Owner only and adds a new global expression. Guide [here]()", - "Usage": [ - ".expradd \"hello\" Hi there %user.mention%" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".expredit", - ".exe", - ".exedit", - ".ecr" - ], - "Description": "Edits the expression's response given its ID.", - "Usage": [ - ".expredit 123 I'm a magical girl" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".exprlist", - ".exl", - ".exprli", - ".exlist", - ".exli", - ".lcr" - ], - "Description": "Lists global or server expressions (20 expressions per page).\nRunning the command in DM will list global expressions, while running it in a server will list server expressions.\nShows enabled settings, followed by id, followed by the trigger.\n**Settings:** \n• 🗯️ Triggered if trigger matches any phrase (`.h exca`)\n• ✉️ Response will be DMed (`.h exdm`)\n• ❌ Trigger message will be deleted (`.h exad`)", - "Usage": [ - ".exprlist 1" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".exprshow", - ".exs", - ".exshow", - ".scr" - ], - "Description": "Shows an expression's response on a given ID.", - "Usage": [ - ".exprshow 1" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".exprdelserv", - ".exds", - ".exdelserv" - ], - "Description": "Deletes an expression on a specific index on this server. This command is useful if you want to lower the permission requirement for managing expressions by using `.dpo`.", - "Usage": [ - ".exprdelserv 5c" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".exprdel", - ".exd", - ".exdel", - ".dcr" - ], - "Description": "Deletes an expression by index. If ran in DM, it is bot owner only and deletes a global expression. Running this command in a server requires the Administrator permission and deletes a server expression.", - "Usage": [ - ".exprdel 5" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".exreact", - ".exr" - ], - "Description": "Sets or resets reactions (up to 3) which will be added to the response message of the Expression with the specified ID. Provide no emojis to reset.", - "Usage": [ - ".exreact 59 👍 👎", - ".exreact 59 ", - ".exreact 59" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".exprca", - ".exca" - ], - "Description": "Toggles whether the expression will trigger if the triggering message contains the keyword (instead of only starting with it).", - "Usage": [ - ".exprca 44" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".exprdm", - ".exdm" - ], - "Description": "Toggles whether the response message of the expression will be sent as a direct message.", - "Usage": [ - ".exprdm 44" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".exprad", - ".exad" - ], - "Description": "Toggles whether the message triggering the expression will be automatically deleted.", - "Usage": [ - ".exprad 59" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".exprat", - ".exat" - ], - "Description": "Toggles whether the expression will allow extra input after the trigger. For example, with this feature enabled, expression with trigger 'hi' will also be invoked when a user types 'hi there'. This feature is automatically enabled on expressions which have '%target%' in their response.", - "Usage": [ - ".exprat 59" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".expreload", - ".exrel" - ], - "Description": "Reloads all expressions on all shards. Use this if you've made changes to the database while the bot is running, or used `.deleteunusedcrnq`", - "Usage": [ - ".expreload" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".exprclear", - ".exc", - ".exclear" - ], - "Description": "Deletes all expression on this server.", - "Usage": [ - ".exprclear" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".exexport" - ], - "Description": "Exports expressions from the current server (or global expressions in DMs) into a .yml file", - "Usage": [ - ".exexport" - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".eximport" - ], - "Description": "Upload the file or send the raw .yml data with this command to import all expressions from the specified string or file into the current server (or as global expressions in dm)", - "Usage": [ - ".eximport " - ], - "Submodule": "Expressions", - "Module": "Expressions", - "Options": null, - "Requirements": [] - } - ], - "Gambling": [ - { - "Aliases": [ - ".timely" - ], - "Description": "Use to claim your timely currency.\nThis is usually set by the bot owners to be daily, hourly or once every 12 hours.\nBot owner has to specify the amount and the period on how often you can claim your currency.", - "Usage": [ - ".timely" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".timelyreset" - ], - "Description": "Resets all user timeouts on `.timely` command.", - "Usage": [ - ".timelyreset" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".timelyset" - ], - "Description": "Sets the 'timely' currency allowance amount for users. Second parameter is period in hours, default is 24 hours.", - "Usage": [ - ".timelyset 100", - ".timelyset 50 12" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".raffle" - ], - "Description": "Prints a name and ID of a random online user from the server, or from the online user in the specified role.", - "Usage": [ - ".raffle", - ".raffle RoleName" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".raffleany" - ], - "Description": "Prints a name and ID of a random user from the server, or from the specified role.", - "Usage": [ - ".raffleany", - ".raffleany RoleName" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".curtrs" - ], - "Description": "Shows your currency transactions on the specified page. Bot owner can see other people's transactions too.", - "Usage": [ - ".curtrs 2", - ".curtrs @SomeUser 2" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".curtr" - ], - "Description": "Shows full details about a currency transaction with the specified ID. You can only check your own transactions.", - "Usage": [ - ".curtr 3yvd" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".cash", - ".$", - ".currency", - ".$$", - ".$$$", - ".cur" - ], - "Description": "Check how much currency a person has.\nIf no argument is provided it will check your own balance.", - "Usage": [ - ".cash", - ".cash @Someone" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".give" - ], - "Description": "Give someone a certain amount of currency. You can specify the reason after the mention.", - "Usage": [ - ".give 1 @Someone", - ".give 5 @CootGurl Ur so pwetty" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".award" - ], - "Description": "Awards someone a certain amount of currency. You can specify the reason after the Username. You can also specify a role name to award currency to all users in a role.", - "Usage": [ - ".award 100 @person", - ".award 5 Role Of Gamblers" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".take", - ".seize" - ], - "Description": "Takes the specified amount of currency from someone. You can specify a role instead to take the specified amount of currency from all users in the role.", - "Usage": [ - ".take 1 @Someone", - ".take 50 SomeRole" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".betroll", - ".br" - ], - "Description": "Bets the specified amount of currency and rolls a dice.\nRolling over 66 yields x2 of your currency, over 90 - x4 and 100 x10.\nYou can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance.", - "Usage": [ - ".betroll 5" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".leaderboard", - ".lb" - ], - "Description": "Displays the bot's currency leaderboard, or in other words, the richest users.\nSpecifying -c flag will show only users who are in this server.\nPaginated with 10 users per page.", - "Usage": [ - ".leaderboard", - ".leaderboard -c" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": [ - "`--clean` (`-c`) Only show users who are on the server. " - ], - "Requirements": [] - }, - { - "Aliases": [ - ".rps" - ], - "Description": "Play a game of Rocket-Paperclip-Scissors with Ellie.\nYou can bet on it. Winning awards you 1.95x of the bet.\nYou can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance.", - "Usage": [ - ".rps r 100", - ".rps scissors" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".luckyladder", - ".lula", - ".wheel", - ".wof" - ], - "Description": "Bets the specified amount of currency on the lucky ladder. You can stop on one of many different multipliers. The won amount is rounded down to the nearest whole number. You can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance.", - "Usage": [ - ".luckyladder 10" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".bettest" - ], - "Description": "Tests a betting command by specifying the name followed by the number of tests. Some have multiple variations.\nSee the list of all tests by specifying no parameters.", - "Usage": [ - ".bettest", - ".bettest betflip 1000", - ".bettest slot 2000" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".rakeback", - ".rb" - ], - "Description": "Try to claim any rakeback that you have available.\nRakeback is accumulated by betting (not by winning or losing).\nDefault rakeback is 0.05 * house edge\nHouse edge is defined per game", - "Usage": [ - ".rakeback" - ], - "Submodule": "Gambling", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".race" - ], - "Description": "Starts a new animal race.", - "Usage": [ - ".race" - ], - "Submodule": "AnimalRacingCommands", - "Module": "Gambling", - "Options": [ - "`--start-time` (`-s`) " - ], - "Requirements": [] - }, - { - "Aliases": [ - ".joinrace", - ".jr" - ], - "Description": "Joins a new race. You can specify an amount of currency for betting (optional). You will get YourBet*(participants-1) back if you win.", - "Usage": [ - ".joinrace", - ".joinrace 5" - ], - "Submodule": "AnimalRacingCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".bank deposit", - ".bank d", - ".bank dep" - ], - "Description": "Deposits the specified amount of currency into the bank for later use.", - "Usage": [ - ".bank deposit 50" - ], - "Submodule": "Bank", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".bank withdraw", - ".bank w", - ".bank with" - ], - "Description": "Withdraws the specified amount of currency from the bank if available.", - "Usage": [ - ".bank withdraw 49" - ], - "Submodule": "Bank", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".bank balance", - ".bank b", - ".bank bal" - ], - "Description": "Shows how much currency is in your bank account.\nThis differs from your cash amount, as the cash amount is publicly available, but only you have access to your bank balance.\nHowever, you have to withdraw it first in order to use it.\nBot Owner can also check another user's bank balance.", - "Usage": [ - ".bank balance", - ".bank balance @User" - ], - "Submodule": "Bank", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".bank take", - ".bank seize" - ], - "Description": "Takes the specified amount of currency from a user's bank", - "Usage": [ - ".bank take 500 @MoniLaunder" - ], - "Submodule": "Bank", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".bank award" - ], - "Description": "Award the specified amount of currency to a user's bank", - "Usage": [ - ".bank award 99999 @Bestie" - ], - "Submodule": "Bank", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".betstatsreset", - ".bsr", - ".bsreset" - ], - "Description": "Reset all of your Bet Stats for a fee.\nYou can alternatively reset Bet Stats for the specified game.", - "Usage": [ - ".betstatsreset", - ".betstatsreset game" - ], - "Submodule": "BetStatsCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".betstats", - ".bs" - ], - "Description": "Shows the current bet stats for yourself, or the targetted user.\nYou may optionally specify the game to show stats for.\nSupported games right now are: bf, br, bd, lula, slot, race", - "Usage": [ - ".betstats", - ".betstats @someone", - ".betstats @someone lula", - ".betstats bd" - ], - "Submodule": "BetStatsCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".gamblestats", - ".gs" - ], - "Description": "Shows the total stats of several gambling features.\nUpdates once an hour.", - "Usage": [ - ".gamblestats" - ], - "Submodule": "BetStatsCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".gamblestatsreset", - ".gsr", - ".gsreset" - ], - "Description": "Resets the gamble stats.", - "Usage": [ - ".gamblestatsreset" - ], - "Submodule": "BetStatsCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".blackjack", - ".bj" - ], - "Description": "Start or join a blackjack game by specifying the amount you're betting. \nYou must specify the amount you're betting. \nUse `.hit`, `.stand` and `.double` commands to play. \nGame is played with 4 decks. \nDealer hits on soft 17 and wins draws.", - "Usage": [ - ".blackjack 50" - ], - "Submodule": "BlackJackCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".hit" - ], - "Description": "In the blackjack game, ask the dealer for an extra card.", - "Usage": [ - ".hit" - ], - "Submodule": "BlackJackCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".stand" - ], - "Description": "Finish your turn in the blackjack game.", - "Usage": [ - ".stand" - ], - "Submodule": "BlackJackCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".double" - ], - "Description": "In the blackjack game, double your bet in order to receive exactly one more card, and your turn ends.", - "Usage": [ - ".double" - ], - "Submodule": "BlackJackCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".connect4", - ".con4" - ], - "Description": "Creates or joins an existing connect4 game. 2 players are required for the game. Objective of the game is to get 4 of your pieces next to each other in a vertical, horizontal or diagonal line. You can specify a bet when you create a game and only users who bet the same amount will be able to join your game.", - "Usage": [ - ".connect4" - ], - "Submodule": "Connect4Commands", - "Module": "Gambling", - "Options": [ - "`--turn-timer` (`-t`) Turn time in seconds. It has to be between 5 and 60. Default 15. " - ], - "Requirements": [] - }, - { - "Aliases": [ - ".roll" - ], - "Description": "Rolls 0-100. If you supply a number `X` it rolls up to 30 normal dice. If you split 2 numbers with letter `d` (`xdy`) it will roll `X` dice from 1 to `y`. `Y` can be a letter 'F' if you want to roll fate dice instead of dnd.", - "Usage": [ - ".roll", - ".roll 7", - ".roll 3d5", - ".roll 5dF" - ], - "Submodule": "DiceRollCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".rolluo" - ], - "Description": "Rolls `X` normal dice (up to 30) unordered. If you split 2 numbers with letter `d` (`xdy`) it will roll `X` dice from 1 to `y`.", - "Usage": [ - ".rolluo", - ".rolluo 7", - ".rolluo 3d5" - ], - "Submodule": "DiceRollCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".nroll" - ], - "Description": "Rolls in a given range. If you specify just one number instead of the range, it will roll from 0 to that number.", - "Usage": [ - ".nroll 5", - ".nroll 5-15" - ], - "Submodule": "DiceRollCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".draw" - ], - "Description": "Draws a card from this server's deck. You can draw up to 10 cards by supplying a number of cards to draw.", - "Usage": [ - ".draw", - ".draw 5" - ], - "Submodule": "DrawCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".drawnew" - ], - "Description": "Draws a card from the NEW deck of cards. You can draw up to 10 cards by supplying a number of cards to draw.", - "Usage": [ - ".drawnew", - ".drawnew 5" - ], - "Submodule": "DrawCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".deckshuffle", - ".dsh" - ], - "Description": "Reshuffles all cards back into the deck.", - "Usage": [ - ".deckshuffle" - ], - "Submodule": "DrawCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".betdraw", - ".bd" - ], - "Description": "Bet on the card value and/or color. Specify the amount followed by your guess. \nYou can specify `r` or `b` for red or black, and `h` or `l` for high or low.\nYou can specify only h/l or only r/b or both.\nReturns are high but **7 always loses**.\nYou can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance.", - "Usage": [ - ".betdraw 50 r", - ".betdraw 200 b l", - ".betdraw 1000 h", - ".betdraw 38 hi black" - ], - "Submodule": "DrawCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".eventstart" - ], - "Description": "Starts one of the events seen on public Ellie.\nEvents: `reaction`, `gamestatus`", - "Usage": [ - ".eventstart reaction", - ".eventstart reaction -d 1 -a 50 --pot-size 1500" - ], - "Submodule": "CurrencyEventsCommands", - "Module": "Gambling", - "Options": [ - "`--amount` (`-a`) Amount of currency each user receives. ", - "`--pot-size` (`-p`) The maximum amount of currency that can be rewarded. 0 means no limit. ", - "`--duration` (`-d`) Number of hours the event should run for. Default 24. " - ], - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".flip" - ], - "Description": "Flips coin(s) - heads or tails, and shows an image.", - "Usage": [ - ".flip", - ".flip 3" - ], - "Submodule": "FlipCoinCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".betflip", - ".bf" - ], - "Description": "Bet on the coin flip.\nThe result can be heads or tails.\nGuessing correctly rewards you with 1.95x of the currency you've bet (rounded up).\nMultiplier can be changed by the bot owner.\nYou can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance.", - "Usage": [ - ".betflip 5 heads", - ".betflip 3 t" - ], - "Submodule": "FlipCoinCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".pick" - ], - "Description": "Picks the currency planted in this channel. If the plant has a password, you need to specify it.", - "Usage": [ - ".pick", - ".pick passwd" - ], - "Submodule": "PlantPickCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".plant" - ], - "Description": "Spend an amount of currency to plant it in this channel. Default is 1. You can specify the password after the amount. Password has to be alphanumeric and it will be trimmed down to 10 characters if it's longer.", - "Usage": [ - ".plant 5", - ".plant 10 meow" - ], - "Submodule": "PlantPickCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".gencurrency", - ".gc" - ], - "Description": "Toggles currency generation on this channel. Every posted message will have chance to spawn currency. Chance is specified by the Bot Owner. (default is 2%)", - "Usage": [ - ".gencurrency" - ], - "Submodule": "PlantPickCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".gencurlist", - ".gclist" - ], - "Description": "Shows the list of server and channel ids where gc is enabled. Paginated with 9 per page.", - "Usage": [ - ".gencurlist" - ], - "Submodule": "PlantPickCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".shop" - ], - "Description": "Lists this server's administrators' shop. Paginated.", - "Usage": [ - ".shop", - ".shop 2" - ], - "Submodule": "ShopCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".shopbuy", - ".buy" - ], - "Description": "Buys an item from the shop on a given index. If buying items, make sure that the bot can DM you.", - "Usage": [ - ".shopbuy 2" - ], - "Submodule": "ShopCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".shopadd" - ], - "Description": "Adds an item to the shop.\nFirst you begin by specifying the type of the item you wish to add.\nAvailable types are role, list and command.\nIf the item is a role, specify a role id or a role name.\nIn case you're selling a command, and you need user's name, id etc, you can use the following placeholders:\n- `%you%` - Buyer mention\n- `%you.id%` - Buyer's user ID\n- `%you.username%` - Buyer's username\n- `%you.name%` - Buyer's global name\n- `%you.nick%` - Buyer's display name\n90% of currency from each purchase will be received by the user who added the item to the shop. This is configurable by the bot owner", - "Usage": [ - ".shopadd role 1000 Rich", - ".shopadd cmd 1000 .setrole %user% Rich" - ], - "Submodule": "ShopCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".shoplistadd" - ], - "Description": "Adds an item to the list of items for sale in the shop entry given the index. You usually want to run this command in the secret channel, so that the unique items are not leaked.", - "Usage": [ - ".shoplistadd 1 Uni-que-Steam-Key" - ], - "Submodule": "ShopCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".shopremove", - ".shoprm" - ], - "Description": "Removes an item from the shop by its ID.", - "Usage": [ - ".shopremove 1" - ], - "Submodule": "ShopCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".shopchangeprice", - ".shopprice" - ], - "Description": "Change the price of a shop entry at the specified index. Specify the index of the entry, followed by the price", - "Usage": [ - ".shopchangeprice 1 500" - ], - "Submodule": "ShopCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".shopchangename", - ".shopname" - ], - "Description": "Change the name of a shop entry at the specified index. Only works for non-role items", - "Usage": [ - ".shopchangename 3 Cool stuff" - ], - "Submodule": "ShopCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".shopswap" - ], - "Description": "Swap the index of two shop entries", - "Usage": [ - ".shopswap 1 5" - ], - "Submodule": "ShopCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".shopmove" - ], - "Description": "Moves the shop entry from the current index to a new one", - "Usage": [ - ".shopmove 2 4" - ], - "Submodule": "ShopCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".shopreq" - ], - "Description": "Sets a role which will be required to buy the item on the specified index. Specify only index to remove the requirement.", - "Usage": [ - ".shopreq 2 Gamers", - ".shopreq 2" - ], - "Submodule": "ShopCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".slot", - ".slots" - ], - "Description": "Play Ellie slots by placing your bet.\nYou can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance.", - "Usage": [ - ".slot 5", - ".slot all" - ], - "Submodule": "SlotCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".waifureset" - ], - "Description": "Resets your waifu stats, except current waifus.", - "Usage": [ - ".waifureset" - ], - "Submodule": "WaifuClaimCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".waifuclaims", - ".claims", - ".wcs" - ], - "Description": "Shows all of your currently claimed waifus.", - "Usage": [ - ".waifuclaims" - ], - "Submodule": "WaifuClaimCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".waifuclaim", - ".claim - wc" - ], - "Description": "Claim a waifu for yourself by spending currency. You must spend at least 10% more than her current value unless she set `.affinity` towards you.", - "Usage": [ - ".waifuclaim 50 @Himesama" - ], - "Submodule": "WaifuClaimCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".waifutransfer" - ], - "Description": "Transfer the ownership of one of your waifus to another user. You must pay 10% of your waifu's value unless that waifu has affinity towards you, in which case you must pay 60% fee. Transferred waifu's price will be reduced by the fee amount.", - "Usage": [ - ".waifutransfer @ExWaifu @NewOwner" - ], - "Submodule": "WaifuClaimCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".divorce" - ], - "Description": "Releases your claim on a specific waifu. You will get 50% of that waifu's value back, unless that waifu has an affinity towards you, in which case they will be reimbursed instead. 6 hours cooldown.", - "Usage": [ - ".divorce @CheatingSloot" - ], - "Submodule": "WaifuClaimCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".affinity", - ".waifuaff" - ], - "Description": "Sets your affinity towards someone you want to be claimed by. Setting affinity will reduce their `.claim` on you by 20%. Provide no parameters to clear your affinity. 30 minutes cooldown.", - "Usage": [ - ".affinity @MyHusband", - ".affinity" - ], - "Submodule": "WaifuClaimCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".waifulb", - ".waifus" - ], - "Description": "Shows top 9 waifus. You can specify another page to show other waifus.", - "Usage": [ - ".waifulb", - ".waifulb 3" - ], - "Submodule": "WaifuClaimCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".waifuinfo", - ".waifustats" - ], - "Description": "Shows waifu stats for a target person. Defaults to you if no user is provided.", - "Usage": [ - ".waifuinfo @MyCrush", - ".waifuinfo" - ], - "Submodule": "WaifuClaimCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".waifugift", - ".gift", - ".gifts" - ], - "Description": "Gift an item to a waifu user.\nThe waifu's value will be increased by the percentage of the gift's value.\nYou can optionally prefix the gift with a multiplier to gift the item that many times.\nFor example, 3xRose will give the waifu 3 roses, 10xBread will give the waifu 10 breads. Do not use plural forms.\nNegative gifts will not show up in waifuinfo. \nProvide no parameters to see a list of items that you can gift.", - "Usage": [ - ".waifugift", - ".waifugift Rose @Himesama" - ], - "Submodule": "WaifuClaimCommands", - "Module": "Gambling", - "Options": null, - "Requirements": [] - } - ], - "Games": [ - { - "Aliases": [ - ".choose" - ], - "Description": "Chooses a thing from a list of things. Separate items with a semicolon ;", - "Usage": [ - ".choose Get up;Sleep;Sleep more" - ], - "Submodule": "Games", - "Module": "Games", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".eightball", - ".8ball" - ], - "Description": "Ask the 8ball a yes/no question.", - "Usage": [ - ".eightball Is b1nzy a nice guy?" - ], - "Submodule": "Games", - "Module": "Games", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".acrophobia", - ".acro" - ], - "Description": "Starts an Acrophobia game.", - "Usage": [ - ".acrophobia", - ".acrophobia -s 30" - ], - "Submodule": "AcropobiaCommands", - "Module": "Games", - "Options": [ - "`--submission-time` (`-s`) Time after which the submissions are closed and voting starts. ", - "`--vote-time` (`-v`) Time after which the voting is closed and the winner is declared. " - ], - "Requirements": [] - }, - { - "Aliases": [ - ".cleverbot", - ".chatbot", - ".chatgpt" - ], - "Description": "Toggles cleverbot/chatgpt session.\nWhen enabled, the bot will reply to messages starting with bot mention in the server.\nExpressions starting with %bot.mention% won't work if cleverbot/chatgpt is enabled.", - "Usage": [ - ".cleverbot" - ], - "Submodule": "ChatterBotCommands", - "Module": "Games", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".hangmanlist" - ], - "Description": "Shows a list of hangman question categories.", - "Usage": [ - ".hangmanlist" - ], - "Submodule": "HangmanCommands", - "Module": "Games", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".hangman" - ], - "Description": "Starts a game of hangman in the channel. You can optionally select a category `.hangmanlist` to see a list of available categories.", - "Usage": [ - ".hangman", - ".hangman movies" - ], - "Submodule": "HangmanCommands", - "Module": "Games", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".hangmanstop" - ], - "Description": "Stops the active hangman game on this channel if it exists.", - "Usage": [ - ".hangmanstop" - ], - "Submodule": "HangmanCommands", - "Module": "Games", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".ncanvas", - ".nc", - ".ncanv" - ], - "Description": "Shows the current nCanvas.\nThe canvas allows users to set each pixel's color and text using currency.", - "Usage": [ - ".ncanvas" - ], - "Submodule": "NCanvasCommands", - "Module": "Games", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".nczoom", - ".ncz" - ], - "Description": "Zooms in on the nCanvas.\nBot will show the 10x10 grid with the position of each cell for use with `ncset`.\nYou can either use alphanumeric position (ex. s4u) or pixel x and y (ex. 123 123)", - "Usage": [ - ".nczoom sgu", - ".nczoom 123 123" - ], - "Submodule": "NCanvasCommands", - "Module": "Games", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".ncsetpixel", - ".ncsp", - ".ncs" - ], - "Description": "Sets a pixel's color and text on the nCanvas.\nYou must specify the position of the pixel to set in alphanumeric format.\nYou can obtain alphanumeric position of the pixel by using `nczoom` or `ncp `", - "Usage": [ - ".ncsetpixel sgu #ff0000 Some text" - ], - "Submodule": "NCanvasCommands", - "Module": "Games", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".ncpixel", - ".ncp", - ".ncgp" - ], - "Description": "Shows the pixel at the specified position.\nYou can get pixel positions by using `nczoom`", - "Usage": [ - ".ncpixel sgu", - ".ncpixel 123 123" - ], - "Submodule": "NCanvasCommands", - "Module": "Games", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".ncsetimg", - ".ncsi" - ], - "Description": "Attach the image to the message sending the command to overwrite the nCanvas with it.\nAll prices and colors will be reset.\nThe image must be equal to the size of the nCanvas (default is 500x350)\nThis command is dangerous and irreversible.", - "Usage": [ - ".ncsetimg" - ], - "Submodule": "NCanvasCommands", - "Module": "Games", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".ncreset" - ], - "Description": "Clears the nCanvas.\nAll prices and colors will be reset.\nThis command is dangerous and irreversible.", - "Usage": [ - ".ncreset" - ], - "Submodule": "NCanvasCommands", - "Module": "Games", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".nunchi" - ], - "Description": "Creates or joins an existing nunchi game. Users have to count up by 1 from the starting number shown by the bot. If someone makes a mistake (types an incorrect number, or repeats the same number) they are out of the game and a new round starts without them. Minimum 3 users required.", - "Usage": [ - ".nunchi" - ], - "Submodule": "NunchiCommands", - "Module": "Games", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".typestart" - ], - "Description": "Starts a typing contest.", - "Usage": [ - ".typestart" - ], - "Submodule": "SpeedTypingCommands", - "Module": "Games", - "Options": [ - "`--start-time` (`-s`) How long does it take for the race to start. Default 5. " - ], - "Requirements": [] - }, - { - "Aliases": [ - ".typestop" - ], - "Description": "Stops a typing contest on the current channel.", - "Usage": [ - ".typestop" - ], - "Submodule": "SpeedTypingCommands", - "Module": "Games", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".typeadd" - ], - "Description": "Adds a new article to the typing contest.", - "Usage": [ - ".typeadd wordswords" - ], - "Submodule": "SpeedTypingCommands", - "Module": "Games", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".typelist" - ], - "Description": "Lists added typing articles with their IDs. 15 per page.", - "Usage": [ - ".typelist", - ".typelist 3" - ], - "Submodule": "SpeedTypingCommands", - "Module": "Games", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".typedel" - ], - "Description": "Deletes a typing article given the ID.", - "Usage": [ - ".typedel 3" - ], - "Submodule": "SpeedTypingCommands", - "Module": "Games", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".tictactoe", - ".ttt" - ], - "Description": "Starts a game of tic tac toe.\nAnother user must run the command in the same channel in order to accept the challenge.\nUse numbers 1-9 to play.", - "Usage": [ - ".tictactoe" - ], - "Submodule": "TicTacToeCommands", - "Module": "Games", - "Options": [ - "`--turn-timer` (`-t`) Turn time in seconds. Default 15. " - ], - "Requirements": [] - }, - { - "Aliases": [ - ".trivia", - ".t" - ], - "Description": "Starts a game of trivia.\nFirst player to get to 10 points wins by default.\n30 seconds per question.", - "Usage": [ - ".trivia", - ".trivia --timeout 5 -p -w 3 -q 10" - ], - "Submodule": "TriviaCommands", - "Module": "Games", - "Options": [ - "`--pokemon` (`-p`) Whether it's 'Who's that pokemon?' trivia. ", - "`--nohint` Don't show any hints. ", - "`--win-req` (`-w`) Winning requirement. Set 0 for an infinite game. Default 10. ", - "`--question-timer` (`-q`) How long until the question ends. Default 30. ", - "`--timeout` (`-t`) Number of questions of inactivity in order stop. Set 0 for never. Default 10. " - ], - "Requirements": [] - }, - { - "Aliases": [ - ".tl" - ], - "Description": "Shows a current trivia leaderboard.", - "Usage": [ - ".tl" - ], - "Submodule": "TriviaCommands", - "Module": "Games", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".tq" - ], - "Description": "Quits current trivia after current question.", - "Usage": [ - ".tq" - ], - "Submodule": "TriviaCommands", - "Module": "Games", - "Options": null, - "Requirements": [] - } - ], - "Help": [ - { - "Aliases": [ - ".modules", - ".mdls" - ], - "Description": "List all of the bot's modules.\nEach module contains commands that you can use.", - "Usage": [ - ".modules" - ], - "Submodule": "Help", - "Module": "Help", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".commands", - ".cmds" - ], - "Description": "List all of the bot's commands in the specified module.\nYou can either specify the full name or only the first few letters of the module name.\nSpecifying no module will show the list of modules instead.", - "Usage": [ - ".commands Admin", - ".commands Admin --view 1", - ".commands" - ], - "Submodule": "Help", - "Module": "Help", - "Options": [ - "`--view` (`-v`) Specifies how to output the list of commands. 0 - Hide commands which you can't use, 1 - Cross out commands which you can't use, 2 - Show all. " - ], - "Requirements": [] - }, - { - "Aliases": [ - ".h", - ".help" - ], - "Description": "Shows help for a single command.\nCommand help contains instructions on how to use the command with examples and a list of parameters.\nDMs you helpful links if no parameters are specified.", - "Usage": [ - ".h .cmds", - ".h" - ], - "Submodule": "Help", - "Module": "Help", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".gencmdlist" - ], - "Description": "Generates a json of the commands list and sends it to the chat.", - "Usage": [ - ".gencmdlist" - ], - "Submodule": "Help", - "Module": "Help", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".guide", - ".readme" - ], - "Description": "Sends a readme and a guide links to the channel.", - "Usage": [ - ".guide" - ], - "Submodule": "Help", - "Module": "Help", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".donate" - ], - "Description": "Provides instructions for helping the project financially.", - "Usage": [ - ".donate" - ], - "Submodule": "Help", - "Module": "Help", - "Options": null, - "Requirements": [ - "Only Public Bot" - ] - }, - { - "Aliases": [ - ".patron" - ], - "Description": "Check your patronage status and command usage quota. Bot owners can check targeted user's patronage status.", - "Usage": [ - ".patron" - ], - "Submodule": "Patronage", - "Module": "Help", - "Options": null, - "Requirements": [ - "Only Public Bot" - ] - }, - { - "Aliases": [ - ".patronmessage", - ".patronmsg" - ], - "Description": "Sends a message to all patrons of the specified tier and higher.\nSupports [embeds](https://eb.elliebot.net/)", - "Usage": [ - ".patronmessage x hello" - ], - "Submodule": "Patronage", - "Module": "Help", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "Only Public Bot" - ] - } - ], - "Marmalade": [ - { - "Aliases": [ - ".marmaladeload", - ".maload" - ], - "Description": "Loads a marmalade with the specified name from the data/marmalades/ folder.\nProvide no name to see the list of loadable marmalades.\nRead about the marmalade system [here](https://docs.elliebot.net/ellie/marmalade/creating-a-marmalade/)", - "Usage": [ - ".marmaladeload mycoolmarmalade", - ".marmaladeload" - ], - "Submodule": "Marmalade", - "Module": "Marmalade", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".marmaladeunload", - ".maunload" - ], - "Description": "Unloads the previously loaded marmalade.\nProvide no name to see the list of unloadable marmalades. \nRead about the marmalade system [here](https://docs.elliebot.net/ellie/marmalade/creating-a-marmalade/)", - "Usage": [ - ".marmaladeunload mycoolmarmalade", - ".marmaladeunload" - ], - "Submodule": "Marmalade", - "Module": "Marmalade", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".marmaladelist", - ".malist" - ], - "Description": "Lists all loaded and unloaded marmalades.\nRead about the marmalade system [here](https://docs.elliebot.net/ellie/marmalade/creating-a-marmalade/)", - "Usage": [ - ".marmaladelist" - ], - "Submodule": "Marmalade", - "Module": "Marmalade", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".marmaladeinfo", - ".mainfo" - ], - "Description": "Shows information about the specified marmalade such as the author, name, description, list of canaries, number of commands etc.\nProvide no name to see the basic information about all loaded marmalades. \nRead about the marmalade system [here](https://docs.elliebot.net/ellie/marmalade/creating-a-marmalade/)", - "Usage": [ - ".marmaladeinfo mycoolmarmalade", - ".marmaladeinfo" - ], - "Submodule": "Marmalade", - "Module": "Marmalade", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".marmaladesearch", - ".masearchw" - ], - "Description": "Searches for marmalades online given the search term", - "Usage": [ - ".marmaladesearch shrine" - ], - "Submodule": "Marmalade", - "Module": "Marmalade", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - } - ], - "Music": [ - { - "Aliases": [ - ".join", - ".j", - ".move", - ".mv" - ], - "Description": "Makes the bot join your voice channel.", - "Usage": [ - ".join" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".destroy", - ".d" - ], - "Description": "Completely stops the music and unbinds the bot from the channel. (may cause weird behaviour)", - "Usage": [ - ".destroy" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".play", - ".p", - ".start" - ], - "Description": "Queues up and plays a song or video based on a search query, song name, artist name or youtube link.\nIf no parameters are specified, it will skip the current song.\nIf you specify a song number, it will jump to that song.\nIf you specify a search query, acts as a `.q` command\n**You must be in a voice channel**.", - "Usage": [ - ".play", - ".play 5", - ".play Dream Of Venice" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".queue", - ".q", - ".yq", - ".enqueue" - ], - "Description": "Queues up and plays a song or video based on a search query, song name, artist name, search query or youtube link.\nBot will join your voice channel. \n**You must be in a voice channel**.", - "Usage": [ - ".queue Dream Of Venice" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".queuenext", - ".qn" - ], - "Description": "Works the same as `.queue` command, except it enqueues the new song after the current one. **You must be in a voice channel**.", - "Usage": [ - ".queuenext Dream Of Venice" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".volume", - ".vol", - ".defvol" - ], - "Description": "Sets the music playback volume (0-100%). Persistent server setting. Default 100", - "Usage": [ - ".volume 50" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".next", - ".n" - ], - "Description": "Goes to the next song in the queue. You have to be in the same voice channel as the bot", - "Usage": [ - ".next" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".listqueue", - ".lq" - ], - "Description": "Lists 10 currently queued songs per page. Default page is 1.", - "Usage": [ - ".listqueue", - ".listqueue 2" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".queuesearch", - ".qs", - ".yqs" - ], - "Description": "Search for top 5 youtube song result using keywords, and type the index of the song to play that song. Bot will join your voice channel. **You must be in a voice channel**.", - "Usage": [ - ".queuesearch Dream Of Venice" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".songremove", - ".srm", - ".trackremove", - ".trm" - ], - "Description": "Remove a song by its # in the queue, or 'all' (or provide no parameter) to remove all songs from the queue.", - "Usage": [ - ".songremove 5", - ".songremove all", - ".songremove" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".stop", - ".s" - ], - "Description": "Stops the music and preserves the current song index. Stays in the channel.", - "Usage": [ - ".stop" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".queuerepeat", - ".qrp", - ".rpl" - ], - "Description": "Sets music player repeat strategy for this server.\n- `n` / `no` - player will stop once it reaches the end of the queue\n- `s` / `song` - player will repeat current song\n- `q` / `queue` or empty - player will repeat entire music queue", - "Usage": [ - ".queuerepeat", - ".queuerepeat n", - ".queuerepeat song" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".pause" - ], - "Description": "Pauses or Unpauses the song.", - "Usage": [ - ".pause" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".radio", - ".ra" - ], - "Description": "Queues a radio stream from a link. It can be a direct mp3 radio stream, .m3u, .pls .asx or .xspf (Usage Video: )", - "Usage": [ - ".radio radio link here" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".local", - ".lo" - ], - "Description": "Queues a local file by specifying a full path.", - "Usage": [ - ".local C:/music/mysong.mp3" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".localplaylist", - ".lopl" - ], - "Description": "Queues all songs from a directory.", - "Usage": [ - ".localplaylist C:/music/classical" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".trackmove", - ".tm", - ".movesong", - ".ms" - ], - "Description": "Moves a song from one position to another.", - "Usage": [ - ".trackmove 5 3" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".playlist", - ".pl" - ], - "Description": "Queues up to 500 songs from a youtube playlist specified by a link, or keywords.", - "Usage": [ - ".playlist " - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".nowplaying", - ".np" - ], - "Description": "Shows the song that the bot is currently playing.", - "Usage": [ - ".nowplaying" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".playlistshuffle", - ".shuffle", - ".sh", - ".plsh" - ], - "Description": "Shuffles the current playlist.", - "Usage": [ - ".playlistshuffle" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".setmusicchannel", - ".smch" - ], - "Description": "Sets the current channel as the default music output channel. This will output playing, finished, paused and removed songs to that channel instead of the channel where the first song was queued in. Persistent server setting.", - "Usage": [ - ".setmusicchannel" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot", - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".unsetmusicchannel", - ".usmch" - ], - "Description": "Bot will output playing, finished, paused and removed songs to the channel where the first song was queued in. Persistent server setting.", - "Usage": [ - ".unsetmusicchannel" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot", - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".autodisconnect", - ".autodc" - ], - "Description": "Toggles whether the bot should disconnect from the voice channel once it's done playing all of the songs and queue repeat option is set to `none`.", - "Usage": [ - ".autodisconnect" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".musicquality", - ".mquality" - ], - "Description": "Gets or sets the default music player quality. Available settings: Highest, High, Medium, Low. Default is **Highest**. Provide no argument to see current setting.", - "Usage": [ - ".musicquality", - ".musicquality High", - ".musicquality Low" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot", - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".queueautoplay", - ".qap" - ], - "Description": "Toggles autoplay - When the song is finished, automatically queue a related Youtube song. (Works only for Youtube songs)", - "Usage": [ - ".queueautoplay" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".qfp" - ], - "Description": "Triggers fairplay. The song queue will be re-ordered in a fair manner. No effect on newly added songs.", - "Usage": [ - ".qfp" - ], - "Submodule": "Music", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".playlists", - ".pls" - ], - "Description": "Lists all playlists. Paginated, 20 per page.", - "Usage": [ - ".playlists 1" - ], - "Submodule": "PlaylistCommands", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".deleteplaylist", - ".delpls" - ], - "Description": "Deletes a saved playlist using its id. Works only if you made it or if you are the bot owner.", - "Usage": [ - ".deleteplaylist 5" - ], - "Submodule": "PlaylistCommands", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".playlistshow", - ".plshow" - ], - "Description": "Lists all songs in a playlist specified by its id. Paginated, 20 per page.", - "Usage": [ - ".playlistshow 1" - ], - "Submodule": "PlaylistCommands", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".save" - ], - "Description": "Saves a playlist under a certain name. Playlist name must be no longer than 20 characters and must not contain dashes.", - "Usage": [ - ".save classical1" - ], - "Submodule": "PlaylistCommands", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".load" - ], - "Description": "Loads a saved playlist using its ID. Use `.pls` to list all saved playlists and `.save` to save new ones.", - "Usage": [ - ".load 5" - ], - "Submodule": "PlaylistCommands", - "Module": "Music", - "Options": null, - "Requirements": [ - "No Public Bot" - ] - }, - { - "Aliases": [ - ".deleteplaylists" - ], - "Description": "Deletes everything from MusicPlaylists.", - "Usage": [ - ".deleteplaylists" - ], - "Submodule": "PlaylistCommands", - "Module": "Music", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - } - ], - "Permissions": [ - { - "Aliases": [ - ".verbose", - ".v" - ], - "Description": "Toggles or sets whether to show when a command/module is blocked.", - "Usage": [ - ".verbose", - ".verbose true" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".permrole", - ".pr" - ], - "Description": "Sets a role which can change permissions. Supply no parameters to see the current one. Type 'reset' instead of the role name to reset the currently set permission role. Users with the Administrator server permissions can use permission commands regardless of whether they have the specified role. There is no default permission role.", - "Usage": [ - ".permrole Some Role", - ".permrole reset" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".listperms", - ".lp" - ], - "Description": "Lists whole permission chain with their indexes. You can specify an optional page number if there are a lot of permissions.", - "Usage": [ - ".listperms", - ".listperms 3" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".removeperm", - ".rp" - ], - "Description": "Removes a permission from a given position in the Permissions list.", - "Usage": [ - ".removeperm 1" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".moveperm", - ".mp" - ], - "Description": "Moves permission from one position to another in the Permissions list.", - "Usage": [ - ".moveperm 2 4" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".srvrcmd", - ".sc" - ], - "Description": "Sets a command's permission at the server level.", - "Usage": [ - ".srvrcmd \"command name\" disable" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".srvrmdl", - ".sm" - ], - "Description": "Sets a module's permission at the server level.", - "Usage": [ - ".srvrmdl ModuleName enable" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".usrcmd", - ".uc" - ], - "Description": "Sets a command's permission at the user level.", - "Usage": [ - ".usrcmd \"command name\" enable SomeUsername" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".usrmdl", - ".um" - ], - "Description": "Sets a module's permission at the user level.", - "Usage": [ - ".usrmdl ModuleName enable SomeUsername" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".rolecmd", - ".rc" - ], - "Description": "Sets a command's permission at the role level.", - "Usage": [ - ".rolecmd \"command name\" disable MyRole" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".rolemdl", - ".rm" - ], - "Description": "Sets a module's permission at the role level.", - "Usage": [ - ".rolemdl ModuleName enable MyRole" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".chnlcmd", - ".cc" - ], - "Description": "Sets a command's permission at the channel level.", - "Usage": [ - ".chnlcmd \"command name\" enable SomeChannel" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".chnlmdl", - ".cm" - ], - "Description": "Sets a module's permission at the channel level.", - "Usage": [ - ".chnlmdl ModuleName enable SomeChannel" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".allchnlmdls", - ".acm" - ], - "Description": "Enable or disable all modules in a specified channel.", - "Usage": [ - ".allchnlmdls enable #SomeChannel" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".allrolemdls", - ".arm" - ], - "Description": "Enable or disable all modules for a specific role.", - "Usage": [ - ".allrolemdls [enable/disable] MyRole" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".allusrmdls", - ".aum" - ], - "Description": "Enable or disable all modules for a specific user.", - "Usage": [ - ".allusrmdls enable @Someone" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".allsrvrmdls", - ".asm" - ], - "Description": "Enable or disable all modules for your server.", - "Usage": [ - ".allsrvrmdls [enable/disable]" - ], - "Submodule": "Permissions", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".userblacklist", - ".ubl" - ], - "Description": "Either [add]s or [rem]oves a user or users specified by a Mention or an ID from a blacklist.\nSpecify no argument or a page number to list blacklisted users.", - "Usage": [ - ".userblacklist add @SomeUser @SomeUser2 @SomeUser3", - ".userblacklist rem 12312312313", - ".userblacklist", - ".userblacklist 4" - ], - "Submodule": "BlacklistCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".channelblacklist", - ".cbl" - ], - "Description": "Either [add]s or [rem]oves a channel or channels specified an ID from a blacklist.\nSpecify no argument or a page number to list blacklisted channels.", - "Usage": [ - ".channelblacklist add 12312312312 66666666666", - ".channelblacklist rem 12312312312", - ".channelblacklist", - ".channelblacklist 3" - ], - "Submodule": "BlacklistCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".serverblacklist", - ".sbl" - ], - "Description": "Either [add]s or [rem]oves a server, or servers specified by an ID from a blacklist.\nSpecify no argument or a page number to list blacklisted servers.", - "Usage": [ - ".serverblacklist add 12312321312", - ".serverblacklist rem 12312321312", - ".serverblacklist", - ".serverblacklist 2" - ], - "Submodule": "BlacklistCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".cmdcooldown", - ".cmdcd" - ], - "Description": "Sets a cooldown, in seconds, for a command or an expression which will be applied per user. Set it to 0 to remove the cooldown. Supports a special command `cleverbot:response` which can be used limit how often users can talk to cleverbot", - "Usage": [ - ".cmdcooldown .h 5", - ".cmdcooldown .pat 30" - ], - "Submodule": "CmdCdsCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".allcmdcooldowns", - ".cmdcds" - ], - "Description": "Shows a list of all commands and their respective cooldowns.", - "Usage": [ - ".allcmdcooldowns" - ], - "Submodule": "CmdCdsCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".fwclear" - ], - "Description": "Deletes all filtered words on this server.", - "Usage": [ - ".fwclear" - ], - "Submodule": "FilterCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".filterlist", - ".fl" - ], - "Description": "Lists invite and link filter channels and status.", - "Usage": [ - ".filterlist" - ], - "Submodule": "FilterCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".srvrfilterinv", - ".sfi" - ], - "Description": "Toggles automatic deletion of invites posted in the server. Does not affect users with the Administrator permission.", - "Usage": [ - ".srvrfilterinv" - ], - "Submodule": "FilterCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".chnlfilterinv", - ".cfi" - ], - "Description": "Toggles automatic deletion of invites posted in the channel. Does not negate the `.srvrfilterinv` enabled setting. Does not affect users with the Administrator permission.", - "Usage": [ - ".chnlfilterinv" - ], - "Submodule": "FilterCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".srvrfilterlin", - ".sfl" - ], - "Description": "Toggles automatic deletion of links posted in the server. Does not affect users with the Administrator permission.", - "Usage": [ - ".srvrfilterlin" - ], - "Submodule": "FilterCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".chnlfilterlin", - ".cfl" - ], - "Description": "Toggles automatic deletion of links posted in the channel. Does not negate the `.srvrfilterlin` enabled setting. Does not affect users with the Administrator permission.", - "Usage": [ - ".chnlfilterlin" - ], - "Submodule": "FilterCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".srvrfilterwords", - ".sfw" - ], - "Description": "Toggles automatic deletion of messages containing filtered words on the server. Does not affect users with the Administrator permission.", - "Usage": [ - ".srvrfilterwords" - ], - "Submodule": "FilterCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".chnlfilterwords", - ".cfw" - ], - "Description": "Toggles automatic deletion of messages containing filtered words on the channel. Does not negate the `.srvrfilterwords` enabled setting. Does not affect users with the Administrator permission.", - "Usage": [ - ".chnlfilterwords" - ], - "Submodule": "FilterCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".filterword", - ".fw" - ], - "Description": "Adds or removes (if it exists) a word from the list of filtered words. Use`.sfw` or `.cfw` to toggle filtering.", - "Usage": [ - ".filterword poop" - ], - "Submodule": "FilterCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".lstfilterwords", - ".lfw" - ], - "Description": "Shows a list of filtered words.", - "Usage": [ - ".lstfilterwords" - ], - "Submodule": "FilterCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".globalpermlist", - ".gpl", - ".lgp", - ".globalperms", - ".listglobalperms" - ], - "Description": "Lists global permissions set by the bot owner.", - "Usage": [ - ".globalpermlist" - ], - "Submodule": "GlobalPermissionCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".globalmodule", - ".gmod" - ], - "Description": "Toggles whether a module can be used on any server.", - "Usage": [ - ".globalmodule Gambling" - ], - "Submodule": "GlobalPermissionCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".globalcommand", - ".gcmd" - ], - "Description": "Toggles whether a command can be used on any server.", - "Usage": [ - ".globalcommand .stats" - ], - "Submodule": "GlobalPermissionCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".resetperms" - ], - "Description": "Resets the bot's permissions module on this server to the default value.", - "Usage": [ - ".resetperms" - ], - "Submodule": "ResetPermissionsCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".resetglobalperms" - ], - "Description": "Resets global permissions set by bot owner.", - "Usage": [ - ".resetglobalperms" - ], - "Submodule": "ResetPermissionsCommands", - "Module": "Permissions", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - } - ], - "Searches": [ - { - "Aliases": [ - ".weather", - ".we" - ], - "Description": "Shows current weather data for the specified city.", - "Usage": [ - ".weather Auckland, NZ" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".time" - ], - "Description": "Shows the current time and timezone in the specified location.", - "Usage": [ - ".time London, UK" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".movie", - ".omdb", - ".imdb" - ], - "Description": "Queries omdb for movies or series, show first result.", - "Usage": [ - ".movie Batman vs Superman" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".randomcat", - ".meow" - ], - "Description": "Shows a random cat image.", - "Usage": [ - ".randomcat" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".randomdog", - ".woof" - ], - "Description": "Shows a random dog image.", - "Usage": [ - ".randomdog" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".randomfood", - ".yum" - ], - "Description": "Shows a random food image.", - "Usage": [ - ".randomfood" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".randombird", - ".birb", - ".bird" - ], - "Description": "Shows a random bird image.", - "Usage": [ - ".randombird" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".lmgtfy" - ], - "Description": "Google something for a baka.", - "Usage": [ - ".lmgtfy How to eat a banana" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".shorten" - ], - "Description": "Attempts to shorten an URL, if it fails, returns the input URL.", - "Usage": [ - ".shorten https://google.com" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".magicthegathering", - ".mtg" - ], - "Description": "Searches for a Magic The Gathering card.", - "Usage": [ - ".magicthegathering about face" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".hearthstone", - ".hs" - ], - "Description": "Searches for a Hearthstone card and shows its image. Takes a while to complete.", - "Usage": [ - ".hearthstone Ysera" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".urbandict", - ".ud" - ], - "Description": "Searches Urban Dictionary for a word.", - "Usage": [ - ".urbandict Pineapple" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".define", - ".def" - ], - "Description": "Finds a definition of a word.", - "Usage": [ - ".define heresy" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".catfact" - ], - "Description": "Shows a random fact about cats.", - "Usage": [ - ".catfact" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".wiki", - ".wikipedia" - ], - "Description": "Gives you back a wikipedia link", - "Usage": [ - ".wiki query" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".color", - ".clr" - ], - "Description": "Shows you pictures of colors which correspond to the inputted hex values. Max 10.", - "Usage": [ - ".color 00ff00", - ".color f00 0f0 00f" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".avatar", - ".av" - ], - "Description": "Shows a mentioned person's avatar.", - "Usage": [ - ".avatar @Someone" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".wikia", - ".fandom" - ], - "Description": "Gives you back a fandom link", - "Usage": [ - ".wikia mtg Vigilance", - ".wikia mlp Dashy" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".steam" - ], - "Description": "Returns a store link for a steam game with the specified name. It doesn't work very well because bundles.", - "Usage": [ - ".steam Sakura Agent" - ], - "Submodule": "Searches", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".anime", - ".ani", - ".aq" - ], - "Description": "Queries anilist for an anime and shows the first result.", - "Usage": [ - ".anime aquarion evol" - ], - "Submodule": "AnimeSearchCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".manga", - ".mang", - ".mq" - ], - "Description": "Queries anilist for a manga and shows the first result.", - "Usage": [ - ".manga Shingeki no kyojin" - ], - "Submodule": "AnimeSearchCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".stock" - ], - "Description": "Shows basic information about a stock. You can use a symbol or company name", - "Usage": [ - ".stock tsla", - ".stock advanced micro devices", - ".stock amd" - ], - "Submodule": "FinanceCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".crypto", - ".c" - ], - "Description": "Shows basic stats about a cryptocurrency from coinmarketcap.com. You can use either a name or an abbreviation of the currency.", - "Usage": [ - ".crypto btc", - ".crypto bitcoin" - ], - "Submodule": "FinanceCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".coins", - ".crypto", - ".cryptos" - ], - "Description": "Shows a list of 10 crypto currencies ordered by market cap.\nShows their price, change in the last24h, market cap and circulating and total supply.\nPaginated with 10 per page.", - "Usage": [ - ".coins", - ".coins 2" - ], - "Submodule": "FinanceCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".ytuploadnotif", - ".yun" - ], - "Description": "Subscribe to a youtube channel's upload rss feed.\nYou can optionally specify a message which will be posted with an update.\nThis is just a shortcut for `.feed` with a url of the youtube channel's rss feed.", - "Usage": [ - ".ytuploadnotif https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow", - ".ytuploadnotif https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow New video is posted" - ], - "Submodule": "FeedCommands", - "Module": "Searches", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".feed", - ".feedadd" - ], - "Description": "Subscribes to a feed.\nBot will post an update up to once every 10 seconds.\nYou can have up to 10 feeds on one server.\nAll feeds must have unique URLs.\nSet a channel as a second optional parameter to specify where to send the updates.\nYou can optionally specify a message after the channel name which will be posted with an update.", - "Usage": [ - ".feed https://blog.playstation.com/feed/", - ".feed https://blog.playstation.com/feed/ #updates", - ".feed https://blog.playstation.com/feed/ #updates New playstation rss feed post!" - ], - "Submodule": "FeedCommands", - "Module": "Searches", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".feedremove", - ".feedrm", - ".feeddel" - ], - "Description": "Stops tracking a feed on the given index. Use `.feeds` command to see a list of feeds and their indexes.", - "Usage": [ - ".feedremove 3" - ], - "Submodule": "FeedCommands", - "Module": "Searches", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".feedlist", - ".feeds" - ], - "Description": "Shows the list of feeds you've subscribed to on this server.", - "Usage": [ - ".feedlist" - ], - "Submodule": "FeedCommands", - "Module": "Searches", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".yomama", - ".ym" - ], - "Description": "Shows a random yomama joke.", - "Usage": [ - ".yomama" - ], - "Submodule": "JokeCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".randjoke", - ".rj" - ], - "Description": "Shows a random joke.", - "Usage": [ - ".randjoke" - ], - "Submodule": "JokeCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".chucknorris", - ".cn" - ], - "Description": "Shows a random Chuck Norris joke.", - "Usage": [ - ".chucknorris" - ], - "Submodule": "JokeCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".wowjoke" - ], - "Description": "Get one of penultimate WoW jokes.", - "Usage": [ - ".wowjoke" - ], - "Submodule": "JokeCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".magicitem", - ".mi" - ], - "Description": "Shows a random magic item with its description.", - "Usage": [ - ".magicitem" - ], - "Submodule": "JokeCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".osu" - ], - "Description": "Shows osu! stats for a player.", - "Usage": [ - ".osu Name", - ".osu Name taiko" - ], - "Submodule": "OsuCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".gatari" - ], - "Description": "Shows osu!gatari stats for a player.", - "Usage": [ - ".gatari Name", - ".gatari Name ctb" - ], - "Submodule": "OsuCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".osu5" - ], - "Description": "Displays a user's top 5 plays.", - "Usage": [ - ".osu5 Name" - ], - "Submodule": "OsuCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".pokemon", - ".poke" - ], - "Description": "Searches for a pokemon.", - "Usage": [ - ".pokemon Sylveon" - ], - "Submodule": "PokemonSearchCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".pokemonability", - ".pokeab" - ], - "Description": "Searches for a pokemon ability.", - "Usage": [ - ".pokemonability overgrow" - ], - "Submodule": "PokemonSearchCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".bible" - ], - "Description": "Shows bible verse. You need to supply book name and chapter:verse", - "Usage": [ - ".bible genesis 3:19" - ], - "Submodule": "ReligiousCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".quran" - ], - "Description": "Shows the text of an ayah of the Quran, as well as the recitation by Alafasy.\nSupply surah:ayah, or ayah number. For instance, 262 or 2:255 will both get you Ayat Al Kursi", - "Usage": [ - ".quran 2:255", - ".quran 262" - ], - "Submodule": "ReligiousCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".google", - ".search", - ".g", - ".s" - ], - "Description": "Get a Google search link for some terms.", - "Usage": [ - ".google query" - ], - "Submodule": "SearchCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".image", - ".img", - ".rimg" - ], - "Description": "Pulls a random image using a search parameter.", - "Usage": [ - ".image cute kitten" - ], - "Submodule": "SearchCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".youtube", - ".yt" - ], - "Description": "Searches youtubes and shows the first result", - "Usage": [ - ".youtube query" - ], - "Submodule": "SearchCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".streamadd", - ".sta", - ".stadd" - ], - "Description": "Notifies this channel when the stream on the specified URL goes online or offline. Offline notifications will only show if you enable `.streamoff`. Maximum 10 per server.", - "Usage": [ - ".streamadd twitch.tv/someguy" - ], - "Submodule": "StreamNotificationCommands", - "Module": "Searches", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".streamremove", - ".strm" - ], - "Description": "Stops following the stream on the specified index. (use `.stl` to see indexes)", - "Usage": [ - ".streamremove 2" - ], - "Submodule": "StreamNotificationCommands", - "Module": "Searches", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".streamsclear", - ".stclear" - ], - "Description": "Removes all followed streams on this server.", - "Usage": [ - ".streamsclear" - ], - "Submodule": "StreamNotificationCommands", - "Module": "Searches", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".streamlist", - ".stl", - ".streamslist" - ], - "Description": "Lists all streams you are following on this server and their respective indexes.", - "Usage": [ - ".streamlist" - ], - "Submodule": "StreamNotificationCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".streamoffline", - ".sto", - ".stoff" - ], - "Description": "Toggles whether the bot will also notify when added streams go offline.", - "Usage": [ - ".streamoffline" - ], - "Submodule": "StreamNotificationCommands", - "Module": "Searches", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".streamonlinedelete", - ".stondel" - ], - "Description": "Toggles whether the bot will delete stream online message when the stream goes offline.", - "Usage": [ - ".streamonlinedelete" - ], - "Submodule": "StreamNotificationCommands", - "Module": "Searches", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".streammsg", - ".stm", - ".stmsg" - ], - "Description": "Sets the message which will show when the stream on the specified index comes online. You can use %user% and %platform% placeholders.", - "Usage": [ - ".streammsg 1 Hey @erryone %user% is back online on %platform%!1!!" - ], - "Submodule": "StreamNotificationCommands", - "Module": "Searches", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".streammsgall", - ".stma", - ".stmsga" - ], - "Description": "Sets the message which will show when any of the currently followed streams comes online. This does not apply to the streams which get added afterwards. You can use %user% and %platform% placeholders.", - "Usage": [ - ".streammsgall Hey @erryone %user% is back online!1!!" - ], - "Submodule": "StreamNotificationCommands", - "Module": "Searches", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".streamcheck", - ".stc" - ], - "Description": "Retrieves information about a stream.", - "Usage": [ - ".streamcheck https://twitch.tv/somedude" - ], - "Submodule": "StreamNotificationCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".translate", - ".trans" - ], - "Description": "Translates text from the given language to the destination language.", - "Usage": [ - ".translate en fr Hello" - ], - "Submodule": "TranslateCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".autotranslate", - ".at", - ".autotrans" - ], - "Description": "Starts automatic translation of all messages by users who set their `.atl` in this channel. You can set \"del\" parameter to automatically delete all translated user messages.", - "Usage": [ - ".autotranslate", - ".autotranslate del" - ], - "Submodule": "TranslateCommands", - "Module": "Searches", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".autotranslang", - ".atl" - ], - "Description": "Sets your source and target language to be used with `.at`. Specify no parameters to remove previously set value.", - "Usage": [ - ".autotranslang en fr" - ], - "Submodule": "TranslateCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".translangs" - ], - "Description": "Lists the valid languages for translation.", - "Usage": [ - ".translangs" - ], - "Submodule": "TranslateCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".translateflags", - ".trfl", - ".fltr", - ".transflags" - ], - "Description": "Toggles translate flags on the current channel.\nReacting with a country flag will translate the message to that country's language.", - "Usage": [ - ".translateflags" - ], - "Submodule": "TranslateCommands", - "Module": "Searches", - "Options": null, - "Requirements": [ - "ManageChannels Channel Permission" - ] - }, - { - "Aliases": [ - ".xkcd" - ], - "Description": "Shows a XKCD comic. Specify no parameters to retrieve a random one. Number parameter will retrieve a specific comic, and \"latest\" will get the latest one.", - "Usage": [ - ".xkcd", - ".xkcd 1400", - ".xkcd latest" - ], - "Submodule": "XkcdCommands", - "Module": "Searches", - "Options": null, - "Requirements": [] - } - ], - "Utility": [ - { - "Aliases": [ - ".say" - ], - "Description": "Make the bot say something, or in other words, make the bot send the message.\nYou can optionally specify the channel where the bot will send the message.\nIf you omit the channel name, it will send the message in the current channel.\nSupports [embeds](https://eb.elliebot.net/)", - "Usage": [ - ".say hi", - ".say #chat hi" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".whosplaying", - ".whpl" - ], - "Description": "Shows a list of users who are playing the specified game.", - "Usage": [ - ".whosplaying Overwatch" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".inrole" - ], - "Description": "Lists every person from the specified role on this server. You can specify a page before the role to jump to that page. Provide no role to list users who have no roles", - "Usage": [ - ".inrole RoleName", - ".inrole 5 RoleName", - ".inrole" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".checkperms" - ], - "Description": "Checks yours or bot's user-specific permissions on this channel.", - "Usage": [ - ".checkperms me", - ".checkperms bot" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".userid", - ".uid" - ], - "Description": "Shows user ID.", - "Usage": [ - ".userid", - ".userid @Someone" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".roleid", - ".rid" - ], - "Description": "Shows the id of the specified role.", - "Usage": [ - ".roleid Some Role" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".channelid", - ".cid" - ], - "Description": "Shows current channel ID.", - "Usage": [ - ".channelid" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".serverid", - ".sid" - ], - "Description": "Shows current server ID.", - "Usage": [ - ".serverid" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".roles" - ], - "Description": "List roles on this server or roles of a user if specified. Paginated, 20 roles per page.", - "Usage": [ - ".roles 2", - ".roles @Someone" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".channeltopic", - ".ct" - ], - "Description": "Sends current channel's topic as a message.", - "Usage": [ - ".channeltopic" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".stats" - ], - "Description": "Shows some basic stats for Ellie.", - "Usage": [ - ".stats" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".showemojis", - ".se" - ], - "Description": "Shows a name and a link to every SPECIAL emoji in the message.", - "Usage": [ - ".showemojis A message full of SPECIAL emojis" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".emojiadd", - ".ea" - ], - "Description": "Adds the specified emoji to this server.\nYou can specify a name before the emoji to add it under a different name.\nYou can specify a name followed by an image link to add a new emoji from an image.\nYou can omit imageUrl and instead upload the image as an attachment. \nImage size has to be below 256KB.", - "Usage": [ - ".emojiadd :someonesCustomEmoji:", - ".emojiadd MyEmojiName :someonesCustomEmoji:", - ".emojiadd owoNice https://cdn.discordapp.com/emojis/587930873811173386.png?size=128" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageEmojisAndStickers Server Permission" - ] - }, - { - "Aliases": [ - ".emojiremove", - ".emojirm", - ".er", - ".ed", - ".emojidel", - ".emojidelete" - ], - "Description": "Removes the specified emoji or emojis from this server.", - "Usage": [ - ".emojiremove :eagleWarrior: :plumedArcher:" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageEmojisAndStickers Server Permission" - ] - }, - { - "Aliases": [ - ".stickeradd", - ".sa" - ], - "Description": "Adds the sticker from your message to this server.\nSend the sticker along with this command (in the same message).\nAlternatively you can upload an image along with this command but you have to specify the name.\nThe image must be 300x300 in .png or .apng format and up to 512KB in size.", - "Usage": [ - ".stickeradd", - ".stickeradd name \"description\" tag1 tag2 tagN" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageEmojisAndStickers Server Permission" - ] - }, - { - "Aliases": [ - ".serverlist" - ], - "Description": "Lists servers the bot is on with some basic info. 15 per page.", - "Usage": [ - ".serverlist 3" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".showembed" - ], - "Description": "Prints the json equivalent of the embed of the message specified by its Id.", - "Usage": [ - ".showembed 820022733172121600", - ".showembed #some-channel 820022733172121600" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".savechat" - ], - "Description": "Saves a number of messages to a text file and sends it to you.", - "Usage": [ - ".savechat 150" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".ping" - ], - "Description": "Ping the bot to see if there are latency issues.", - "Usage": [ - ".ping" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".verboseerror", - ".ve" - ], - "Description": "Toggles or sets whether the bot should print command errors when a command is incorrectly used.", - "Usage": [ - ".verboseerror", - ".verboseerror false" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".afk" - ], - "Description": "Toggles AFK status for yourself with the specified message. \nIf you don't provide a message it default to a generic one.\nAnyone @ mentioning you in any server will receive the afk message.\nThis will only work if the other user's message starts with the mention.", - "Usage": [ - ".afk" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".eval" - ], - "Description": "Execute arbitrary C# code and (optionally) return a result. Several namespaces are included by default.\nSpecial variables available: \n`self` - Instance of the command group executing the command (this)\n`guild` - Server in which the command is executed\n`channel` - Channel in which the command is executed\n`user` - User executing the command\n`ctx` - Discord.Net command context\n`services` - Ellie's IServiceProvider", - "Usage": [ - ".eval 123 / 4.5f", - ".eval await ctx.OkAsync();", - ".eval await ctx.Response().Confirm(\"uwu\").SendAsync();" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [ - "Bot Owner Only", - "No Public Bot" - ] - }, - { - "Aliases": [ - ".snipe", - ".sn" - ], - "Description": "Snipe the message you replied to with this command.\nOtherwise, if you don't reply to a message, it will snipe the last message sent in the channel (out of the last few messages) which has text or an image.", - "Usage": [ - ".snipe" - ], - "Submodule": "Utility", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".prompt" - ], - "Description": "Ask the bot to do something for you.\nThis will fall back to the chatbot service in case of an error.", - "Usage": [ - ".prompt What's the weather like today?" - ], - "Submodule": "PromptCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".aliasesclear", - ".aliasclear" - ], - "Description": "Deletes all aliases on this server.", - "Usage": [ - ".aliasesclear" - ], - "Submodule": "CommandMapCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".alias", - ".cmdmap" - ], - "Description": "Create a custom alias for a certain Ellie command. Provide no alias to remove the existing one.", - "Usage": [ - ".alias allin .bf all h" - ], - "Submodule": "CommandMapCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".aliaslist", - ".cmdmaplist", - ".aliases" - ], - "Description": "Shows the list of currently set aliases. Paginated.", - "Usage": [ - ".aliaslist", - ".aliaslist 3" - ], - "Submodule": "CommandMapCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".calculate", - ".calc" - ], - "Description": "Evaluate a mathematical expression.", - "Usage": [ - ".calculate 1+1" - ], - "Submodule": "CalcCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".calcops" - ], - "Description": "Shows all available operations in the `.calc` command", - "Usage": [ - ".calcops" - ], - "Submodule": "CalcCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".configreload", - ".creload", - ".confreload", - ".crel" - ], - "Description": "Reloads specified configuration", - "Usage": [ - ".configreload bot", - ".configreload gambling" - ], - "Submodule": "ConfigCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".config", - ".conf" - ], - "Description": "Gets or sets configuration values.\nProvide no arguments to see the list of configs you can edit/view.\nProvide config name to see all properties in that configuration and their values.\nProvide config name and property name to see that property's description and value.\nProvide config name, property name and value to set that property to the new value.", - "Usage": [ - ".config", - ".config bot", - ".config bot color.ok", - ".config bot color.ok ff0000" - ], - "Submodule": "ConfigCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".ga start" - ], - "Description": "Starts a giveaway. Specify the duration (between 1 minute and 30 days) followed by the prize.", - "Usage": [ - ".ga start 12h We are giving away one copy of our latest album!", - ".ga start 15m Quick giveaway for a free course!", - ".ga start 1d Join to win 1000$!" - ], - "Submodule": "Giveaways", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".ga end" - ], - "Description": "Prematurely ends a giveaway and selects a winner. Specify the ID of the giveaway to end.", - "Usage": [ - ".ga end ab3" - ], - "Submodule": "Giveaways", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".ga reroll" - ], - "Description": "Rerolls a giveaway. Specify the ID of the giveaway to reroll. This is only active within 24h after the giveaway has ended or until the bot restarts.", - "Usage": [ - ".ga reroll cd3" - ], - "Submodule": "Giveaways", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".ga cancel" - ], - "Description": "Cancels a giveaway. Specify the ID of the giveaway to cancel. The winner will not be chosen.", - "Usage": [ - ".ga cancel ab3" - ], - "Submodule": "Giveaways", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".ga list" - ], - "Description": "Lists all active giveaways.", - "Usage": [ - ".ga list" - ], - "Submodule": "Giveaways", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".serverinfo", - ".sinfo" - ], - "Description": "Shows info about the server with the specified ID. The bot has to be on that server. If no server is supplied, it defaults to current one.", - "Usage": [ - ".serverinfo 123123132233" - ], - "Submodule": "InfoCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".channelinfo", - ".cinfo" - ], - "Description": "Shows info about the channel. If no channel is supplied, it defaults to current one.", - "Usage": [ - ".channelinfo #some-channel" - ], - "Submodule": "InfoCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".roleinfo", - ".rinfo" - ], - "Description": "Shows info about the specified role.", - "Usage": [ - ".roleinfo Gamers" - ], - "Submodule": "InfoCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".userinfo", - ".uinfo" - ], - "Description": "Shows info about the user. If no user is supplied, it defaults a user running the command.", - "Usage": [ - ".userinfo @SomeUser" - ], - "Submodule": "InfoCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".invitecreate", - ".invcr" - ], - "Description": "Creates a new invite which has infinite max uses and never expires.", - "Usage": [ - ".invitecreate" - ], - "Submodule": "InviteCommands", - "Module": "Utility", - "Options": [ - "`--max-uses` (`-m`) Maximum number of times the invite can be used. Default 0 (never). ", - "`--unique` (`-u`) Not setting this flag will result in bot getting the existing invite with the same settings if it exists, instead of creating a new one. ", - "`--temporary` (`-t`) If this flag is set, the user will be kicked from the guild once they close their client. ", - "`--expire` (`-e`) Time in seconds to expire the invite. Default 0 (no expiry). " - ], - "Requirements": [ - "CreateInstantInvite Channel Permission" - ] - }, - { - "Aliases": [ - ".invitelist", - ".invlist", - ".invlst" - ], - "Description": "Lists all invites for this channel. Paginated with 9 per page.", - "Usage": [ - ".invitelist", - ".invitelist 3" - ], - "Submodule": "InviteCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageChannels Channel Permission" - ] - }, - { - "Aliases": [ - ".invitedelete", - ".invrm", - ".invdel" - ], - "Description": "Deletes an invite on the specified index. Use `.invitelist` to see the list of invites.", - "Usage": [ - ".invitedelete 2" - ], - "Submodule": "InviteCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageChannels Channel Permission" - ] - }, - { - "Aliases": [ - ".quotelist", - ".qli", - ".quli", - ".qulist" - ], - "Description": "Lists all quotes on the server ordered alphabetically or by ID. 15 Per page.", - "Usage": [ - ".quotelist 3", - ".quotelist 3 id" - ], - "Submodule": "QuoteCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".quoteprint", - ".qp", - ".qup", - "...", - ".qprint" - ], - "Description": "Prints a random quote with a specified name.", - "Usage": [ - ".quoteprint abc" - ], - "Submodule": "QuoteCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".quoteshow", - ".qsh", - ".qshow", - ".qushow" - ], - "Description": "Shows information about a quote with the specified ID.", - "Usage": [ - ".quoteshow 123" - ], - "Submodule": "QuoteCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".quotesearch", - ".qse", - ".qsearch" - ], - "Description": "Shows a random quote given a search query. Partially matches in several ways: 1) Only content of any quote, 2) only by author, 3) keyword and content, 3) or keyword and author", - "Usage": [ - ".quotesearch \"find this long text\"", - ".quotesearch AuthorName", - ".quotesearch keyword some text", - ".quotesearch keyword AuthorName" - ], - "Submodule": "QuoteCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".quoteid", - ".qid" - ], - "Description": "-| Displays the quote with the specified ID number.", - "Usage": [ - ".quoteid 123456" - ], - "Submodule": "QuoteCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".quoteadd", - ".qa", - ".qadd", - ".quadd", - ".." - ], - "Description": "Adds a new quote with the specified name and message.", - "Usage": [ - ".quoteadd sayhi Hi" - ], - "Submodule": "QuoteCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".quoteedit", - ".qe", - ".que", - ".qedit" - ], - "Description": "Edits a quote with the specified ID.", - "Usage": [ - ".quoteedit 55 This is the new response." - ], - "Submodule": "QuoteCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".quotedelete", - ".qd", - ".qdel", - ".qdelete" - ], - "Description": "Deletes a quote with the specified ID. You have to either have the Manage Messages permission or be the creator of the quote to delete it.", - "Usage": [ - ".quotedelete 123456" - ], - "Submodule": "QuoteCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".quotedeleteauthor", - ".qda", - ".qdelauth" - ], - "Description": "Deletes all quotes by the specified author. If the author is not you, then ManageMessage server permission is required.", - "Usage": [ - ".quotedeleteauthor @QuoteSpammer" - ], - "Submodule": "QuoteCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".quotesdeleteall", - ".qdall", - ".qdeleteall" - ], - "Description": "Deletes all quotes with the specified keyword.", - "Usage": [ - ".quotesdeleteall kek" - ], - "Submodule": "QuoteCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".quotesexport", - ".qex", - ".qexport" - ], - "Description": "Exports quotes from the current server into a .yml file", - "Usage": [ - ".quotesexport" - ], - "Submodule": "QuoteCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".quotesimport", - ".qim", - ".qimp", - ".qimport" - ], - "Description": "Upload the file or send the raw .yml data with this command to import all quotes from the specified string or file into the current server.", - "Usage": [ - ".quotesimport " - ], - "Submodule": "QuoteCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".remind" - ], - "Description": "Sets a reminder which will be sent to you or to the targeted channel after certain amount of time (max 2 months).\nFirst parameter is `me` / `here` / 'channelname'\nSecond parameter is time in a descending order (mo>w>d>h>m) example: 1w5d3h10m.\nThird parameter is a (multiword) message.\nRequires ManageMessages server permission if you're targeting a different channel.", - "Usage": [ - ".remind me 1d5h Do something", - ".remind #general 1m Start now!" - ], - "Submodule": "RemindCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".remindlist", - ".remindl", - ".remindlst" - ], - "Description": "Lists all reminders you created. You can specify 'server' option if you're an Administrator to list all reminders created on this server. Paginated.", - "Usage": [ - ".remindlist 1", - ".remindlist server 2" - ], - "Submodule": "RemindCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".reminddelete", - ".remindrm", - ".reminddel" - ], - "Description": "Deletes a reminder on the specified index. You can specify 'server' option if you're an Administrator, and you want to delete a reminder on this server created by someone else. ", - "Usage": [ - ".reminddelete 3", - ".reminddelete server 2" - ], - "Submodule": "RemindCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".repeatskip", - ".repski" - ], - "Description": "Specify a repeater's ID to toggle whether the next trigger of the repeater will be skipped.\nThis setting is not stored in the database and will get reset if the bot is restarted.", - "Usage": [ - ".repeatskip 3" - ], - "Submodule": "RepeatCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".repeatinvoke", - ".repinv" - ], - "Description": "Immediately post the repeat message on a certain index and restarts its timer.", - "Usage": [ - ".repeatinvoke 1" - ], - "Submodule": "RepeatCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".repeatremove", - ".reprm" - ], - "Description": "Removes a repeating message by index. Use `.replst` to see indexes.", - "Usage": [ - ".repeatremove 2" - ], - "Submodule": "RepeatCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".repeatredun", - ".repred" - ], - "Description": "Specify repeater's index (Use `.replst` to see indexes) to toggle whether the message should be reposted if the last message in the channel is the same repeater's message.\nThis is useful if you want to remind everyone to be nice every so often, but don't want to have the bot spam the channel. This is NOT useful if you want to periodically ping someone.", - "Usage": [ - ".repeatredun 1" - ], - "Submodule": "RepeatCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".repeat" - ], - "Description": "Repeat a message once per specified time increment in the current channel. \nYou can specify a different channel as the first argument instead.\nYou can also specify time of day for the message to be repeated daily (make sure you've set your server's `.timezone`). \nIf you specify time of day, you can still override the default daily interval with your own interval. \nYou can have up to 5 repeating messages on one server in total.", - "Usage": [ - ".repeat Hello there", - ".repeat #other-channel hello there", - ".repeat 1h5m Hello @erryone", - ".repeat 10:00 Daily have a nice day! This will execute once every 24h.", - ".repeat #other-channel 10:00 Daily have a nice day! This will execute once every 24h.", - ".repeat 21:00 30m Starting at 21 and every 30 minutes after that i will send this message!" - ], - "Submodule": "RepeatCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".repeatlist", - ".replst", - ".replist", - ".repli" - ], - "Description": "Lists currently repeating messages and their indexes.", - "Usage": [ - ".repeatlist" - ], - "Submodule": "RepeatCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageMessages Server Permission" - ] - }, - { - "Aliases": [ - ".streamrole" - ], - "Description": "Sets a role which is monitored for streamers (FromRole), and a role to add if a user from 'FromRole' is streaming (AddRole). When a user from 'FromRole' starts streaming, they will receive an 'AddRole'. You can only have 1 Stream Role per server. Provide no parameters to disable", - "Usage": [ - ".streamrole \"Eligible Streamers\" \"Featured Streams\"" - ], - "Submodule": "StreamRoleCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".streamrolekeyword", - ".srkw" - ], - "Description": "Sets keyword which is required in the stream's title in order for the streamrole to apply. Provide no keyword in order to reset.", - "Usage": [ - ".streamrolekeyword", - ".streamrolekeyword PUBG" - ], - "Submodule": "StreamRoleCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".streamroleblacklist", - ".srbl" - ], - "Description": "Adds or removes a blacklisted user. Blacklisted users will never receive the stream role.", - "Usage": [ - ".streamroleblacklist add @Someone#1234", - ".streamroleblacklist rem @Someone#1234" - ], - "Submodule": "StreamRoleCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".streamrolewhitelist", - ".srwl" - ], - "Description": "Adds or removes a whitelisted user. Whitelisted users will receive the stream role even if they don't have the specified keyword in their stream title.", - "Usage": [ - ".streamrolewhitelist add @Someone#1234", - ".streamrolewhitelist rem @Someone#1234" - ], - "Submodule": "StreamRoleCommands", - "Module": "Utility", - "Options": null, - "Requirements": [ - "ManageRoles Server Permission" - ] - }, - { - "Aliases": [ - ".todo add", - ".todo a" - ], - "Description": "Adds a new todo.", - "Usage": [ - ".todo add I need to do this" - ], - "Submodule": "todo", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".todo edit", - ".todo change" - ], - "Description": "Edits a todo with the specified ID.", - "Usage": [ - ".todo edit abc This is an updated entry" - ], - "Submodule": "todo", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".todo list", - ".todo ls" - ], - "Description": "Lists all todos.", - "Usage": [ - ".todo list" - ], - "Submodule": "todo", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".todo show", - ".todo sh", - ".todo see" - ], - "Description": "Shows the text of the todo with the specified ID.", - "Usage": [ - ".todo show 4a" - ], - "Submodule": "todo", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".todo complete", - ".todo done", - ".todo finish" - ], - "Description": "Marks a todo with the specified ID as done.", - "Usage": [ - ".todo complete 4a" - ], - "Submodule": "todo", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".todo delete", - ".todo del", - ".todo remove", - ".todo rm" - ], - "Description": "Deletes a todo with the specified ID.", - "Usage": [ - ".todo delete abc" - ], - "Submodule": "todo", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".todo clear", - ".todo clr", - ".todo cls" - ], - "Description": "Deletes all unarchived todos.", - "Usage": [ - ".todo clear" - ], - "Submodule": "todo", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".todo archive add", - ".todo archive create", - ".todo archive new" - ], - "Description": "Creates a new archive with the specified name using current todos.", - "Usage": [ - ".todo archive add Day 1" - ], - "Submodule": "archive", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".todo archive list", - ".todo archive ls" - ], - "Description": "Lists all archived todo lists.", - "Usage": [ - ".todo archive list" - ], - "Submodule": "archive", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".todo archive show" - ], - "Description": "Shows the archived todo list with the specified ID.", - "Usage": [ - ".todo archive show 3c" - ], - "Submodule": "archive", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".todo archive delete", - ".todo archive del", - ".todo archive remove", - ".todo archive rm" - ], - "Description": "Deletes the archived todo list with the specified ID.", - "Usage": [ - ".todo archive delete 99" - ], - "Submodule": "archive", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".convertlist" - ], - "Description": "List of the convertible dimensions and currencies.", - "Usage": [ - ".convertlist" - ], - "Submodule": "UnitConverterCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".convert" - ], - "Description": "Convert quantities. Use `.convertlist` to see supported dimensions and currencies.", - "Usage": [ - ".convert m km 1000" - ], - "Submodule": "UnitConverterCommands", - "Module": "Utility", - "Options": null, - "Requirements": [] - } - ], - "Xp": [ - { - "Aliases": [ - ".experience", - ".xp" - ], - "Description": "Shows your xp stats. Specify the user to show that user's stats instead.", - "Usage": [ - ".experience", - ".experience @someguy" - ], - "Submodule": "Xp", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".xpnotify", - ".xpn" - ], - "Description": "Sets how the bot should notify you when you get a `server` or `global` level. This is a personal setting and affects only how you receive Global or Server level-up notifications. You can set `dm` (for the bot to send you a direct message), `channel` (to get notified in the channel you sent the last message in) or `none` to disable.", - "Usage": [ - ".xpnotify global dm", - ".xpnotify server channel" - ], - "Submodule": "Xp", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".xpexclude", - ".xpex" - ], - "Description": "Exclude a channel, role or current server from the xp system.", - "Usage": [ - ".xpexclude Role Excluded-Role", - ".xpexclude Server" - ], - "Submodule": "Xp", - "Module": "Xp", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".xpexclusionlist", - ".xpexl" - ], - "Description": "Shows the roles and channels excluded from the XP system on this server, as well as whether the whole server is excluded.", - "Usage": [ - ".xpexclusionlist" - ], - "Submodule": "Xp", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".xpleaderboard", - ".xplb" - ], - "Description": "Shows current server's xp leaderboard.", - "Usage": [ - ".xpleaderboard" - ], - "Submodule": "Xp", - "Module": "Xp", - "Options": [ - "`--clean` (`-c`) Only show users who are on the server. " - ], - "Requirements": [] - }, - { - "Aliases": [ - ".xpgleaderboard", - ".xpglb" - ], - "Description": "Shows the global xp leaderboard.", - "Usage": [ - ".xpgleaderboard" - ], - "Submodule": "Xp", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".xpadd" - ], - "Description": "Adds server XP to a single user or all users role on this server. This does not affect their global ranking. You can use negative values.", - "Usage": [ - ".xpadd 100 @Someone", - ".xpadd 500 SomeRoleName" - ], - "Submodule": "Xp", - "Module": "Xp", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".xptempreload", - ".xptr" - ], - "Description": "Reloads the xp template file. Xp template file allows you to customize the position and color of elements on the `.xp` card.", - "Usage": [ - ".xptempreload" - ], - "Submodule": "Xp", - "Module": "Xp", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - }, - { - "Aliases": [ - ".xpreset" - ], - "Description": "Resets specified user's XP, or the XP of all users in the server. You can't reverse this action.", - "Usage": [ - ".xpreset @Someone", - ".xpreset" - ], - "Submodule": "Xp", - "Module": "Xp", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".xpshop" - ], - "Description": "Access the xp shop (if enabled). You can purchase either xp card frames or backgrounds. You can optionally provide a page number", - "Usage": [ - ".xpshop bgs", - ".xpshop frames", - ".xpshop bgs 3" - ], - "Submodule": "Xp", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".xpshopbuy" - ], - "Description": "Buy an item from the xp shop by specifying the type and the key of the item.", - "Usage": [ - ".xpshopbuy bg open_sea", - ".xpshopbuy fr gold" - ], - "Submodule": "Xp", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".xpshopuse" - ], - "Description": "Use a previously purchased item from the xp shop by specifying the type and the key of the item.", - "Usage": [ - ".xpshopuse bg synth", - ".xpshopuse fr default" - ], - "Submodule": "Xp", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubtransfer" - ], - "Description": "Transfers the ownership of the club to another member of the club.", - "Usage": [ - ".clubtransfer @Someone" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubadmin" - ], - "Description": "Assigns (or unassigns) staff role to the member of the club. Admins can ban, kick and accept applications.", - "Usage": [ - ".clubadmin @Someone" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubcreate" - ], - "Description": "Creates a club. You must be at least level 5 and not be in the club already.", - "Usage": [ - ".clubcreate My Brand New Club" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubicon" - ], - "Description": "Sets the club icon.", - "Usage": [ - ".clubicon https://i.imgur.com/htfDMfU.png" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubinfo" - ], - "Description": "Shows information about the club.", - "Usage": [ - ".clubinfo My Brand New Club#23" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubbans" - ], - "Description": "Shows the list of users who have banned from your club. Paginated. You must be club owner to use this command.", - "Usage": [ - ".clubbans 2" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubapps" - ], - "Description": "Shows the list of users who have applied to your club. Paginated. You must be club owner to use this command.", - "Usage": [ - ".clubapps 2" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubapply" - ], - "Description": "Apply to join a club. You must meet that club's minimum level requirement, and not be on its ban list.", - "Usage": [ - ".clubapply My Brand New Club#23" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubaccept" - ], - "Description": "Accept a user who applied to your club.", - "Usage": [ - ".clubaccept user#1337" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubreject" - ], - "Description": "Reject a user who applied to your club.", - "Usage": [ - ".clubreject user#1337" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubleave" - ], - "Description": "Leaves the club you're currently in.", - "Usage": [ - ".clubleave" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubkick" - ], - "Description": "Kicks the user from the club. You must be the club owner. They will be able to apply again.", - "Usage": [ - ".clubkick user#1337" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubban" - ], - "Description": "Bans the user from the club. You must be the club owner. They will not be able to apply again.", - "Usage": [ - ".clubban user#1337" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubunban" - ], - "Description": "Unbans the previously banned user from the club. You must be the club owner.", - "Usage": [ - ".clubunban user#1337" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubdesc" - ], - "Description": "Sets the club description. Maximum 150 characters. Club owner only.", - "Usage": [ - ".clubdesc This is the best club please join." - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubdisband" - ], - "Description": "Disbands the club you're the owner of. This action is irreversible.", - "Usage": [ - ".clubdisband" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clublb", - ".clubs" - ], - "Description": "Shows club rankings on the specified page.", - "Usage": [ - ".clublb 2" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".clubrename" - ], - "Description": "Renames your club. Requires you club ownership or club-admin status.", - "Usage": [ - ".clubrename New cool club name" - ], - "Submodule": "Club", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".xprewsreset" - ], - "Description": "Resets all currently set xp level up rewards.", - "Usage": [ - ".xprewsreset" - ], - "Submodule": "XpRewards", - "Module": "Xp", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".xplvluprewards", - ".xprews", - ".xpcrs", - ".xprrs", - ".xprolerewards", - ".xpcurrewards" - ], - "Description": "Shows currently set level up rewards.", - "Usage": [ - ".xplvluprewards" - ], - "Submodule": "XpRewards", - "Module": "Xp", - "Options": null, - "Requirements": [] - }, - { - "Aliases": [ - ".xprolereward", - ".xprr" - ], - "Description": "Add or remove a role from the user who reaches the specified level.\nProvide no action and role name in order to remove the role reward.", - "Usage": [ - ".xprolereward 1 rm Newbie", - ".xprolereward 3 add Social", - ".xprolereward 5 add Member", - ".xprolereward 5" - ], - "Submodule": "XpRewards", - "Module": "Xp", - "Options": null, - "Requirements": [ - "Administrator Server Permission" - ] - }, - { - "Aliases": [ - ".xpcurreward", - ".xpcr" - ], - "Description": "Sets a currency reward on a specified level. Provide no amount in order to remove the reward.", - "Usage": [ - ".xpcurreward 3 50" - ], - "Submodule": "XpRewards", - "Module": "Xp", - "Options": null, - "Requirements": [ - "Bot Owner Only" - ] - } - ] -} \ No newline at end of file diff --git a/src/EllieBot/data/gambling.yml b/src/EllieBot/data/gambling.yml index 2444340..fbcbdc4 100644 --- a/src/EllieBot/data/gambling.yml +++ b/src/EllieBot/data/gambling.yml @@ -1,5 +1,5 @@ # DO NOT CHANGE -version: 12 +version: 7 # Currency settings currency: # What is the emoji/character which represents the currency @@ -28,7 +28,7 @@ betRoll: multiplyBy: 10 - whenAbove: 90 multiplyBy: 4 - - whenAbove: 65 + - whenAbove: 66 multiplyBy: 2 # Automatic currency generation settings. generation: @@ -56,9 +56,6 @@ timely: # How often (in hours) can users claim currency with .timely command # setting to 0 or less will disable this feature cooldown: 12 - # How will timely be protected? - # None, Button (users have to click the button) or Captcha (users have to type the captcha from an image) - protType: Button # How much will each user's owned currency decay over time. decay: # Percentage of user's current currency which will be deducted every 24h. @@ -85,7 +82,7 @@ luckyLadder: - 2.4 - 1.7 - 1.5 - - 1.1 + - 1.2 - 0.5 - 0.3 - 0.2 @@ -128,14 +125,10 @@ waifu: # Settings for periodic waifu price decay. # Waifu price decays only if the waifu has no claimer. decay: - # Unclaimed waifus will decay by this percentage (0 - 100). - # Default is 0 (disabled) + # Percentage (0 - 100) of the waifu value to reduce. + # Set 0 to disable # For example if a waifu has a price of 500$, setting this value to 10 would reduce the waifu value by 10% (50$) - unclaimedDecayPercent: 0 - # Claimed waifus will decay by this percentage (0 - 100). - # Default is 0 (disabled) - # For example if a waifu has a price of 500$, setting this value to 10 would reduce the waifu value by 10% (50$) - claimedDecayPercent: 0 + percent: 0 # How often to decay waifu values, in hours hourInterval: 24 # Minimum waifu price required for the decay to be applied. @@ -274,9 +267,3 @@ 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: [] - # This bonus will be added before any other multiplier is applied to the .timely command - baseTimelyBonus: 50 diff --git a/src/EllieBot/data/games.yml b/src/EllieBot/data/games.yml index 01f0261..b5fa9c1 100644 --- a/src/EllieBot/data/games.yml +++ b/src/EllieBot/data/games.yml @@ -1,5 +1,5 @@ -# DO NOT CHANGE -version: 5 +# DO NOT CHANGE +version: 4 # Hangman related settings (.hangman command) hangman: # The amount of currency awarded to the winner of a hangman game @@ -56,7 +56,7 @@ raceAnimals: name: Unicorn # Which chatbot API should bot use. # 'cleverbot' - bot will use Cleverbot API. -# 'openai' - bot will use OpenAi API +# 'gpt' - bot will use GPT API chatBot: OpenAi chatGpt: # Url to any openai api compatible url. diff --git a/src/EllieBot/data/hangman/countries.yml b/src/EllieBot/data/hangman/countries.yml index 249408d..5899c5d 100644 --- a/src/EllieBot/data/hangman/countries.yml +++ b/src/EllieBot/data/hangman/countries.yml @@ -140,13 +140,13 @@ imageUrl: https://cdn.nadeko.bot/flags/gt-flag.gif - word: Guinea imageUrl: https://cdn.nadeko.bot/flags/gv-flag.gif -- word: Guinea Bissau +- word: Guinea-Bissau imageUrl: https://cdn.nadeko.bot/flags/pu-flag.gif - word: Guyana imageUrl: https://cdn.nadeko.bot/flags/gy-flag.gif - word: Haiti imageUrl: https://cdn.nadeko.bot/flags/ha-flag.gif -- word: Vatican +- word: Holy See imageUrl: https://cdn.nadeko.bot/flags/vt-flag.gif - word: Honduras imageUrl: https://cdn.nadeko.bot/flags/ho-flag.gif @@ -184,7 +184,7 @@ imageUrl: https://cdn.nadeko.bot/flags/ku-flag.gif - word: Kyrgyzstan imageUrl: https://cdn.nadeko.bot/flags/kg-flag.gif -- word: Lao People's Democratic Republic +- word: Laos imageUrl: https://cdn.nadeko.bot/flags/la-flag.gif - word: Latvia imageUrl: https://cdn.nadeko.bot/flags/lg-flag.gif @@ -282,7 +282,7 @@ imageUrl: https://cdn.nadeko.bot/flags/qa-flag.gif - word: Romania imageUrl: https://cdn.nadeko.bot/flags/ro-flag.gif -- word: Russian Federation +- word: Russia imageUrl: https://cdn.nadeko.bot/flags/rs-flag.gif - word: Rwanda imageUrl: https://cdn.nadeko.bot/flags/rw-flag.gif @@ -318,7 +318,7 @@ imageUrl: https://cdn.nadeko.bot/flags/so-flag.gif - word: South Africa imageUrl: https://cdn.nadeko.bot/flags/sf-flag.gif -- word: Republic of Korea +- word: South Korea imageUrl: https://cdn.nadeko.bot/flags/ks-flag.gif - word: South Sudan imageUrl: https://cdn.nadeko.bot/flags/od-flag.gif @@ -326,9 +326,9 @@ imageUrl: https://cdn.nadeko.bot/flags/sp-flag.gif - word: Sri Lanka imageUrl: https://cdn.nadeko.bot/flags/ce-flag.gif -- word: Saint Vincent and the Grenadines +- word: St. Vincent Grenadines imageUrl: https://cdn.nadeko.bot/flags/vc-flag.gif -- word: Palestine +- word: State of Palestine imageUrl: https://cdn.nadeko.bot/flags/palestine-flag.gif - word: Sudan imageUrl: https://cdn.nadeko.bot/flags/su-flag.gif @@ -338,11 +338,11 @@ imageUrl: https://cdn.nadeko.bot/flags/sw-flag.gif - word: Switzerland imageUrl: https://cdn.nadeko.bot/flags/sz-flag.gif -- word: Syrian Arab Republic +- word: Syria imageUrl: https://cdn.nadeko.bot/flags/sy-flag.gif - word: Tajikistan imageUrl: https://cdn.nadeko.bot/flags/ti-flag.gif -- word: United Republic of Tanzania +- word: Tanzania imageUrl: https://cdn.nadeko.bot/flags/tz-flag.gif - word: Thailand imageUrl: https://cdn.nadeko.bot/flags/th-flag.gif @@ -380,7 +380,7 @@ imageUrl: https://cdn.nadeko.bot/flags/nh-flag.gif - word: Venezuela imageUrl: https://cdn.nadeko.bot/flags/ve-flag.gif -- word: Viet Nam +- word: Vietnam imageUrl: https://cdn.nadeko.bot/flags/vm-flag.gif - word: Yemen imageUrl: https://cdn.nadeko.bot/flags/ym-flag.gif diff --git a/src/EllieBot/data/images.yml b/src/EllieBot/data/images.yml index d3f3d77..73ea5e6 100644 --- a/src/EllieBot/data/images.yml +++ b/src/EllieBot/data/images.yml @@ -1,5 +1,5 @@ # DO NOT CHANGE -version: 6 +version: 4 coins: heads: - https://cdn.nadeko.bot/coins/heads3.png @@ -20,15 +20,20 @@ dice: - https://cdn.nadeko.bot/other/dice/7.png - https://cdn.nadeko.bot/other/dice/8.png - https://cdn.nadeko.bot/other/dice/9.png +rategirl: + matrix: https://cdn.nadeko.bot/other/rategirl/matrix.png + dot: https://cdn.nadeko.bot/other/rategirl/dot.png xp: bg: https://cdn.nadeko.bot/other/xp/bg_k.png +rip: + bg: https://cdn.nadeko.bot/other/rip/rip.png + overlay: https://cdn.nadeko.bot/other/rip/overlay.png slots: emojis: - - https://cdn.nadeko.bot/slots/10.png - - https://cdn.nadeko.bot/slots/11.png - - https://cdn.nadeko.bot/slots/12.png - - https://cdn.nadeko.bot/slots/13.png - - https://cdn.nadeko.bot/slots/14.png - - https://cdn.nadeko.bot/slots/15.png - - https://cdn.nadeko.bot/slots/16.png + - https://cdn.nadeko.bot/slots/0.png + - https://cdn.nadeko.bot/slots/1.png + - https://cdn.nadeko.bot/slots/2.png + - https://cdn.nadeko.bot/slots/3.png + - https://cdn.nadeko.bot/slots/4.png + - https://cdn.nadeko.bot/slots/5.png bg: https://cdn.nadeko.bot/slots/slots_bg.png diff --git a/src/EllieBot/data/marmalades/marmalade.yml b/src/EllieBot/data/marmalades/marmalade.yml index fe3258f..34bfa71 100644 --- a/src/EllieBot/data/marmalades/marmalade.yml +++ b/src/EllieBot/data/marmalades/marmalade.yml @@ -1,4 +1,4 @@ # DO NOT CHANGE version: 1 # List of marmalades automatically loaded at startup -loaded: [] +loaded: diff --git a/src/EllieBot/data/searches.yml b/src/EllieBot/data/searches.yml index 8fb00d3..9b7ab5c 100644 --- a/src/EllieBot/data/searches.yml +++ b/src/EllieBot/data/searches.yml @@ -1,5 +1,5 @@ # DO NOT CHANGE -version: 4 +version: 2 # Which engine should .search command # 'google_scrape' - default. Scrapes the webpage for results. May break. Requires no api keys. # 'google' - official google api. Requires googleApiKey and google.searchId set in creds.yml @@ -9,32 +9,35 @@ webSearchEngine: Google_Scrape # 'google'- official google api. googleApiKey and google.imageSearchId set in creds.yml # 'searx' requires at least one searx instance specified in the 'searxInstances' property below imgSearchEngine: Google -# Which search provider will be used for the `.youtube` and `.q` commands. -# -# - `ytDataApiv3` - uses google's official youtube data api. Requires `GoogleApiKey` set in creds and youtube data api enabled in developers console. `.q` is not supported for this setting. It will fallback to yt-dlp. -# -# - `ytdlp` - default, recommended easy, uses `yt-dlp`. Requires `yt-dlp` to be installed and it's path added to env variables -# +# Which search provider will be used for the `.youtube` command. +# +# - `ytDataApiv3` - uses google's official youtube data api. Requires `GoogleApiKey` set in creds and youtube data api enabled in developers console +# +# - `ytdl` - default, uses youtube-dl. Requires `youtube-dl` to be installed and it's path added to env variables. Slow. +# +# - `ytdlp` - recommended easy, uses `yt-dlp`. Requires `yt-dlp` to be installed and it's path added to env variables +# # - `invidious` - recommended advanced, uses invidious api. Requires at least one invidious instance specified in the `invidiousInstances` property -ytProvider: Ytdl +ytProvider: Ytdlp # Set the searx instance urls in case you want to use 'searx' for either img or web search. # Ellie will use a random one for each request. # Use a fully qualified url. Example: `https://my-searx-instance.mydomain.com` # Instances specified must support 'format=json' query parameter. # - In case you're running your own searx instance, set -# +# # search: # formats: # - json -# +# # in 'searxng/settings.yml' on your server -# +# # - If you're using a public instance, make sure that the instance you're using supports it (they usually don't) searxInstances: [] # Set the invidious instance urls in case you want to use 'invidious' for `.youtube` search # Ellie will use a random one for each request. +# These instances may be used for music queue functionality in the future. # Use a fully qualified url. Example: https://my-invidious-instance.mydomain.com -# +# # Instances specified must have api available. # You check that by opening an api endpoint in your browser. For example: https://my-invidious-instance.mydomain.com/api/v1/trending invidiousInstances: [] diff --git a/src/EllieBot/data/strings/commands/commands.en-US.yml b/src/EllieBot/data/strings/commands/commands.en-US.yml index e22b0bf..8e5ff9d 100644 --- a/src/EllieBot/data/strings/commands/commands.en-US.yml +++ b/src/EllieBot/data/strings/commands/commands.en-US.yml @@ -16,13 +16,13 @@ gencmdlist: ex: - '' params: - - { } + - {} donate: desc: Provides instructions for helping the project financially. ex: - '' params: - - { } + - {} modules: desc: |- List all of the bot's modules. @@ -59,12 +59,14 @@ greet: ex: - '' params: - - { } + - {} greetmsg: desc: |- Sets a new join announcement message which will be shown in the current channel. + Write `%user.mention%` if you want to mention the new member. + Full list of placeholders can be found here Using this command with no message will show the current greet message. - Supports [placeholders](https://docs.elliebot.net/ellie/features/placeholders/) and [embeds](https://eb.elliebot.net/) + You can use embed json from instead of regular text, if you want the message to be embedded. ex: - Welcome, %user.mention%. params: @@ -75,12 +77,14 @@ bye: ex: - '' params: - - { } + - {} byemsg: desc: |- Sets a new leave announcement message which will be shown in the current channel. + Type `%user.name%` to show the name of the user who left. + Full list of placeholders can be found here Using this command with no message will show the current bye message. - Supports [placeholders](https://docs.elliebot.net/ellie/features/placeholders/) and [embeds](https://eb.elliebot.net/) + You can use embed json from instead of regular text, if you want the message to be embedded. ex: - '%user.name% has left.' params: @@ -99,7 +103,7 @@ greetdm: ex: - '' params: - - { } + - {} greettest: desc: Sends the greet message in the current channel as if you just joined the server. You can optionally specify a different user. ex: @@ -109,9 +113,7 @@ greettest: - user: desc: "The user to impersonate when sending the greeting, defaulting to yourself if not specified." boosttest: - desc: |- - Sends the boost message in the current channel as if you just boosted the server. - You can optionally specify a different user. + desc: Sends the boost message in the current channel as if you just boosted the server. You can optionally specify a different user. ex: - '' - '@SomeoneElse' @@ -139,12 +141,14 @@ boost: ex: - '' params: - - { } + - {} boostmsg: desc: |- Sets a new boost announcement message which will be shown in the current channel. + Type `%user.mention%` if you want to mention the booster. + Full list of placeholders can be found here Using this command with no message will show the current boost message. - Supports [placeholders](https://docs.elliebot.net/ellie/features/placeholders/) and [embeds](https://eb.elliebot.net/) + You can use embed json from instead of regular text, if you want the message to be embedded. ex: - '%user.mention% has boosted the server!!!' params: @@ -173,17 +177,17 @@ logignore: - '@SomeUser' - '#some-channel' params: - - { } + - {} - target: - desc: "The channel to ignore." + desc: "The channel to ignore or show the list of ignored channels for." - target: - desc: "The user to ignore." + desc: "The user or channel being targeted for logging ignore or inclusion." repeatlist: desc: Lists currently repeating messages and their indexes. ex: - '' params: - - { } + - {} repeatremove: desc: Removes a repeating message by index. Use `{0}replst` to see indexes. ex: @@ -276,25 +280,23 @@ rotateplaying: ex: - '' params: - - { } + - {} addplaying: desc: Adds a specified string to the list of playing strings to rotate. You have to pick either `Playing`, `Watching` or `Listening` as the first parameter. ex: - Playing with you - Watching you sleep params: - - statusType: + - t: desc: "The type of status, allowed values are `Playing`, `Watching`, or `Listening`." status: desc: "The status text." - - status: - desc: "The status text." listplaying: desc: Lists all playing statuses and their indexes. ex: - '' params: - - { } + - {} removeplaying: desc: Removes a playing status by index. Use `{0}lipl` to see indexes. ex: @@ -307,7 +309,7 @@ vcrolelist: ex: - '' params: - - { } + - {} vcrole: desc: Sets or resets a role which will be given to users who join the voice channel you're in when you run this command. Provide no role name to disable. You must be in a voice channel to run this command. ex: @@ -368,7 +370,7 @@ togglexclsar: ex: - '' params: - - { } + - {} iam: desc: Adds a role to you that you choose. Role must be on the list of self-assignable roles. ex: @@ -389,18 +391,18 @@ expradd: - '"hello" Hi there %user.mention%' params: - trigger: - desc: "The trigger word or phrase (phrase must be in quotes)." + desc: "The trigger word or phrase for the bot to respond to users typing." response: - desc: "The text of the message that shows up when a user types the trigger word or phrase." + desc: "The text of the message that shows up when a user types the trigger word." expraddserver: desc: 'Add an expression with a trigger and a response in this server. Bot will post a response whenever someone types the trigger word. This command is useful if you want to lower the permission requirement for managing expressions by using `{0}dpo`. Guide [here]().' ex: - '"hello" Hi there %user.mention%' params: - - trigger: - desc: "The trigger word or phrase (phrase must be in quotes)." - response: - desc: "The text of the message that shows up when a user types the trigger word or phrase." + - key: + desc: "The trigger word or phrase for the bot to respond to users typing." + message: + desc: "The text of the message that shows up when a user types the trigger word." exprlist: desc: |- Lists global or server expressions (20 expressions per page). @@ -441,25 +443,25 @@ exprclear: ex: - '' params: - - { } + - {} fwclear: desc: Deletes all filtered words on this server. ex: - '' params: - - { } + - {} filterlist: desc: Lists invite and link filter channels and status. ex: - '' params: - - { } + - {} aliasesclear: desc: Deletes all aliases on this server. ex: - '' params: - - { } + - {} autoassignrole: desc: |- Toggles the role which will be assigned to every user who joins the server. @@ -472,7 +474,7 @@ autoassignrole: params: - role: desc: "The role assigned to new users, determining their permissions and access rights within the server." - - { } + - {} leave: desc: Makes Ellie leave the server. Either server name or server ID is required. ex: @@ -498,27 +500,27 @@ delmsgoncmd: - list params: - _: - desc: "The word 'list'" + desc: "The list of channels or servers where the automatic deletion is enabled, disabled, or inherited." - _: - desc: "The word 'server'" + desc: "The server where the command is being executed or monitored for chat flood prevention." - _: - desc: "The word 'channel'" + desc: "The channel where the automatic deletion of successful command messages should be toggled." s: - desc: "The state to set. One of 'enable', 'disable', or 'inherit'." + desc: "The state of whether automatic deletion is enabled or disabled for a specific channel." ch: - desc: "Channel in which to set" + desc: "The channel where the automatic deletion of successful command messages should be toggled for." - _: - desc: "The word 'channel'" + desc: "The channel where the automatic deletion of successful command messages should be toggled." s: - desc: "The state to set. One of 'enable', 'disable', or 'inherit'." + desc: "The state of whether automatic deletion is enabled or disabled for a specific channel." chId: - desc: "Optional channel id. If omitted, defaults to the current channel." + desc: "The ID of a channel where the automatic deletion should be toggled or inherited." restart: desc: Restarts the bot. Might not work. ex: - '' params: - - { } + - {} setrole: desc: Gives a role to a user. The role you specify has to be lower in the role hierarchy than your highest role. ex: @@ -774,7 +776,7 @@ prunecancel: ex: - '' params: - - { } + - {} die: desc: Shuts the bot down. ex: @@ -815,12 +817,12 @@ setbanner: params: - img: desc: "The URL of the image file to be displayed as the bot's banner." -setactivity: - desc: Sets the bots game status to a Custom, Playing, Listening, or Watching status. +setgame: + desc: Sets the bots game status to either Playing, Listening, or Watching. ex: - - Just chilling - - Playing with canaries - - Listening music + - Playing with snakes. + - Watching anime. + - Listening music. params: - type: desc: "The activity type determines whether the bot is engaged in a game, listening to audio, or watching a video." @@ -865,7 +867,7 @@ savechat: - cnt: desc: "The number of messages to be saved." remind: - desc: |- + desc: |- Sets a reminder which will be sent to you or to the targeted channel after certain amount of time (max 2 months). First parameter is `me` / `here` / 'channelname' Second parameter is time in a descending order (mo>w>d>h>m) example: 1w5d3h10m. @@ -914,7 +916,7 @@ serverinfo: params: - guildId: desc: "The ID of a server for which to retrieve information." - - { } + - {} channelinfo: desc: Shows info about the channel. If no channel is supplied, it defaults to current one. ex: @@ -969,7 +971,7 @@ stats: ex: - '' params: - - { } + - {} userid: desc: Shows user ID. ex: @@ -983,13 +985,13 @@ channelid: ex: - '' params: - - { } + - {} serverid: desc: Shows current server ID. ex: - '' params: - - { } + - {} roles: desc: List roles on this server or roles of a user if specified. Paginated, 20 roles per page. ex: @@ -1014,31 +1016,31 @@ chnlfilterinv: ex: - '' params: - - { } + - {} srvrfilterinv: desc: Toggles automatic deletion of invites posted in the server. Does not affect users with the Administrator permission. ex: - '' params: - - { } + - {} chnlfilterlin: desc: Toggles automatic deletion of links posted in the channel. Does not negate the `{0}srvrfilterlin` enabled setting. Does not affect users with the Administrator permission. ex: - '' params: - - { } + - {} srvrfilterlin: desc: Toggles automatic deletion of links posted in the server. Does not affect users with the Administrator permission. ex: - '' params: - - { } + - {} chnlfilterwords: desc: Toggles automatic deletion of messages containing filtered words on the channel. Does not negate the `{0}srvrfilterwords` enabled setting. Does not affect users with the Administrator permission. ex: - '' params: - - { } + - {} filterword: desc: Adds or removes (if it exists) a word from the list of filtered words. Use`{0}sfw` or `{0}cfw` to toggle filtering. ex: @@ -1051,7 +1053,7 @@ srvrfilterwords: ex: - '' params: - - { } + - {} lstfilterwords: desc: Shows a list of filtered words. ex: @@ -1310,8 +1312,7 @@ quotesearch: textOrAuthor: desc: "The search term to find a matching quote." quoteid: - desc: -| - Displays the quote with the specified ID number. + desc: Displays the quote with the specified ID number. Quote ID numbers can be found by typing `{0}liqu [num]` where `[num]` is a number of a page which contains 15 quotes. ex: - 123456 params: @@ -1354,7 +1355,7 @@ playlistshuffle: ex: - '' params: - - { } + - {} flip: desc: Flips coin(s) - heads or tails, and shows an image. ex: @@ -1386,7 +1387,7 @@ roll: - 3d5 - 5dF params: - - { } + - {} - num: desc: "The number of sides on the dice being rolled." - arg: @@ -1430,7 +1431,7 @@ nunchi: ex: - '' params: - - { } + - {} connect4: desc: Creates or joins an existing connect4 game. 2 players are required for the game. Objective of the game is to get 4 of your pieces next to each other in a vertical, horizontal or diagonal line. You can specify a bet when you create a game and only users who bet the same amount will be able to join your game. ex: @@ -1517,7 +1518,7 @@ take: betroll: desc: |- Bets the specified amount of currency and rolls a dice. - Rolling over 65 yields x2 of your currency, over 90 - x4 and 100 x10. + Rolling over 66 yields x2 of your currency, over 90 - x4 and 100 x10. You can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance. ex: - 5 @@ -1525,7 +1526,7 @@ betroll: - amount: desc: "The amount to be wagered on the roll of the dice." luckyladder: - desc: + desc: Bets the specified amount of currency on the lucky ladder. You can stop on one of many different multipliers. The won amount is rounded down to the nearest whole number. @@ -1536,7 +1537,7 @@ luckyladder: - amount: desc: "The total value of the bet being placed." leaderboard: - desc: |- + desc: |- Displays the bot's currency leaderboard, or in other words, the richest users. Specifying -c flag will show only users who are in this server. Paginated with 10 users per page. @@ -1551,7 +1552,7 @@ leaderboard: params: desc: "Optional -c flag." trivia: - desc: |- + desc: |- Starts a game of trivia. First player to get to 10 points wins by default. 30 seconds per question. @@ -1566,13 +1567,13 @@ tl: ex: - '' params: - - { } + - {} tq: desc: Quits current trivia after current question. ex: - '' params: - - { } + - {} typestart: desc: Starts a typing contest. ex: @@ -1585,7 +1586,7 @@ typestop: ex: - '' params: - - { } + - {} typeadd: desc: Adds a new article to the typing contest. ex: @@ -1616,7 +1617,7 @@ gencurrency: ex: - '' params: - - { } + - {} gencurlist: desc: Shows the list of server and channel ids where gc is enabled. Paginated with 9 per page. ex: @@ -1625,12 +1626,12 @@ gencurlist: - page: desc: "The current page number for pagination." choose: - desc: Chooses a thing from a list of things. Separate items with a semicolon ; + desc: Chooses a thing from a list of things ex: - Get up;Sleep;Sleep more params: - list: - desc: "The items separated by ;" + desc: "The type of items in the collection being searched." rps: desc: |- Play a game of Rocket-Paperclip-Scissors with Ellie. @@ -1649,7 +1650,7 @@ next: ex: - '' params: - - { } + - {} play: desc: |- Queues up and plays a song or video based on a search query, song name, artist name or youtube link. @@ -1662,7 +1663,7 @@ play: - 5 - Dream Of Venice params: - - { } + - {} - index: desc: "The index of the desired song or search result to navigate to." - query: @@ -1672,19 +1673,19 @@ stop: ex: - '' params: - - { } + - {} destroy: desc: Completely stops the music and unbinds the bot from the channel. (may cause weird behaviour) ex: - '' params: - - { } + - {} pause: desc: Pauses or Unpauses the song. ex: - '' params: - - { } + - {} queue: desc: |- Queues up and plays a song or video based on a search query, song name, artist name, search query or youtube link. @@ -1715,7 +1716,7 @@ listqueue: - '' - 2 params: - - { } + - {} - page: desc: "The current page number for the song queue listing." nowplaying: @@ -1723,7 +1724,7 @@ nowplaying: ex: - '' params: - - { } + - {} volume: desc: Sets the music playback volume (0-100%). Persistent server setting. Default 100 ex: @@ -1764,7 +1765,7 @@ join: ex: - '' params: - - { } + - {} trackremove: desc: "Remove a song by its # in the queue, or 'all' (or provide no parameter) to remove all songs from the queue." ex: @@ -1814,7 +1815,7 @@ streamrole: desc: "The role of users being monitored for streamer status." addRole: desc: "The role to be added to users when they start streaming." - - { } + - {} load: desc: Loads a saved playlist using its ID. Use `{0}pls` to list all saved playlists and `{0}save` to save new ones. ex: @@ -1850,7 +1851,7 @@ queueautoplay: ex: - '' params: - - { } + - {} streamadd: desc: Notifies this channel when the stream on the specified URL goes online or offline. Offline notifications will only show if you enable `{0}streamoff`. Maximum 10 per server. ex: @@ -1863,7 +1864,7 @@ streamsclear: ex: - '' params: - - { } + - {} streamremove: desc: Stops following the stream on the specified index. (use `{0}stl` to see indexes) ex: @@ -1883,13 +1884,13 @@ streamoffline: ex: - '' params: - - { } + - {} streamonlinedelete: desc: Toggles whether the bot will delete stream online message when the stream goes offline. ex: - '' params: - - { } + - {} streammessage: desc: Sets the message which will show when the stream on the specified index comes online. You can use %user% and %platform% placeholders. ex: @@ -1929,13 +1930,13 @@ convertlist: ex: - '' params: - - { } + - {} wowjoke: desc: Get one of penultimate WoW jokes. ex: - '' params: - - { } + - {} calculate: desc: Evaluate a mathematical expression. ex: @@ -1986,6 +1987,23 @@ pokemonability: params: - ability: desc: "The type of the Pokémon's special power or trait that can be used in battle." +memelist: + desc: Shows a list of template keys (and their respective names) used for `{0}memegen`. + ex: + - '' + params: + - page: + desc: "The number of pages in the list to be displayed." +memegen: + desc: Generates a meme from memelist with specified text. Separate multiple text values with semicolons. Provide no meme text to see an example meme with that template. + ex: + - biw gets iced coffee;in the winter + - ntot + params: + - meme: + desc: "The caption or punchline of the meme, which can be a single sentence or multiple sentences separated by semicolons." + memeText: + desc: "The user-provided text to be displayed on the generated meme." weather: desc: Shows current weather data for the specified city. ex: @@ -2033,25 +2051,25 @@ randomcat: ex: - '' params: - - { } + - {} randomdog: desc: Shows a random dog image. ex: - '' params: - - { } + - {} randomfood: desc: Shows a random food image. ex: - '' params: - - { } + - {} randombird: desc: Shows a random bird image. ex: - '' params: - - { } + - {} image: desc: Pulls a random image using a search parameter. ex: @@ -2088,35 +2106,35 @@ urbandict: - query: desc: "The term being searched for in the dictionary." catfact: - desc: Shows a random fact about cats. + desc: Shows a random catfact from ex: - '' params: - - { } + - {} yomama: - desc: Shows a random yomama joke. + desc: Shows a random joke from ex: - '' params: - - { } + - {} randjoke: desc: Shows a random joke. ex: - '' params: - - { } + - {} chucknorris: desc: Shows a random Chuck Norris joke. ex: - '' params: - - { } + - {} magicitem: - desc: Shows a random magic item with its description. + desc: Shows a random magic item from ex: - '' params: - - { } + - {} wiki: desc: Gives you back a wikipedia link ex: @@ -2155,26 +2173,26 @@ translangs: ex: - '' params: - - { } + - {} guide: desc: Sends a readme and a guide links to the channel. ex: - '' params: - - { } + - {} calcops: desc: Shows all available operations in the `{0}calc` command ex: - '' params: - - { } -quotesdeleteall: - desc: Deletes all quotes with the specified keyword. + - {} +delallquotes: + desc: Deletes all quotes on a specified keyword. ex: - kek params: - keyword: - desc: "The keyword/trigger of the quotes to be deleted." + desc: "The keyword to search for in the text." greetdmmsg: desc: Sets a new join announcement message which will be sent to the user who joined. Type `%user.mention%` if you want to mention the new member. Using it with no message will show the current DM greet message. You can use embed json from instead of a regular text, if you want the message to be embedded. ex: @@ -2305,51 +2323,40 @@ deckshuffle: ex: - '' params: - - { } + - {} forwardmessages: desc: Toggles forwarding of non-command messages sent to bot's DM to the bot owners ex: - '' params: - - { } + - {} forwardtoall: desc: Toggles whether messages will be forwarded to all bot owners or only to the first one specified in the creds.yml file ex: - '' params: - - { } + - {} forwardtochannel: desc: Toggles forwarding of non-command messages sent to bot's DM to the current channel ex: - '' params: - - { } + - {} resetperms: desc: Resets the bot's permissions module on this server to the default value. ex: - '' params: - - { } + - {} antiraid: - desc: |- - Sets an anti-raid protection on the server. - - First parameter is number of people which will trigger the protection. - - Second parameter is a time interval in which that number of people needs to join in order to trigger the protection. - - Third parameter is punishment for those people. - Available punishments: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, RemoveRoles, AddRole, Warn, TimeOut - You can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h. - - Provide no parameters to disable. + desc: 'Sets an anti-raid protection on the server. Provide no parameters to disable. First parameter is number of people which will trigger the protection. Second parameter is a time interval in which that number of people needs to join in order to trigger the protection, and third parameter is punishment for those people. You can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h. Available punishments: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, RemoveRoles, AddRole, Warn, TimeOut' ex: - 5 20 Kick - 7 9 Ban - 10 10 Ban 6h30m - '' params: - - { } + - {} - userThreshold: desc: "The number of users that must join the server within a specified time interval to trigger the anti-raid protection." seconds: @@ -2365,19 +2372,14 @@ antiraid: action: desc: "The punishment action specifies the consequence for users who trigger the anti-raid protection." antispam: - desc: |- - Applies a Punishment to people who repeat the same message X times in a row. - Available Punishments are: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, RemoveRoles, AddRole, Warn, TimeOut - You can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h. - Max message count is 10. - Provide no parameters to disable. + desc: 'Stops people from repeating same message X times in a row. Provide no parameters to disable. You can specify to either mute, kick or ban the offenders. You can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h. Max message count is 10. Available punishments: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, AddRole, RemoveRoles, Warn, TimeOut' ex: - 3 Mute - 5 Ban - 5 Ban 3h30m - '' params: - - { } + - {} - messageCount: desc: "The maximum number of times a user can send the same message before being punished." action: @@ -2395,17 +2397,12 @@ antispam: action: desc: "The type of punishment to be applied to the offender." antialt: - desc: |- - Applies a punishment action to any user whose account is younger than the specified threshold. - Available Punishments are: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, RemoveRoles, AddRole, Warn, TimeOut - You can specify an additional time argument to do a timed punishment for actions which support it (Ban, Mute, etc) up to 24h. - Max message count is 10. - Provide no parameters to disable. + desc: Applies a punishment action to any user whose account is younger than the specified threshold. Specify time after the punishment to have a timed punishment (not all punishments support timers). ex: - 1h Ban - 3d Mute 1h params: - - { } + - {} - minAge: desc: "The minimum age of an account for which the punishment should be applied." action: @@ -2469,7 +2466,7 @@ adsarm: ex: - '' params: - - { } + - {} setstream: desc: Sets the bots stream. First parameter is the twitch link, second parameter is stream name. ex: @@ -2513,9 +2510,9 @@ autotranslang: ex: - en fr params: - - { } + - {} - fromLang: - desc: + desc: toLang: desc: "The destination language code, such as \"en\" for English or \"fr\" for French." autotranslate: @@ -2526,7 +2523,7 @@ autotranslate: params: - autoDelete: desc: "The option to automatically remove translated messages from the chat." -quotelist: +listquotes: desc: Lists all quotes on the server ordered alphabetically or by ID. 15 Per page. ex: - 3 @@ -2553,7 +2550,7 @@ typelist: params: - page: desc: "The current page number for the list of typing articles." -serverlist: +listservers: desc: Lists servers the bot is on with some basic info. 15 per page. ex: - 3 @@ -2561,14 +2558,14 @@ serverlist: - page: desc: "The number of pages to retrieve from the server list." cleverbot: - desc: |- + desc: |- Toggles cleverbot/chatgpt session. When enabled, the bot will reply to messages starting with bot mention in the server. Expressions starting with %bot.mention% won't work if cleverbot/chatgpt is enabled. ex: - '' params: - - { } + - {} shorten: desc: Attempts to shorten an URL, if it fails, returns the input URL. ex: @@ -2598,7 +2595,7 @@ hangmanlist: ex: - '' params: - - { } + - {} hangman: desc: Starts a game of hangman in the channel. You can optionally select a category `{0}hangmanlist` to see a list of available categories. ex: @@ -2612,7 +2609,7 @@ hangmanstop: ex: - '' params: - - { } + - {} acrophobia: desc: Starts an Acrophobia game. ex: @@ -2626,7 +2623,7 @@ logevents: ex: - '' params: - - { } + - {} log: desc: Toggles logging event. Disables it if it is active anywhere on the server. Enables if it isn't active. Use `{0}logevents` to see a list of all events you can subscribe to. ex: @@ -2640,7 +2637,7 @@ queuefairplay: ex: - '' params: - - { } + - {} define: desc: Finds a definition of a word. ex: @@ -2648,6 +2645,13 @@ define: params: - word: desc: "The word being searched for." +activity: + desc: Checks for spammers. + ex: + - '' + params: + - page: + desc: "The number of pages to scan for spam." setstatus: desc: Sets the bot's status. (Online/Idle/Dnd/Invisible) ex: @@ -2684,13 +2688,13 @@ antilist: ex: - '' params: - - { } + - {} antispamignore: desc: Toggles whether antispam ignores current channel. Antispam must be enabled. ex: - '' params: - - { } + - {} eventstart: desc: |- Starts one of the events seen on public Ellie. @@ -2703,21 +2707,14 @@ eventstart: desc: "The type of event being started." options: desc: "The optional option flags for the event." -gamblestats: +betstats: desc: |- Shows the total stats of several gambling features. Updates once an hour. ex: - '' params: - - { } -gamblestatsreset: - desc: |- - Resets the gamble stats. - ex: - - '' - params: - - { } + - {} slot: desc: |- Play Ellie slots by placing your bet. @@ -2745,18 +2742,12 @@ waifuclaim: desc: "The cost of claiming the waifu." target: desc: "The user to whom the claim is being made, allowing the waifu to be claimed from their collection." -waifuclaims: - desc: Shows all of your currently claimed waifus. - ex: - - '' - params: - - { } waifureset: desc: Resets your waifu stats, except current waifus. ex: - '' params: - - { } + - {} waifutransfer: desc: Transfer the ownership of one of your waifus to another user. You must pay 10% of your waifu's value unless that waifu has affinity towards you, in which case you must pay 60% fee. Transferred waifu's price will be reduced by the fee amount. ex: @@ -2817,18 +2808,27 @@ waifuinfo: desc: "The user being targeted, whose waifu information will be displayed." - targetId: desc: "The ID of the person whose waifu stats are being displayed." +mal: + desc: Shows basic info from a MyAnimeList profile. + ex: + - straysocks + params: + - name: + desc: "The username or identifier for the MyAnimeList account being queried." + - usr: + desc: "The user's guild membership information is used to fetch their anime list and other relevant data." setmusicchannel: desc: Sets the current channel as the default music output channel. This will output playing, finished, paused and removed songs to that channel instead of the channel where the first song was queued in. Persistent server setting. ex: - '' params: - - { } + - {} unsetmusicchannel: desc: Bot will output playing, finished, paused and removed songs to the channel where the first song was queued in. Persistent server setting. ex: - '' params: - - { } + - {} musicquality: desc: 'Gets or sets the default music player quality. Available settings: Highest, High, Medium, Low. Default is **Highest**. Provide no argument to see current setting.' ex: @@ -2836,7 +2836,7 @@ musicquality: - High - Low params: - - { } + - {} - preset: desc: "The selected preset determines the level of audio compression and processing applied to the music playback." stringsreload: @@ -2844,7 +2844,7 @@ stringsreload: ex: - '' params: - - { } + - {} shardstats: desc: |- Stats for shards. Paginated with 25 shards per page. @@ -2885,7 +2885,7 @@ timezone: - '' - GMT Standard Time params: - - { } + - {} - id: desc: "The identifier for a specific timezone region." languagesetdefault: @@ -2894,7 +2894,7 @@ languagesetdefault: - en-US - default params: - - { } + - {} - name: desc: "The code page or character encoding for the target audience." languageset: @@ -2903,7 +2903,7 @@ languageset: - 'de-DE ' - default params: - - { } + - {} - name: desc: "The locale name for which the response language should be set." languageslist: @@ -2911,13 +2911,13 @@ languageslist: ex: - '' params: - - { } + - {} exprtoggleglobal: desc: Toggles whether global expressions are usable on this server. ex: - '' params: - - { } + - {} exprreact: desc: Sets or resets reactions (up to 3) which will be added to the response message of the Expression with the specified ID. Provide no emojis to reset. ex: @@ -2962,7 +2962,7 @@ exprsreload: ex: - '' params: - - { } + - {} exprsimport: desc: Upload the file or send the raw .yml data with this command to import all expressions from the specified string or file into the current server (or as global expressions in dm) ex: @@ -2975,7 +2975,7 @@ exprsexport: ex: - '' params: - - { } + - {} quotesimport: desc: Upload the file or send the raw .yml data with this command to import all quotes from the specified string or file into the current server. ex: @@ -2988,7 +2988,7 @@ quotesexport: ex: - '' params: - - { } + - {} aliaslist: desc: Shows the list of currently set aliases. Paginated. ex: @@ -3084,7 +3084,7 @@ startupcommandsclear: ex: - '' params: - - { } + - {} startupcommandslist: desc: Lists all startup commands in the order they will be executed in. ex: @@ -3116,7 +3116,7 @@ banmessage: - '{{ "description": "%ban.user% you have been banned from %server.name% by %ban.mod%" }}' params: - message: - desc: "The custom message to be displayed when a user is banned." + desc: "The custom message to be displayed when a user is banned from the server, allowing for placeholders to be replaced with relevant information." banmessagetest: desc: If ban message is not disabled, bot will send you the message as if you were banned by yourself. Used for testing the ban message. ex: @@ -3134,7 +3134,7 @@ banmsgreset: ex: - '' params: - - { } + - {} banprune: desc: |- Sets how many days of messages will be deleted when a user is banned. @@ -3159,7 +3159,7 @@ warnexpire: - 3 - 6 --delete params: - - { } + - {} - days: desc: "The number of days after which expired warnings will be automatically cleared from the system." params: @@ -3184,13 +3184,13 @@ warndelete: - 3 params: - index: - desc: "The index of the warning to be deleted." + desc: "The index of the warning to be deleted." warnpunishlist: desc: Lists punishments for warnings. ex: - '' params: - - { } + - {} warnpunish: desc: "Sets a punishment for a certain number of warnings. You can specify a time string after 'Ban' or *'Mute' punishments to make it a temporary mute/ban. Provide no punishment to remove. Available punishments: Ban, Kick, Softban, Mute, VoiceMute, ChatMute, AddRole, RemoveRoles" ex: @@ -3220,7 +3220,7 @@ ping: ex: - '' params: - - { } + - {} time: desc: Shows the current time and timezone in the specified location. ex: @@ -3336,7 +3336,7 @@ gamevoicechannel: ex: - '' params: - - { } + - {} shoplistadd: desc: Adds an item to the list of items for sale in the shop entry given the index. You usually want to run this command in the secret channel, so that the unique items are not leaked. ex: @@ -3356,7 +3356,7 @@ globalcommand: globalmodule: desc: Toggles whether a module can be used on any server. ex: - - 'Gambling' + - nsfw params: - module: desc: "The type of module or configuration information being toggled." @@ -3365,19 +3365,19 @@ globalpermlist: ex: - '' params: - - { } + - {} resetglobalperms: desc: Resets global permissions set by bot owner. ex: - '' params: - - { } + - {} prefix: desc: Sets this server's prefix for all bot commands. Provide no parameters to see the current server prefix. **Setting prefix requires Administrator server permission.** ex: - + params: - - { } + - {} - _: desc: "The default text that is prepended to all bot command names." newPrefix: @@ -3467,13 +3467,13 @@ xptemplatereload: ex: - '' params: - - { } + - {} xpexclusionlist: desc: Shows the roles and channels excluded from the XP system on this server, as well as whether the whole server is excluded. ex: - '' params: - - { } + - {} xpexclude: desc: Exclude a channel, role or current server from the xp system. ex: @@ -3496,7 +3496,7 @@ xpnotify: - global dm - server channel params: - - { } + - {} - place: desc: "The location where notifications should be sent, such as a specific channel or DM." type: @@ -3513,7 +3513,7 @@ xprewsreset: ex: - '' params: - - { } + - {} xprolereward: desc: |- Add or remove a role from the user who reaches the specified level. @@ -3630,13 +3630,13 @@ clubleave: ex: - '' params: - - { } + - {} clubdisband: desc: Disbands the club you're the owner of. This action is irreversible. ex: - '' params: - - { } + - {} clubkick: desc: Kicks the user from the club. You must be the club owner. They will be able to apply again. ex: @@ -3716,8 +3716,8 @@ eightball: ytuploadnotif: desc: |- Subscribe to a youtube channel's upload rss feed. + Shortcut for `.feed https://www.youtube.com/feeds/videos.xml?channel_id=%3Cyoutube_channel_id` You can optionally specify a message which will be posted with an update. - This is just a shortcut for `.feed` with a url of the youtube channel's rss feed. ex: - https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow - https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow New video is posted @@ -3783,7 +3783,7 @@ say: Make the bot say something, or in other words, make the bot send the message. You can optionally specify the channel where the bot will send the message. If you omit the channel name, it will send the message in the current channel. - Supports [embeds](https://eb.elliebot.net/) + Supports embeds. ex: - hi - '#chat hi' @@ -3820,7 +3820,7 @@ deletewaifus: ex: - '' params: - - { } + - {} deletewaifu: desc: Deletes everything from WaifuUpdates, WaifuItem and WaifuInfo tables for the specified user. Also makes specified user's waifus free. ex: @@ -3835,19 +3835,19 @@ deletecurrency: ex: - '' params: - - { } + - {} deleteplaylists: desc: Deletes everything from MusicPlaylists. ex: - '' params: - - { } + - {} deletexp: desc: Deletes everything from UserXpStats, Clubs and sets users' TotalXP to 0. ex: - '' params: - - { } + - {} discordpermoverride: desc: Overrides required user permissions that the command has with the specified ones. You can only use server-level permissions. This action will make the bot ignore user permission requirements which command has by default. Provide no permissions to reset to default. ex: @@ -3870,13 +3870,27 @@ discordpermoverridereset: ex: - '' params: - - { } + - {} +rafflecur: + desc: Starts or joins a currency raffle with a specified amount. Users who join the raffle will lose the amount of currency specified and add it to the pot. After 30 seconds, random winner will be selected who will receive the whole pot. There is also a `mixed` mode in which the users will be able to join the game with any amount of currency, and have their chances be proportional to the amount they've bet. + ex: + - 20 + - mixed 15 + params: + - _: + desc: "The type of game mode to use, either \"fixed\" or \"mixed\"." + amount: + desc: "The minimum or maximum amount of currency that can be used for betting." + - amount: + desc: "The minimum or maximum amount of currency that can be used for betting." + mixed: + desc: "The parameter determines whether the raffle operates in \"fixed\" or \"proportional\" mode." autodisconnect: desc: Toggles whether the bot should disconnect from the voice channel once it's done playing all of the songs and queue repeat option is set to `none`. ex: - '' params: - - { } + - {} timelyset: desc: Sets the 'timely' currency allowance amount for users. Second parameter is period in hours, default is 24 hours. ex: @@ -3895,13 +3909,13 @@ timely: ex: - '' params: - - { } + - {} timelyreset: desc: Resets all user timeouts on `{0}timely` command. ex: - '' params: - - { } + - {} crypto: desc: Shows basic stats about a cryptocurrency from coinmarketcap.com. You can use either a name or an abbreviation of the currency. ex: @@ -3942,6 +3956,18 @@ masskill: params: - people: desc: "The list of user IDs or usernames to ban from the server and blacklist from the bot." +rollduel: + desc: Challenge someone to a roll duel by specifying the amount and the user you wish to challenge as the parameters. To accept the challenge, just specify the name of the user who challenged you, without the amount. + ex: + - 50 @Someone + - '@Challenger' + params: + - u: + desc: "The user being challenged or accepting the challenge." + - amount: + desc: "The stakes for the roll duel." + u: + desc: "The user being challenged or accepting the challenge." reroadd: desc: |- Specify a message id, emote and a role name to have the bot assign the specified role to the user who reacts to the specified message (in this channel) with the specified emoji. @@ -3983,7 +4009,7 @@ rerodeleteall: ex: - '' params: - - { } + - {} rerotransfer: desc: Transfers reaction roles from one message to another by specifying their ids. If the target message has reaction roles specified already, the reaction roles will be MERGED, not overwritten. ex: @@ -4010,19 +4036,19 @@ hit: ex: - '' params: - - { } + - {} stand: desc: Finish your turn in the blackjack game. ex: - '' params: - - { } + - {} double: desc: In the blackjack game, double your bet in order to receive exactly one more card, and your turn ends. ex: - '' params: - - { } + - {} xpreset: desc: Resets specified user's XP, or the XP of all users in the server. You can't reverse this action. ex: @@ -4033,7 +4059,7 @@ xpreset: desc: "The ID of a specific guild member whose XP is being reset." - userId: desc: "The ID of a specific player whose experience points are being reset." - - { } + - {} xpshop: desc: Access the xp shop (if enabled). You can purchase either xp card frames or backgrounds. You can optionally provide a page number ex: @@ -4041,7 +4067,7 @@ xpshop: - frames - bgs 3 params: - - { } + - {} - type: desc: "The type of item to be purchased, such as an XP card frame or background." page: @@ -4086,9 +4112,7 @@ quran: - ayah: desc: "The number of the ayah in the Quran, for example 2:255." edit: - desc: |- - Edits bot's message, you have to specify message ID and new text. You can optionally specify target channel. - Supports [embeds](https://eb.elliebot.net/) + desc: Edits bot's message, you have to specify message ID and new text. You can optionally specify target channel. Supports embeds. ex: - 7479498384 Hi :^) - '#other-channel 771562360594628608 New message!' @@ -4133,7 +4157,13 @@ agerestricttoggle: ex: - '' params: - - { } + - {} +economy: + desc: Breakdown of the current state of the bot's economy. Updates every 3 minutes. + ex: + - '' + params: + - {} purgeuser: desc: Purge user from the database completely. This includes currency, xp, clubs that user owns, waifu info ex: @@ -4162,7 +4192,7 @@ coordreload: ex: - '' params: - - { } + - {} showembed: desc: Prints the json equivalent of the embed of the message specified by its Id. ex: @@ -4180,7 +4210,7 @@ deleteemptyservers: ex: - '' params: - - { } + - {} marmaladeload: desc: |- Loads a marmalade with the specified name from the data/marmalades/ folder. @@ -4221,13 +4251,13 @@ marmaladelist: ex: - '' params: - - { } + - {} marmaladesearch: desc: Searches for marmalades online given the search term ex: - shrine params: - - { } + - {} bankdeposit: desc: Deposits the specified amount of currency into the bank for later use. ex: @@ -4252,7 +4282,7 @@ bankbalance: - '' - '@User' params: - - { } + - {} banktake: desc: Takes the specified amount of currency from a user's bank ex: @@ -4280,13 +4310,11 @@ patron: ex: - '' params: - - { } + - {} - user: desc: "The ID or handle of the user whose patronage status is being checked." patronmessage: - desc: |- - Sends a message to all patrons of the specified tier and higher. - Supports [embeds](https://eb.elliebot.net/) + desc: Sends a message to all patrons of the specified tier and higher. Supports embeds. ex: - x hello params: @@ -4345,7 +4373,7 @@ bettest: - betflip 1000 - slot 2000 params: - - { } + - {} - target: desc: "The type of game or wager being tested." tests: @@ -4369,7 +4397,7 @@ autopublish: ex: - '' params: - - { } + - {} doas: desc: Execute the command as if you were the target user. Requires bot ownership and server administrator permission. ex: @@ -4392,7 +4420,7 @@ cacheusers: - '' - serverId params: - - { } + - {} - guild: desc: "The guild for which user data is being cached." stickyroles: @@ -4400,7 +4428,7 @@ stickyroles: ex: - '' params: - - { } + - {} giveawaystart: desc: Starts a giveaway. Specify the duration (between 1 minute and 30 days) followed by the prize. ex: @@ -4438,13 +4466,13 @@ giveawaylist: ex: - '' params: - - { } + - {} todolist: desc: Lists all todos. ex: - '' params: - - { } + - {} todoadd: desc: Adds a new todo. ex: @@ -4480,7 +4508,7 @@ todoclear: ex: - '' params: - - { } + - {} todoarchiveadd: desc: Creates a new archive with the specified name using current todos. ex: @@ -4517,13 +4545,13 @@ todoarchivedelete: - todoId: desc: "The identifier for the archived todo item to be deleted." cleanupguilddata: - desc: |- + desc: |- Deletes data for all servers bot is no longer a member of from the database. This is a highly destructive and irreversible command. ex: - '' params: - - { } + - {} prompt: desc: |- Ask the bot to do something for you. @@ -4541,7 +4569,7 @@ honeypot: ex: - '' params: - - { } + - {} coins: desc: |- Shows a list of 10 crypto currencies ordered by market cap. @@ -4566,140 +4594,8 @@ afk: desc: "The message to send when someone pings you." keep: desc: |- - The current server, won't be deleted from Ellie's database during the purge. + The current serve, won't be deleted from Ellie's database during the purge. ex: - '' params: - - { } -leaveunkeptservers: - desc: |- - Leaves all servers whose owners didn't run .keep - ex: - - '' - params: - - shardId: - desc: "Shard id from which to start leaving unkept servers." - - delay: - desc: "Delay in miliseconds between leaves" -ncanvas: - desc: |- - Shows the current nCanvas. - The canvas allows users to set each pixel's color and text using currency. - ex: - - '' - params: - - { } -nczoom: - desc: |- - Zooms in on the nCanvas. - Bot will show the 10x10 grid with the position of each cell for use with `ncset`. - You can either use alphanumeric position (ex. s4u) or pixel x and y (ex. 123 123) - ex: - - 'sgu' - - '123 123' - params: - - position: - desc: "The position of the pixel to set in alphanumeric format." - - position: - desc: "The position of the pixel to set in pixel x and y format." -ncsetpixel: - desc: |- - Sets a pixel's color and text on the nCanvas. - You must specify the position of the pixel to set in alphanumeric format. - You can obtain alphanumeric position of the pixel by using `nczoom` or `ncp ` - ex: - - 'sgu #ff0000 Some text' - params: - - position: - desc: "The position of the pixel to set in alphanumeric format." - - color: - desc: "The color of the pixel to set in HEX." - - text: - desc: "The optional text to set on the pixel." -ncsetimg: - desc: |- - Attach the image to the message sending the command to overwrite the nCanvas with it. - All prices and colors will be reset. - The image must be equal to the size of the nCanvas (default is 500x350) - This command is dangerous and irreversible. - ex: - - '' - params: - - { } -ncpixel: - desc: |- - Shows the pixel at the specified position. - You can get pixel positions by using `nczoom` - ex: - - 'sgu' - - '123 123' - params: - - position: - desc: "The position of the pixel to retrieve in alphanumeric format." - - position: - desc: "The position of the pixel to retrieve in pixel x and y format." -ncreset: - desc: |- - Clears the nCanvas. - All prices and colors will be reset. - This command is dangerous and irreversible. - ex: - - '' - params: - - { } -translateflags: - desc: |- - Toggles translate flags on the current channel. - Reacting with a country flag will translate the message to that country's language. - ex: - - '' - params: - - { } -betstatsreset: - desc: |- - Reset all of your Bet Stats for a fee. - You can alternatively reset Bet Stats for the specified game. - ex: - - '' - - 'game' - params: - - game: - desc: 'The game to reset betstats for. Omit to reset all games' -betstats: - desc: |- - Shows the current bet stats for yourself, or the targetted user. - You may optionally specify the game to show stats for. - Supported games right now are: bf, br, bd, lula, slot, race - ex: - - '' - - '@someone' - - '@someone lula' - - 'bd' - params: - - {} - - user: - desc: 'The user for who to show the betstats for.' - - user: - desc: 'The user for who to show the betstats for.' - game: - desc: 'The game to show betstats for. Omit to show betstats for all games combined' - - game: - desc: 'The game to show betstats for. Omit to show betstats for all games combined' -rakeback: - desc: |- - Try to claim any rakeback that you have available. - Rakeback is accumulated by betting (not by winning or losing). - Default rakeback is 0.05 * house edge - House edge is defined per game - ex: - - '' - params: - - {} -snipe: - desc: |- - Snipe the message you replied to with this command. - Otherwise, if you don't reply to a message, it will snipe the last message sent in the channel (out of the last few messages) which has text or an image. - ex: - - '' - params: - - { } \ No newline at end of file + - {} \ No newline at end of file diff --git a/src/EllieBot/data/strings/responses/responses.en-US.json b/src/EllieBot/data/strings/responses/responses.en-US.json index 130fcbe..b55d8ad 100644 --- a/src/EllieBot/data/strings/responses/responses.en-US.json +++ b/src/EllieBot/data/strings/responses/responses.en-US.json @@ -195,7 +195,7 @@ "srvr_banner_too_large": "Specified image is too large! Maximum size is 8MB.", "srvr_banner_invalid_url": "Specified url is not valid. Make sure you're specifying a direct image url.", "set_channel_name": "New channel name set.", - "set_activity": "New activity set!", + "set_game": "New game set!", "set_stream": "New stream set!", "set_topic": "New channel topic set.", "shard_reconnecting": "Shard {0} reconnecting.", @@ -307,13 +307,13 @@ "waifus_none": "No waifus have been claimed yet.", "waifus_top_waifus": "Top Waifus", "waifu_affinity_already": "your affinity is already set to that waifu or you're trying to remove your affinity while not having one.", - "waifu_affinity_changed": "{0} changed their affinity from {1} to {2}.\n\n*This is morally questionable.*🤔", + "waifu_affinity_changed": "changed their affinity from {0} to {1}.\n\n*This is morally questionable.*🤔", "waifu_affinity_cooldown": "You must wait {0} hours and {1} minutes in order to change your affinity again.", "waifu_affinity_reset": "Your affinity is reset. You no longer have a person you like.", - "waifu_affinity_set": "{0} wants to be {1}'s waifu. Aww <3", - "waifu_claimed": "{0} claimed {1} as their waifu for {2}!", + "waifu_affinity_set": "wants to be {0}'s waifu. Aww <3", + "waifu_claimed": "claimed {0} as their waifu for {1}!", "waifu_divorced_like": "You have divorced a waifu who likes you. You heartless monster.\n{0} received {1} as a compensation.", - "waifu_egomaniac": "You can't set affinity to yourself, you egomaniac.", + "waifu_egomaniac": "you can't set affinity to yourself, you egomaniac.", "waifu_fulfilled": "🎉 Their love is fulfilled! 🎉\n{0}'s new value is {1}!", "waifu_isnt_cheap": "No waifu is that cheap. You must pay at least {0} to get a waifu, even if their actual value is lower.", "waifu_not_enough": "You must pay {0} or more to claim that waifu!", @@ -622,7 +622,6 @@ "region": "Region", "remind2": "I will remind {0} to {1} {2} ({3})", "remind_timely": "I will remind you about your timely reward {0}", - "timely_button": "Click the button to claim your timely reward.", "remind_invalid": "Not a valid remind format. Remind must have a target, timer and a reason. Check the command list.", "remind_too_long": "Remind time has exceeded maximum.", "repeater_redundant_no": "Repeater **#{0}** won't post redundant messages anymore.", @@ -978,7 +977,14 @@ "reset_user_confirm": "Are you sure that you want to reset specified user's XP on this server?", "reset_user": "User with id {0} has had their XP reset on this server.", "reset_server": "XP of all users on the server has been reset.", + "economy_state": "State of the economy", + "currency_owned": "Total currency owned by users", + "currency_one_percent": "% of currency owned by top 1%", + "currency_planted": "Currency currently planted", + "owned_waifus_total": "Total value of owned waifus", + "bot_currency": "Currency owned by the bot", "total": "Total", + "bank_accounts": "Bank Accounts", "no_invites": "No invites on this page.", "invite_deleted": "Invite {0} has been deleted.", "group_name_added": "Group #{0} now has a name: {1}", @@ -992,6 +998,7 @@ "module_description_help": "Get command help, descriptions and usage examples", "module_description_gambling": "Bet on dice rolls, blackjack, slots, coinflips and others", "module_description_games": "Play trivia, nunchi, hangman, connect4 and other games", + "module_description_nsfw": "NSFW commands.", "module_description_music": "Play music from youtube, local files and radio streams", "module_description_utility": "Manage custom quotes, repeating messages and check facts about the server", "module_description_administration": "Moderation, punish users, setup self assignable roles and greet messages", @@ -1102,21 +1109,5 @@ "honeypot_on": "Honeypot enabled on this channel.", "honeypot_off": "Honeypot disabled.", "afk_set": "AFK message set. Type a message in any channel to clear.", - "rero_message_not_found": "The specified message wasn't found. Make sure you've specified the message from this channel.", - "nc_pixel_not_found": "Pixel not found", - "nc_pixel": "Pixel {0}", - "nc_position": "Position", - "nc_pixel_set": "Pixel {0} successfully set!", - "invalid_color": "Color you've specified is invalid.", - "nc_pixel_set_confirm": "Are you sure you want to set pixel {0}? It will cost you {1}", - "nc_hint": "Use `{0}nczoom x y` command to zoom in. Image is {1}x{2} pixels.", - "nc_insuff_payment": "Invalid payment.", - "invalid_img_size": "Image must to be {0}x{1} pixels.", - "no_attach_found": "No attachment found. Please send the image along with this command.", - "trfl_enabled": "Flag translation enabled on this channel. Reacting to a message with a flag will translate it to that language.", - "trfl_disabled": "Flag translation disabled.", - "rakeback_claimed": "You've claimed {0} as rakeback!", - "rakeback_none": "You don't have any rakeback to claim yet.", - "rakeback_available": "You have {0} rakeback available. Click the button to claim.", - "sniped_by": "Sniped by {0}" + "rero_message_not_found": "The specified message wasn't found. Make sure you've specified the message from this channel." } diff --git a/src/EllieBot/migrate.ps1 b/src/EllieBot/migrate.ps1 deleted file mode 100644 index 62f9b69..0000000 --- a/src/EllieBot/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 -c SqliteContext -p EllieBot.csproj - dotnet ef migrations add $migrationName -c PostgreSqlContext -p EllieBot.csproj -} \ No newline at end of file