mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
Lots more stuff
This commit is contained in:
@@ -35,10 +35,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nadeko.Common", "src\Nadeko
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nadeko.Econ", "src\Nadeko.Econ\Nadeko.Econ.csproj", "{4F4FBF7C-74F0-4AE4-B451-9E60BDCA9C37}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nadeko.Cache", "src\Nadeko.Cache\Nadeko.Cache.csproj", "{7CD45BAA-72BF-466E-AFD8-E1224A6DDC05}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Modules.Expresssions", "src\NadekoBot.Modules.Expresssions\NadekoBot.Modules.Expresssions.csproj", "{92E239B9-C230-4475-9506-BED20174FD20}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nadeko.Bot.Db", "src\Nadeko.Bot.Db\Nadeko.Bot.Db.csproj", "{02499E3E-3B04-4BC8-9B3C-D9494661F78E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nadeko.Bot.Common", "src\Nadeko.Bot.Common\Nadeko.Bot.Common.csproj", "{02ABC10E-3323-4698-A388-C61D7D03797E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -100,18 +102,24 @@ Global
|
||||
{4F4FBF7C-74F0-4AE4-B451-9E60BDCA9C37}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4F4FBF7C-74F0-4AE4-B451-9E60BDCA9C37}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4F4FBF7C-74F0-4AE4-B451-9E60BDCA9C37}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7CD45BAA-72BF-466E-AFD8-E1224A6DDC05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7CD45BAA-72BF-466E-AFD8-E1224A6DDC05}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7CD45BAA-72BF-466E-AFD8-E1224A6DDC05}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7CD45BAA-72BF-466E-AFD8-E1224A6DDC05}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7CD45BAA-72BF-466E-AFD8-E1224A6DDC05}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7CD45BAA-72BF-466E-AFD8-E1224A6DDC05}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{92E239B9-C230-4475-9506-BED20174FD20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{92E239B9-C230-4475-9506-BED20174FD20}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{92E239B9-C230-4475-9506-BED20174FD20}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{92E239B9-C230-4475-9506-BED20174FD20}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU
|
||||
{92E239B9-C230-4475-9506-BED20174FD20}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{92E239B9-C230-4475-9506-BED20174FD20}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{02499E3E-3B04-4BC8-9B3C-D9494661F78E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{02499E3E-3B04-4BC8-9B3C-D9494661F78E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{02499E3E-3B04-4BC8-9B3C-D9494661F78E}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{02499E3E-3B04-4BC8-9B3C-D9494661F78E}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU
|
||||
{02499E3E-3B04-4BC8-9B3C-D9494661F78E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{02499E3E-3B04-4BC8-9B3C-D9494661F78E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{02ABC10E-3323-4698-A388-C61D7D03797E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{02ABC10E-3323-4698-A388-C61D7D03797E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{02ABC10E-3323-4698-A388-C61D7D03797E}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{02ABC10E-3323-4698-A388-C61D7D03797E}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU
|
||||
{02ABC10E-3323-4698-A388-C61D7D03797E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{02ABC10E-3323-4698-A388-C61D7D03797E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -127,8 +135,9 @@ Global
|
||||
{E685977E-31A4-46F4-A5D7-4E3E39E82E43} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2}
|
||||
{A6022F5F-A764-4D3F-847B-36F0391FF659} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2}
|
||||
{4F4FBF7C-74F0-4AE4-B451-9E60BDCA9C37} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2}
|
||||
{7CD45BAA-72BF-466E-AFD8-E1224A6DDC05} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2}
|
||||
{92E239B9-C230-4475-9506-BED20174FD20} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2}
|
||||
{02499E3E-3B04-4BC8-9B3C-D9494661F78E} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2}
|
||||
{02ABC10E-3323-4698-A388-C61D7D03797E} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {5F3F555C-855F-4BE8-B526-D062D3E8ACA4}
|
||||
|
78
src/Nadeko.Bot.Common/Abstractions/creds/IBotCredentials.cs
Normal file
78
src/Nadeko.Bot.Common/Abstractions/creds/IBotCredentials.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
#nullable disable
|
||||
namespace NadekoBot;
|
||||
|
||||
public interface IBotCredentials
|
||||
{
|
||||
string Token { get; }
|
||||
string GoogleApiKey { get; }
|
||||
ICollection<ulong> OwnerIds { get; }
|
||||
bool UsePrivilegedIntents { get; }
|
||||
string RapidApiKey { get; }
|
||||
|
||||
IDbOptions Db { get; }
|
||||
string OsuApiKey { get; }
|
||||
int TotalShards { get; }
|
||||
IPatreonSettings Patreon { get; }
|
||||
string CleverbotApiKey { get; }
|
||||
string Gpt3ApiKey { get; }
|
||||
IRestartConfig RestartCommand { get; }
|
||||
IVotesSettings Votes { get; }
|
||||
string BotListToken { get; }
|
||||
string RedisOptions { get; }
|
||||
string LocationIqApiKey { get; }
|
||||
string TimezoneDbApiKey { get; }
|
||||
string CoinmarketcapApiKey { get; }
|
||||
string TrovoClientId { get; }
|
||||
string CoordinatorUrl { get; set; }
|
||||
string TwitchClientId { get; set; }
|
||||
string TwitchClientSecret { get; set; }
|
||||
IGoogleApiConfig Google { get; set; }
|
||||
BotCacheImplemenation BotCache { get; set; }
|
||||
}
|
||||
|
||||
public interface IVotesSettings
|
||||
{
|
||||
string TopggServiceUrl { get; set; }
|
||||
string TopggKey { get; set; }
|
||||
string DiscordsServiceUrl { get; set; }
|
||||
string DiscordsKey { get; set; }
|
||||
}
|
||||
|
||||
public interface IPatreonSettings
|
||||
{
|
||||
public string ClientId { get; set; }
|
||||
public string AccessToken { get; set; }
|
||||
public string RefreshToken { get; set; }
|
||||
public string ClientSecret { get; set; }
|
||||
public string CampaignId { get; set; }
|
||||
}
|
||||
|
||||
public interface IRestartConfig
|
||||
{
|
||||
string Cmd { get; set; }
|
||||
string Args { get; set; }
|
||||
}
|
||||
|
||||
public class RestartConfig : IRestartConfig
|
||||
{
|
||||
public string Cmd { get; set; }
|
||||
public string Args { get; set; }
|
||||
}
|
||||
|
||||
public enum BotCacheImplemenation
|
||||
{
|
||||
Memory,
|
||||
Redis
|
||||
}
|
||||
|
||||
public interface IDbOptions
|
||||
{
|
||||
string Type { get; set; }
|
||||
string ConnectionString { get; set; }
|
||||
}
|
||||
|
||||
public interface IGoogleApiConfig
|
||||
{
|
||||
string SearchId { get; init; }
|
||||
string ImageSearchId { get; init; }
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
namespace NadekoBot;
|
||||
|
||||
public interface IBotCredsProvider
|
||||
{
|
||||
public void Reload();
|
||||
public IBotCredentials GetCreds();
|
||||
public void ModifyCredsFile(Action<IBotCredentials> func);
|
||||
}
|
@@ -1,7 +1,8 @@
|
||||
#nullable disable
|
||||
using System.Globalization;
|
||||
using NadekoBot.Services;
|
||||
|
||||
namespace NadekoBot.Services;
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Defines methods to retrieve and reload bot strings
|
||||
@@ -11,6 +12,6 @@ public interface IBotStrings
|
||||
string GetText(string key, ulong? guildId = null, params object[] data);
|
||||
string GetText(string key, CultureInfo locale, params object[] data);
|
||||
void Reload();
|
||||
CommandStrings GetCommandStrings(string commandName, ulong? guildId = null);
|
||||
CommandStrings GetCommandStrings(string commandName, CultureInfo cultureInfo);
|
||||
ICommandStrings GetCommandStrings(string commandName, ulong? guildId = null);
|
||||
ICommandStrings GetCommandStrings(string commandName, CultureInfo cultureInfo);
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
#nullable disable
|
||||
using System.Globalization;
|
||||
|
||||
namespace NadekoBot.Services;
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
public static class BotStringsExtensions
|
||||
{
|
@@ -24,5 +24,5 @@ public interface IBotStringsProvider
|
||||
/// </summary>
|
||||
/// <param name="localeName">Language name</param>
|
||||
/// <param name="commandName">Command name</param>
|
||||
CommandStrings GetCommandStrings(string localeName, string commandName);
|
||||
ICommandStrings GetCommandStrings(string localeName, string commandName);
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
#nullable disable
|
||||
namespace NadekoBot.Services;
|
||||
|
||||
public interface ICommandStrings
|
||||
{
|
||||
string Desc { get; set; }
|
||||
string[] Args { get; set; }
|
||||
}
|
@@ -12,5 +12,5 @@ public interface IStringsSource
|
||||
/// <returns>Dictionary(localename, Dictionary(key, response))</returns>
|
||||
Dictionary<string, Dictionary<string, string>> GetResponseStrings();
|
||||
|
||||
Dictionary<string, Dictionary<string, CommandStrings>> GetCommandStrings();
|
||||
Dictionary<string, Dictionary<string, ICommandStrings>> GetCommandStrings();
|
||||
}
|
13
src/Nadeko.Bot.Common/Abstractions/strings/LocStr.cs
Normal file
13
src/Nadeko.Bot.Common/Abstractions/strings/LocStr.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
public readonly struct LocStr
|
||||
{
|
||||
public readonly string Key;
|
||||
public readonly object[] Params;
|
||||
|
||||
public LocStr(string key, params object[] data)
|
||||
{
|
||||
Key = key;
|
||||
Params = data;
|
||||
}
|
||||
}
|
@@ -1,8 +1,10 @@
|
||||
#nullable disable
|
||||
|
||||
using Cloneable;
|
||||
using NadekoBot.Common.Yml;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
using System.Globalization;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using YamlDotNet.Core;
|
||||
using YamlDotNet.Serialization;
|
||||
|
12
src/Nadeko.Bot.Common/Extensions/DbExtensions.cs
Normal file
12
src/Nadeko.Bot.Common/Extensions/DbExtensions.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using NadekoBot.Db;
|
||||
using NadekoBot.Db.Models;
|
||||
// todo fix these namespaces. It should only be Nadeko.Bot.Db
|
||||
using NadekoBot.Services.Database;
|
||||
|
||||
namespace NadekoBot.Extensions;
|
||||
|
||||
public static class DbExtensions
|
||||
{
|
||||
public static DiscordUser GetOrCreateUser(this NadekoContext ctx, IUser original, Func<IQueryable<DiscordUser>, IQueryable<DiscordUser>> includes = null)
|
||||
=> ctx.GetOrCreateUser(original.Id, original.Username, original.Discriminator, original.AvatarId, includes);
|
||||
}
|
31
src/Nadeko.Bot.Common/GlobalUsings.cs
Normal file
31
src/Nadeko.Bot.Common/GlobalUsings.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
// // global using System.Collections.Concurrent;
|
||||
// global using NonBlocking;
|
||||
//
|
||||
// // packages
|
||||
// global using Serilog;
|
||||
global using Humanizer;
|
||||
//
|
||||
// // nadekobot
|
||||
// global using NadekoBot;
|
||||
// global using NadekoBot.Services;
|
||||
global using Nadeko.Common; // new project
|
||||
// global using NadekoBot.Common; // old + nadekobot specific things
|
||||
// global using NadekoBot.Common.Attributes;
|
||||
global using NadekoBot.Extensions;
|
||||
// global using Nadeko.Snake;
|
||||
|
||||
// discord
|
||||
global using Discord;
|
||||
global using Discord.Commands;
|
||||
global using Discord.Net;
|
||||
global using Discord.WebSocket;
|
||||
|
||||
// aliases
|
||||
global using GuildPerm = Discord.GuildPermission;
|
||||
global using ChannelPerm = Discord.ChannelPermission;
|
||||
global using BotPermAttribute = Discord.Commands.RequireBotPermissionAttribute;
|
||||
global using LeftoverAttribute = Discord.Commands.RemainderAttribute;
|
||||
// global using TypeReaderResult = NadekoBot.Common.TypeReaders.TypeReaderResult;
|
||||
|
||||
// non-essential
|
||||
global using JetBrains.Annotations;
|
@@ -1,4 +1,6 @@
|
||||
namespace NadekoBot;
|
||||
using NadekoBot.Services;
|
||||
|
||||
namespace NadekoBot;
|
||||
|
||||
public class NadekoInteractionService : INadekoInteractionService, INService
|
||||
{
|
24
src/Nadeko.Bot.Common/Medusa/IMedusaLoaderService.cs
Normal file
24
src/Nadeko.Bot.Common/Medusa/IMedusaLoaderService.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.Globalization;
|
||||
|
||||
namespace Nadeko.Medusa;
|
||||
|
||||
public interface IMedusaLoaderService
|
||||
{
|
||||
Task<MedusaLoadResult> LoadMedusaAsync(string medusaName);
|
||||
Task<MedusaUnloadResult> UnloadMedusaAsync(string medusaName);
|
||||
string GetCommandDescription(string medusaName, string commandName, CultureInfo culture);
|
||||
string[] GetCommandExampleArgs(string medusaName, string commandName, CultureInfo culture);
|
||||
Task ReloadStrings();
|
||||
IReadOnlyCollection<string> GetAllMedusae();
|
||||
IReadOnlyCollection<MedusaStats> GetLoadedMedusae(CultureInfo? cultureInfo = null);
|
||||
}
|
||||
|
||||
public sealed record MedusaStats(string Name,
|
||||
string? Description,
|
||||
IReadOnlyCollection<SnekStats> Sneks);
|
||||
|
||||
public sealed record SnekStats(string Name,
|
||||
string? Prefix,
|
||||
IReadOnlyCollection<SnekCommandStats> Commands);
|
||||
|
||||
public sealed record SnekCommandStats(string Name);
|
10
src/Nadeko.Bot.Common/Medusa/MedusaLoadResult.cs
Normal file
10
src/Nadeko.Bot.Common/Medusa/MedusaLoadResult.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Nadeko.Medusa;
|
||||
|
||||
public enum MedusaLoadResult
|
||||
{
|
||||
Success,
|
||||
NotFound,
|
||||
AlreadyLoaded,
|
||||
Empty,
|
||||
UnknownError,
|
||||
}
|
9
src/Nadeko.Bot.Common/Medusa/MedusaUnloadResult.cs
Normal file
9
src/Nadeko.Bot.Common/Medusa/MedusaUnloadResult.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Nadeko.Medusa;
|
||||
|
||||
public enum MedusaUnloadResult
|
||||
{
|
||||
Success,
|
||||
NotLoaded,
|
||||
PossiblyUnable,
|
||||
NotFound,
|
||||
}
|
8
src/Nadeko.Bot.Common/MessageType.cs
Normal file
8
src/Nadeko.Bot.Common/MessageType.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
public enum MsgType
|
||||
{
|
||||
Ok,
|
||||
Pending,
|
||||
Error
|
||||
}
|
29
src/Nadeko.Bot.Common/Nadeko.Bot.Common.csproj
Normal file
29
src/Nadeko.Bot.Common/Nadeko.Bot.Common.csproj
Normal file
@@ -0,0 +1,29 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Cloneable" Version="1.3.0" />
|
||||
<PackageReference Include="Discord.Net" Version="3.104.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Nadeko.Bot.Db\Nadeko.Bot.Db.csproj" />
|
||||
<ProjectReference Include="..\Nadeko.Common\Nadeko.Common.csproj" />
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
|
||||
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-beta17" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
|
||||
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta14" />
|
||||
<PackageReference Include="SixLabors.Shapes" Version="1.0.0-beta0009" />
|
||||
<PackageReference Include="Humanizer" Version="2.14.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<Publish>True</Publish>
|
||||
</PackageReference>
|
||||
<ProjectReference Include="..\Nadeko.Medusa\Nadeko.Medusa.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -1,10 +1,10 @@
|
||||
#nullable disable
|
||||
using System.Globalization;
|
||||
using MessageType = NadekoBot.Extensions.MessageType;
|
||||
using NadekoBot.Services;
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace NadekoBot.Modules;
|
||||
namespace NadekoBot.Common;
|
||||
|
||||
[UsedImplicitly(ImplicitUseTargetFlags.Default
|
||||
| ImplicitUseTargetFlags.WithInheritors
|
||||
@@ -15,7 +15,7 @@ public abstract class NadekoModule : ModuleBase
|
||||
|
||||
// Injected by Discord.net
|
||||
public IBotStrings Strings { get; set; }
|
||||
public CommandHandler _cmdHandler { get; set; }
|
||||
public ICommandHandler _cmdHandler { get; set; }
|
||||
public ILocalization _localization { get; set; }
|
||||
public IEmbedBuilderService _eb { get; set; }
|
||||
public INadekoInteractionService _inter { get; set; }
|
||||
@@ -49,11 +49,11 @@ public abstract class NadekoModule : ModuleBase
|
||||
|
||||
//
|
||||
public Task<IUserMessage> SendErrorAsync(string text, NadekoInteraction inter = null)
|
||||
=> ctx.Channel.SendAsync(_eb, text, MessageType.Error, inter);
|
||||
=> ctx.Channel.SendAsync(_eb, text, MsgType.Error, inter);
|
||||
public Task<IUserMessage> SendConfirmAsync(string text, NadekoInteraction inter = null)
|
||||
=> ctx.Channel.SendAsync(_eb, text, MessageType.Ok, inter);
|
||||
=> ctx.Channel.SendAsync(_eb, text, MsgType.Ok, inter);
|
||||
public Task<IUserMessage> SendPendingAsync(string text, NadekoInteraction inter = null)
|
||||
=> ctx.Channel.SendAsync(_eb, text, MessageType.Pending, inter);
|
||||
=> ctx.Channel.SendAsync(_eb, text, MsgType.Pending, inter);
|
||||
|
||||
|
||||
// localized normal
|
6
src/Nadeko.Bot.Common/Services/ICommandHandler.cs
Normal file
6
src/Nadeko.Bot.Common/Services/ICommandHandler.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace NadekoBot.Services;
|
||||
|
||||
public interface ICommandHandler
|
||||
{
|
||||
string GetPrefix(IGuild ctxGuild);
|
||||
}
|
@@ -6,7 +6,7 @@ namespace NadekoBot.Services;
|
||||
public interface ILocalization
|
||||
{
|
||||
CultureInfo DefaultCultureInfo { get; }
|
||||
ConcurrentDictionary<ulong, CultureInfo> GuildCultureInfos { get; }
|
||||
IDictionary<ulong, CultureInfo> GuildCultureInfos { get; }
|
||||
|
||||
CultureInfo GetCultureInfo(IGuild guild);
|
||||
CultureInfo GetCultureInfo(ulong? guildId);
|
@@ -1,5 +1,4 @@
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Searches;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
using System.Globalization;
|
||||
|
@@ -2,6 +2,8 @@ using NadekoBot.Common.Configs;
|
||||
using NadekoBot.Common.Yml;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using NadekoBot.Common;
|
||||
|
||||
namespace NadekoBot.Services;
|
||||
|
@@ -1,9 +1,11 @@
|
||||
using Humanizer.Localisation;
|
||||
using Nadeko.Medusa;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
using Nadeko.Medusa;
|
||||
using NadekoBot.Common;
|
||||
using Serilog;
|
||||
|
||||
namespace NadekoBot.Extensions;
|
||||
|
@@ -1,5 +1,6 @@
|
||||
using Nadeko.Common;
|
||||
using NadekoBot.Modules.Xp;
|
||||
using NadekoBot.Common;
|
||||
using NadekoBot.Services;
|
||||
using Serilog;
|
||||
|
||||
namespace NadekoBot.Extensions;
|
||||
|
||||
@@ -78,16 +79,16 @@ public static class MessageChannelExtensions
|
||||
this IMessageChannel ch,
|
||||
IEmbedBuilderService eb,
|
||||
string text,
|
||||
MessageType type,
|
||||
MsgType type,
|
||||
NadekoInteraction? inter = null)
|
||||
{
|
||||
var builder = eb.Create().WithDescription(text);
|
||||
|
||||
builder = (type switch
|
||||
{
|
||||
MessageType.Error => builder.WithErrorColor(),
|
||||
MessageType.Ok => builder.WithOkColor(),
|
||||
MessageType.Pending => builder.WithPendingColor(),
|
||||
MsgType.Error => builder.WithErrorColor(),
|
||||
MsgType.Ok => builder.WithOkColor(),
|
||||
MsgType.Pending => builder.WithPendingColor(),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(type))
|
||||
});
|
||||
|
||||
@@ -96,15 +97,15 @@ public static class MessageChannelExtensions
|
||||
|
||||
// regular send overloads
|
||||
public static Task<IUserMessage> SendErrorAsync(this IMessageChannel ch, IEmbedBuilderService eb, string text)
|
||||
=> ch.SendAsync(eb, text, MessageType.Error);
|
||||
=> ch.SendAsync(eb, text, MsgType.Error);
|
||||
|
||||
public static Task<IUserMessage> SendConfirmAsync(this IMessageChannel ch, IEmbedBuilderService eb, string text)
|
||||
=> ch.SendAsync(eb, text, MessageType.Ok);
|
||||
=> ch.SendAsync(eb, text, MsgType.Ok);
|
||||
|
||||
public static Task<IUserMessage> SendAsync(
|
||||
this IMessageChannel ch,
|
||||
IEmbedBuilderService eb,
|
||||
MessageType type,
|
||||
MsgType type,
|
||||
string? title,
|
||||
string text,
|
||||
string? url = null,
|
||||
@@ -122,9 +123,9 @@ public static class MessageChannelExtensions
|
||||
|
||||
embed = type switch
|
||||
{
|
||||
MessageType.Error => embed.WithErrorColor(),
|
||||
MessageType.Ok => embed.WithOkColor(),
|
||||
MessageType.Pending => embed.WithPendingColor(),
|
||||
MsgType.Error => embed.WithErrorColor(),
|
||||
MsgType.Ok => embed.WithOkColor(),
|
||||
MsgType.Pending => embed.WithPendingColor(),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(type))
|
||||
};
|
||||
|
||||
@@ -140,7 +141,7 @@ public static class MessageChannelExtensions
|
||||
string text,
|
||||
string? url = null,
|
||||
string? footer = null)
|
||||
=> ch.SendAsync(eb, MessageType.Ok, title, text, url, footer);
|
||||
=> ch.SendAsync(eb, MsgType.Ok, title, text, url, footer);
|
||||
|
||||
public static Task<IUserMessage> SendErrorAsync(
|
||||
this IMessageChannel ch,
|
||||
@@ -149,7 +150,7 @@ public static class MessageChannelExtensions
|
||||
string text,
|
||||
string? url = null,
|
||||
string? footer = null)
|
||||
=> ch.SendAsync(eb, MessageType.Error, title, text, url, footer);
|
||||
=> ch.SendAsync(eb, MsgType.Error, title, text, url, footer);
|
||||
|
||||
public static Task SendPaginatedConfirmAsync(
|
||||
this ICommandContext ctx,
|
||||
@@ -307,13 +308,13 @@ public static class MessageChannelExtensions
|
||||
private static readonly Emoji _warnEmoji = new Emoji("⚠️");
|
||||
private static readonly Emoji _errorEmoji = new Emoji("❌");
|
||||
|
||||
public static Task ReactAsync(this ICommandContext ctx, MessageType type)
|
||||
public static Task ReactAsync(this ICommandContext ctx, MsgType type)
|
||||
{
|
||||
var emoji = type switch
|
||||
{
|
||||
MessageType.Error => _errorEmoji,
|
||||
MessageType.Pending => _warnEmoji,
|
||||
MessageType.Ok => _okEmoji,
|
||||
MsgType.Error => _errorEmoji,
|
||||
MsgType.Pending => _warnEmoji,
|
||||
MsgType.Ok => _okEmoji,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(type)),
|
||||
};
|
||||
|
||||
@@ -321,18 +322,11 @@ public static class MessageChannelExtensions
|
||||
}
|
||||
|
||||
public static Task OkAsync(this ICommandContext ctx)
|
||||
=> ctx.ReactAsync(MessageType.Ok);
|
||||
=> ctx.ReactAsync(MsgType.Ok);
|
||||
|
||||
public static Task ErrorAsync(this ICommandContext ctx)
|
||||
=> ctx.ReactAsync(MessageType.Error);
|
||||
=> ctx.ReactAsync(MsgType.Error);
|
||||
|
||||
public static Task WarningAsync(this ICommandContext ctx)
|
||||
=> ctx.ReactAsync(MessageType.Pending);
|
||||
}
|
||||
|
||||
public enum MessageType
|
||||
{
|
||||
Ok,
|
||||
Pending,
|
||||
Error
|
||||
=> ctx.ReactAsync(MsgType.Pending);
|
||||
}
|
@@ -1,4 +1,6 @@
|
||||
using Nadeko.Common;
|
||||
using NadekoBot.Common;
|
||||
using NadekoBot.Services;
|
||||
|
||||
namespace NadekoBot.Extensions;
|
||||
|
||||
@@ -63,7 +65,7 @@ public static class SocketMessageComponentExtensions
|
||||
this SocketMessageComponent ch,
|
||||
IEmbedBuilderService eb,
|
||||
string text,
|
||||
MessageType type,
|
||||
MsgType type,
|
||||
bool ephemeral = false,
|
||||
NadekoInteraction? inter = null)
|
||||
{
|
||||
@@ -71,9 +73,9 @@ public static class SocketMessageComponentExtensions
|
||||
|
||||
builder = (type switch
|
||||
{
|
||||
MessageType.Error => builder.WithErrorColor(),
|
||||
MessageType.Ok => builder.WithOkColor(),
|
||||
MessageType.Pending => builder.WithPendingColor(),
|
||||
MsgType.Error => builder.WithErrorColor(),
|
||||
MsgType.Ok => builder.WithOkColor(),
|
||||
MsgType.Pending => builder.WithPendingColor(),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(type))
|
||||
});
|
||||
|
||||
@@ -87,12 +89,12 @@ public static class SocketMessageComponentExtensions
|
||||
IEmbedBuilderService eb,
|
||||
string text,
|
||||
bool ephemeral = false)
|
||||
=> smc.RespondAsync(eb, text, MessageType.Error, ephemeral);
|
||||
=> smc.RespondAsync(eb, text, MsgType.Error, ephemeral);
|
||||
|
||||
public static Task RespondConfirmAsync(
|
||||
this SocketMessageComponent smc,
|
||||
IEmbedBuilderService eb,
|
||||
string text,
|
||||
bool ephemeral = false)
|
||||
=> smc.RespondAsync(eb, text, MessageType.Ok, ephemeral);
|
||||
=> smc.RespondAsync(eb, text, MsgType.Ok, ephemeral);
|
||||
}
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Db.Models;
|
||||
using NadekoBot.Services;
|
||||
|
||||
namespace NadekoBot.Extensions;
|
||||
|
1
src/Nadeko.Bot.Db/.globalconfig
Normal file
1
src/Nadeko.Bot.Db/.globalconfig
Normal file
@@ -0,0 +1 @@
|
||||
dotnet_diagnostic.CS8981.severity = none
|
@@ -83,8 +83,6 @@ public static class DiscordUserExtensions
|
||||
return queryable.First(u => u.UserId == userId);
|
||||
}
|
||||
|
||||
public static DiscordUser GetOrCreateUser(this NadekoContext ctx, IUser original, Func<IQueryable<DiscordUser>, IQueryable<DiscordUser>> includes = null)
|
||||
=> ctx.GetOrCreateUser(original.Id, original.Username, original.Discriminator, original.AvatarId, includes);
|
||||
|
||||
public static int GetUserGlobalRank(this DbSet<DiscordUser> users, ulong id)
|
||||
=> users.AsQueryable()
|
@@ -8,7 +8,9 @@ namespace NadekoBot.Db;
|
||||
public static class PollExtensions
|
||||
{
|
||||
public static IEnumerable<Poll> GetAllPolls(this DbSet<Poll> polls)
|
||||
=> polls.Include(x => x.Answers).Include(x => x.Votes).ToArray();
|
||||
=> polls.Include(x => x.Answers)
|
||||
.Include(x => x.Votes)
|
||||
.ToArray();
|
||||
|
||||
public static void RemovePoll(this NadekoContext ctx, int id)
|
||||
{
|
@@ -1,5 +1,6 @@
|
||||
#nullable disable
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Nadeko.Common;
|
||||
using NadekoBot.Services.Database.Models;
|
||||
|
||||
namespace NadekoBot.Db;
|
||||
@@ -29,10 +30,10 @@ public static class QuoteExtensions
|
||||
ulong guildId,
|
||||
string keyword)
|
||||
{
|
||||
var rng = new NadekoRandom();
|
||||
// todo figure shuffle out
|
||||
return (await quotes.AsQueryable().Where(q => q.GuildId == guildId && q.Keyword == keyword).ToListAsync())
|
||||
.OrderBy(_ => rng.Next())
|
||||
.FirstOrDefault();
|
||||
.Shuffle()
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public static async Task<Quote> SearchQuoteKeywordTextAsync(
|
31
src/Nadeko.Bot.Db/GlobalUsings.cs
Normal file
31
src/Nadeko.Bot.Db/GlobalUsings.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
// // global using System.Collections.Concurrent;
|
||||
// global using NonBlocking;
|
||||
//
|
||||
// // packages
|
||||
// global using Serilog;
|
||||
// global using Humanizer;
|
||||
//
|
||||
// // nadekobot
|
||||
global using NadekoBot;
|
||||
global using NadekoBot.Services;
|
||||
global using Nadeko.Common;
|
||||
// global using NadekoBot.Common; // old + nadekobot specific things
|
||||
// global using NadekoBot.Common.Attributes;
|
||||
// global using NadekoBot.Extensions;
|
||||
// global using Nadeko.Snake;
|
||||
|
||||
// // discord
|
||||
// global using Discord;
|
||||
// global using Discord.Commands;
|
||||
// global using Discord.Net;
|
||||
// global using Discord.WebSocket;
|
||||
//
|
||||
// // aliases
|
||||
// global using GuildPerm = Discord.GuildPermission;
|
||||
// global using ChannelPerm = Discord.ChannelPermission;
|
||||
// global using BotPermAttribute = Discord.Commands.RequireBotPermissionAttribute;
|
||||
// global using LeftoverAttribute = Discord.Commands.RemainderAttribute;
|
||||
// global using TypeReaderResult = NadekoBot.Common.TypeReaders.TypeReaderResult;
|
||||
|
||||
// non-essential
|
||||
// global using JetBrains.Annotations;
|
6
src/Nadeko.Bot.Db/Helpers/ActivityType.cs
Normal file
6
src/Nadeko.Bot.Db/Helpers/ActivityType.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Nadeko.Bot.Db;
|
||||
|
||||
public enum ActivityType
|
||||
{
|
||||
|
||||
}
|
47
src/Nadeko.Bot.Db/Helpers/GuildPerm.cs
Normal file
47
src/Nadeko.Bot.Db/Helpers/GuildPerm.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
namespace Nadeko.Bot.Db;
|
||||
|
||||
[Flags]
|
||||
public enum GuildPerm : ulong
|
||||
{
|
||||
CreateInstantInvite = 1,
|
||||
KickMembers = 2,
|
||||
BanMembers = 4,
|
||||
Administrator = 8,
|
||||
ManageChannels = 16, // 0x0000000000000010
|
||||
ManageGuild = 32, // 0x0000000000000020
|
||||
ViewGuildInsights = 524288, // 0x0000000000080000
|
||||
AddReactions = 64, // 0x0000000000000040
|
||||
ViewAuditLog = 128, // 0x0000000000000080
|
||||
ViewChannel = 1024, // 0x0000000000000400
|
||||
SendMessages = 2048, // 0x0000000000000800
|
||||
SendTTSMessages = 4096, // 0x0000000000001000
|
||||
ManageMessages = 8192, // 0x0000000000002000
|
||||
EmbedLinks = 16384, // 0x0000000000004000
|
||||
AttachFiles = 32768, // 0x0000000000008000
|
||||
ReadMessageHistory = 65536, // 0x0000000000010000
|
||||
MentionEveryone = 131072, // 0x0000000000020000
|
||||
UseExternalEmojis = 262144, // 0x0000000000040000
|
||||
Connect = 1048576, // 0x0000000000100000
|
||||
Speak = 2097152, // 0x0000000000200000
|
||||
MuteMembers = 4194304, // 0x0000000000400000
|
||||
DeafenMembers = 8388608, // 0x0000000000800000
|
||||
MoveMembers = 16777216, // 0x0000000001000000
|
||||
UseVAD = 33554432, // 0x0000000002000000
|
||||
PrioritySpeaker = 256, // 0x0000000000000100
|
||||
Stream = 512, // 0x0000000000000200
|
||||
ChangeNickname = 67108864, // 0x0000000004000000
|
||||
ManageNicknames = 134217728, // 0x0000000008000000
|
||||
ManageRoles = 268435456, // 0x0000000010000000
|
||||
ManageWebhooks = 536870912, // 0x0000000020000000
|
||||
ManageEmojisAndStickers = 1073741824, // 0x0000000040000000
|
||||
UseApplicationCommands = 2147483648, // 0x0000000080000000
|
||||
RequestToSpeak = 4294967296, // 0x0000000100000000
|
||||
ManageEvents = 8589934592, // 0x0000000200000000
|
||||
ManageThreads = 17179869184, // 0x0000000400000000
|
||||
CreatePublicThreads = 34359738368, // 0x0000000800000000
|
||||
CreatePrivateThreads = 68719476736, // 0x0000001000000000
|
||||
UseExternalStickers = 137438953472, // 0x0000002000000000
|
||||
SendMessagesInThreads = 274877906944, // 0x0000004000000000
|
||||
StartEmbeddedActivities = 549755813888, // 0x0000008000000000
|
||||
ModerateMembers = 1099511627776, // 0x0000010000000000
|
||||
}
|
@@ -21,7 +21,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
.HasAnnotation("ProductVersion", "6.0.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -40,7 +40,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubapplicants", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -59,7 +59,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubbans", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -106,7 +106,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubs", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -194,7 +194,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("discorduser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -2790,16 +2790,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("xpsettings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Applicants")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubapplicants_clubs_clubid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2811,16 +2811,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Bans")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubbans_clubs_clubid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2832,20 +2832,20 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Owner")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Owner")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Db.Models.ClubInfo", "OwnerId")
|
||||
.HasForeignKey("Nadeko.Bot.Db.Models.ClubInfo", "OwnerId")
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("fk_clubs_discorduser_ownerid");
|
||||
|
||||
b.Navigation("Owner");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Members")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
@@ -2854,7 +2854,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("Club");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FollowedStreams")
|
||||
@@ -3192,17 +3192,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Affinity")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Affinity")
|
||||
.WithMany()
|
||||
.HasForeignKey("AffinityId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_affinityid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Claimer")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Claimer")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClaimerId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_claimerid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Waifu")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Waifu")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3228,17 +3228,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "New")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "New")
|
||||
.WithMany()
|
||||
.HasForeignKey("NewId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_newid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Old")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Old")
|
||||
.WithMany()
|
||||
.HasForeignKey("OldId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_oldid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3296,7 +3296,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("GuildConfig");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Navigation("Applicants");
|
||||
|
@@ -21,7 +21,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
.HasAnnotation("ProductVersion", "6.0.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -40,7 +40,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubapplicants", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -59,7 +59,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubbans", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -106,7 +106,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubs", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -194,7 +194,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("discorduser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -2794,16 +2794,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("xpsettings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Applicants")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubapplicants_clubs_clubid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2815,16 +2815,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Bans")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubbans_clubs_clubid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2836,20 +2836,20 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Owner")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Owner")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Db.Models.ClubInfo", "OwnerId")
|
||||
.HasForeignKey("Nadeko.Bot.Db.Models.ClubInfo", "OwnerId")
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("fk_clubs_discorduser_ownerid");
|
||||
|
||||
b.Navigation("Owner");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Members")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
@@ -2858,7 +2858,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("Club");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FollowedStreams")
|
||||
@@ -3196,17 +3196,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Affinity")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Affinity")
|
||||
.WithMany()
|
||||
.HasForeignKey("AffinityId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_affinityid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Claimer")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Claimer")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClaimerId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_claimerid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Waifu")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Waifu")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3232,17 +3232,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "New")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "New")
|
||||
.WithMany()
|
||||
.HasForeignKey("NewId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_newid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Old")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Old")
|
||||
.WithMany()
|
||||
.HasForeignKey("OldId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_oldid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3300,7 +3300,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("GuildConfig");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Navigation("Applicants");
|
||||
|
@@ -21,7 +21,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
.HasAnnotation("ProductVersion", "6.0.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.BankUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.BankUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +50,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("bankusers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -69,7 +69,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubapplicants", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -88,7 +88,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubbans", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -135,7 +135,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubs", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -223,7 +223,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("discorduser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -2823,16 +2823,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("xpsettings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Applicants")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubapplicants_clubs_clubid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2844,16 +2844,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Bans")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubbans_clubs_clubid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2865,20 +2865,20 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Owner")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Owner")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Db.Models.ClubInfo", "OwnerId")
|
||||
.HasForeignKey("Nadeko.Bot.Db.Models.ClubInfo", "OwnerId")
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("fk_clubs_discorduser_ownerid");
|
||||
|
||||
b.Navigation("Owner");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Members")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
@@ -2887,7 +2887,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("Club");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FollowedStreams")
|
||||
@@ -3225,17 +3225,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Affinity")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Affinity")
|
||||
.WithMany()
|
||||
.HasForeignKey("AffinityId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_affinityid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Claimer")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Claimer")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClaimerId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_claimerid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Waifu")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Waifu")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3261,17 +3261,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "New")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "New")
|
||||
.WithMany()
|
||||
.HasForeignKey("NewId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_newid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Old")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Old")
|
||||
.WithMany()
|
||||
.HasForeignKey("OldId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_oldid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3329,7 +3329,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("GuildConfig");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Navigation("Applicants");
|
||||
|
@@ -21,7 +21,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
.HasAnnotation("ProductVersion", "6.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.BankUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.BankUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +50,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("bankusers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -69,7 +69,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubapplicants", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -88,7 +88,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubbans", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -135,7 +135,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubs", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -223,7 +223,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("discorduser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -2804,16 +2804,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("xpsettings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Applicants")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubapplicants_clubs_clubid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2825,16 +2825,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Bans")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubbans_clubs_clubid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2846,20 +2846,20 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Owner")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Owner")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Db.Models.ClubInfo", "OwnerId")
|
||||
.HasForeignKey("Nadeko.Bot.Db.Models.ClubInfo", "OwnerId")
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("fk_clubs_discorduser_ownerid");
|
||||
|
||||
b.Navigation("Owner");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Members")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
@@ -2868,7 +2868,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("Club");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FollowedStreams")
|
||||
@@ -3185,17 +3185,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Affinity")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Affinity")
|
||||
.WithMany()
|
||||
.HasForeignKey("AffinityId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_affinityid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Claimer")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Claimer")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClaimerId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_claimerid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Waifu")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Waifu")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3221,17 +3221,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "New")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "New")
|
||||
.WithMany()
|
||||
.HasForeignKey("NewId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_newid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Old")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Old")
|
||||
.WithMany()
|
||||
.HasForeignKey("OldId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_oldid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3289,7 +3289,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("GuildConfig");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Navigation("Applicants");
|
||||
|
@@ -21,7 +21,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
.HasAnnotation("ProductVersion", "6.0.5")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.BankUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.BankUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +50,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("bankusers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -69,7 +69,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubapplicants", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -88,7 +88,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubbans", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -135,7 +135,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubs", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -223,7 +223,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("discorduser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -267,7 +267,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("followedstream", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronQuota", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.PatronQuota", b =>
|
||||
{
|
||||
b.Property<ulong>("UserId")
|
||||
.HasColumnType("bigint unsigned")
|
||||
@@ -302,7 +302,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("patronquotas", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.PatronUser", b =>
|
||||
{
|
||||
b.Property<ulong>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -2874,16 +2874,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("xpsettings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Applicants")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubapplicants_clubs_clubid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2895,16 +2895,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Bans")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubbans_clubs_clubid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2916,20 +2916,20 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Owner")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Owner")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Db.Models.ClubInfo", "OwnerId")
|
||||
.HasForeignKey("Nadeko.Bot.Db.Models.ClubInfo", "OwnerId")
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("fk_clubs_discorduser_ownerid");
|
||||
|
||||
b.Navigation("Owner");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Members")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
@@ -2938,7 +2938,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("Club");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FollowedStreams")
|
||||
@@ -3255,17 +3255,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Affinity")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Affinity")
|
||||
.WithMany()
|
||||
.HasForeignKey("AffinityId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_affinityid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Claimer")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Claimer")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClaimerId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_claimerid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Waifu")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Waifu")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3291,17 +3291,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "New")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "New")
|
||||
.WithMany()
|
||||
.HasForeignKey("NewId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_newid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Old")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Old")
|
||||
.WithMany()
|
||||
.HasForeignKey("OldId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_oldid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3359,7 +3359,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("GuildConfig");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Navigation("Applicants");
|
||||
|
@@ -21,7 +21,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
.HasAnnotation("ProductVersion", "6.0.6")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.BankUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.BankUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +50,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("bankusers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -69,7 +69,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubapplicants", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -88,7 +88,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubbans", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -135,7 +135,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubs", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -223,7 +223,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("discorduser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -267,7 +267,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("followedstream", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronQuota", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.PatronQuota", b =>
|
||||
{
|
||||
b.Property<ulong>("UserId")
|
||||
.HasColumnType("bigint unsigned")
|
||||
@@ -302,7 +302,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("patronquotas", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.PatronUser", b =>
|
||||
{
|
||||
b.Property<ulong>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -335,7 +335,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.StreamOnlineMessage", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.StreamOnlineMessage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -2907,16 +2907,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("xpsettings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Applicants")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubapplicants_clubs_clubid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2928,16 +2928,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Bans")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubbans_clubs_clubid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2949,20 +2949,20 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Owner")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Owner")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Db.Models.ClubInfo", "OwnerId")
|
||||
.HasForeignKey("Nadeko.Bot.Db.Models.ClubInfo", "OwnerId")
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("fk_clubs_discorduser_ownerid");
|
||||
|
||||
b.Navigation("Owner");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Members")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
@@ -2971,7 +2971,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("Club");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FollowedStreams")
|
||||
@@ -3288,17 +3288,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Affinity")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Affinity")
|
||||
.WithMany()
|
||||
.HasForeignKey("AffinityId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_affinityid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Claimer")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Claimer")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClaimerId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_claimerid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Waifu")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Waifu")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3324,17 +3324,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "New")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "New")
|
||||
.WithMany()
|
||||
.HasForeignKey("NewId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_newid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Old")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Old")
|
||||
.WithMany()
|
||||
.HasForeignKey("OldId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_oldid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3392,7 +3392,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("GuildConfig");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Navigation("Applicants");
|
||||
|
@@ -21,7 +21,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
.HasAnnotation("ProductVersion", "6.0.6")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.BankUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.BankUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +50,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("bankusers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -69,7 +69,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubapplicants", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.Property<int>("ClubId")
|
||||
.HasColumnType("int")
|
||||
@@ -88,7 +88,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubbans", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -135,7 +135,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("clubs", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -223,7 +223,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("discorduser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -267,7 +267,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("followedstream", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronQuota", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.PatronQuota", b =>
|
||||
{
|
||||
b.Property<ulong>("UserId")
|
||||
.HasColumnType("bigint unsigned")
|
||||
@@ -302,7 +302,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("patronquotas", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.PatronUser", b =>
|
||||
{
|
||||
b.Property<ulong>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -335,7 +335,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.StreamOnlineMessage", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.StreamOnlineMessage", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -2911,16 +2911,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.ToTable("xpsettings", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubApplicants", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubApplicants", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Applicants")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubapplicants_clubs_clubid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2932,16 +2932,16 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubBans", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubBans", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Bans")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_clubbans_clubs_clubid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -2953,20 +2953,20 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Owner")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Owner")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Db.Models.ClubInfo", "OwnerId")
|
||||
.HasForeignKey("Nadeko.Bot.Db.Models.ClubInfo", "OwnerId")
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.HasConstraintName("fk_clubs_discorduser_ownerid");
|
||||
|
||||
b.Navigation("Owner");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.DiscordUser", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.DiscordUser", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.ClubInfo", "Club")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.ClubInfo", "Club")
|
||||
.WithMany("Members")
|
||||
.HasForeignKey("ClubId")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
@@ -2975,7 +2975,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("Club");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.FollowedStream", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.FollowedStream", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", null)
|
||||
.WithMany("FollowedStreams")
|
||||
@@ -3292,17 +3292,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Affinity")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Affinity")
|
||||
.WithMany()
|
||||
.HasForeignKey("AffinityId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_affinityid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Claimer")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Claimer")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClaimerId")
|
||||
.HasConstraintName("fk_waifuinfo_discorduser_claimerid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Waifu")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Waifu")
|
||||
.WithOne()
|
||||
.HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3328,17 +3328,17 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b =>
|
||||
{
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "New")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "New")
|
||||
.WithMany()
|
||||
.HasForeignKey("NewId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_newid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "Old")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "Old")
|
||||
.WithMany()
|
||||
.HasForeignKey("OldId")
|
||||
.HasConstraintName("fk_waifuupdates_discorduser_oldid");
|
||||
|
||||
b.HasOne("NadekoBot.Db.Models.DiscordUser", "User")
|
||||
b.HasOne("Nadeko.Bot.Db.Models.DiscordUser", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -3396,7 +3396,7 @@ namespace NadekoBot.Migrations.Mysql
|
||||
b.Navigation("GuildConfig");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.ClubInfo", b =>
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.ClubInfo", b =>
|
||||
{
|
||||
b.Navigation("Applicants");
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user