diff --git a/src/NadekoBot/Common/AsyncLazy.cs b/NadekoBot.Core/Common/AsyncLazy.cs similarity index 100% rename from src/NadekoBot/Common/AsyncLazy.cs rename to NadekoBot.Core/Common/AsyncLazy.cs diff --git a/src/NadekoBot/Common/Attributes/Aliases.cs b/NadekoBot.Core/Common/Attributes/Aliases.cs similarity index 91% rename from src/NadekoBot/Common/Attributes/Aliases.cs rename to NadekoBot.Core/Common/Attributes/Aliases.cs index e6c95f67..c57b89a3 100644 --- a/src/NadekoBot/Common/Attributes/Aliases.cs +++ b/NadekoBot.Core/Common/Attributes/Aliases.cs @@ -1,7 +1,7 @@ using System.Linq; using System.Runtime.CompilerServices; using Discord.Commands; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Common.Attributes { public class Aliases : AliasAttribute diff --git a/src/NadekoBot/Common/Attributes/Description.cs b/NadekoBot.Core/Common/Attributes/Description.cs similarity index 90% rename from src/NadekoBot/Common/Attributes/Description.cs rename to NadekoBot.Core/Common/Attributes/Description.cs index 7ebbac47..efb7705e 100644 --- a/src/NadekoBot/Common/Attributes/Description.cs +++ b/NadekoBot.Core/Common/Attributes/Description.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; using Discord.Commands; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Common.Attributes { diff --git a/src/NadekoBot/Common/Attributes/NadekoCommand.cs b/NadekoBot.Core/Common/Attributes/NadekoCommand.cs similarity index 90% rename from src/NadekoBot/Common/Attributes/NadekoCommand.cs rename to NadekoBot.Core/Common/Attributes/NadekoCommand.cs index ee8b9d58..7cca5519 100644 --- a/src/NadekoBot/Common/Attributes/NadekoCommand.cs +++ b/NadekoBot.Core/Common/Attributes/NadekoCommand.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; using Discord.Commands; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Common.Attributes { diff --git a/src/NadekoBot/Common/Attributes/NadekoModuleAttribute.cs b/NadekoBot.Core/Common/Attributes/NadekoModuleAttribute.cs similarity index 100% rename from src/NadekoBot/Common/Attributes/NadekoModuleAttribute.cs rename to NadekoBot.Core/Common/Attributes/NadekoModuleAttribute.cs diff --git a/src/NadekoBot/Common/Attributes/OwnerOnlyAttribute.cs b/NadekoBot.Core/Common/Attributes/OwnerOnlyAttribute.cs similarity index 95% rename from src/NadekoBot/Common/Attributes/OwnerOnlyAttribute.cs rename to NadekoBot.Core/Common/Attributes/OwnerOnlyAttribute.cs index c5227daa..25bbe17d 100644 --- a/src/NadekoBot/Common/Attributes/OwnerOnlyAttribute.cs +++ b/NadekoBot.Core/Common/Attributes/OwnerOnlyAttribute.cs @@ -1,7 +1,7 @@ using System; using System.Threading.Tasks; using Discord.Commands; -using NadekoBot.Services; +using NadekoBot.Core.Services; namespace NadekoBot.Common.Attributes { diff --git a/src/NadekoBot/Common/Attributes/Usage.cs b/NadekoBot.Core/Common/Attributes/Usage.cs similarity index 94% rename from src/NadekoBot/Common/Attributes/Usage.cs rename to NadekoBot.Core/Common/Attributes/Usage.cs index 391de638..743edb28 100644 --- a/src/NadekoBot/Common/Attributes/Usage.cs +++ b/NadekoBot.Core/Common/Attributes/Usage.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; using Discord.Commands; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; using System.Linq; using Discord; diff --git a/src/NadekoBot/Common/BotConfigEditType.cs b/NadekoBot.Core/Common/BotConfigEditType.cs similarity index 100% rename from src/NadekoBot/Common/BotConfigEditType.cs rename to NadekoBot.Core/Common/BotConfigEditType.cs diff --git a/src/NadekoBot/Common/CREmbed.cs b/NadekoBot.Core/Common/CREmbed.cs similarity index 100% rename from src/NadekoBot/Common/CREmbed.cs rename to NadekoBot.Core/Common/CREmbed.cs diff --git a/NadekoBot.Core/Common/Caching/FactoryCache.cs b/NadekoBot.Core/Common/Caching/FactoryCache.cs new file mode 100644 index 00000000..3d7bfbe4 --- /dev/null +++ b/NadekoBot.Core/Common/Caching/FactoryCache.cs @@ -0,0 +1,49 @@ +using System; + +namespace NadekoBot.Core.Common.Caching +{ + /// + /// A caching object which loads its value with a factory method when it expires. + /// + /// Type of the value which is cached. + public class FactoryCache : IFactoryCache + { + public DateTime LastUpdate { get; set; } = DateTime.MinValue; + private readonly object _locker = new object(); + private TimeSpan _expireAfter; + private readonly Func _factory; + private T Value; + + /// + /// Creates a new factory cache object. + /// + /// Method which loads the value when it expires or if it's not loaded the first time. + /// Time after which the value will be reloaded. + /// Should the value be loaded right away. If set to false, value will load when it's first retrieved. + public FactoryCache(Func factory, TimeSpan expireAfter, + bool loadImmediately = false) + { + _expireAfter = expireAfter; + _factory = factory; + if (loadImmediately) + { + Value = _factory(); + LastUpdate = DateTime.UtcNow; + } + } + + public T GetValue() + { + lock (_locker) + { + if (DateTime.UtcNow - LastUpdate > _expireAfter) + { + LastUpdate = DateTime.UtcNow; + return Value = _factory(); + } + + return Value; + } + } + } +} diff --git a/NadekoBot.Core/Common/Caching/IFactoryCache.cs b/NadekoBot.Core/Common/Caching/IFactoryCache.cs new file mode 100644 index 00000000..439152d4 --- /dev/null +++ b/NadekoBot.Core/Common/Caching/IFactoryCache.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NadekoBot.Core.Common.Caching +{ + public interface IFactoryCache + { + + } +} diff --git a/src/NadekoBot/Common/Collections/ConcurrentHashSet.cs b/NadekoBot.Core/Common/Collections/ConcurrentHashSet.cs similarity index 100% rename from src/NadekoBot/Common/Collections/ConcurrentHashSet.cs rename to NadekoBot.Core/Common/Collections/ConcurrentHashSet.cs diff --git a/src/NadekoBot/Common/Collections/DisposableImutableList.cs b/NadekoBot.Core/Common/Collections/DisposableImutableList.cs similarity index 100% rename from src/NadekoBot/Common/Collections/DisposableImutableList.cs rename to NadekoBot.Core/Common/Collections/DisposableImutableList.cs diff --git a/src/NadekoBot/Common/Collections/IndexedCollection.cs b/NadekoBot.Core/Common/Collections/IndexedCollection.cs similarity index 98% rename from src/NadekoBot/Common/Collections/IndexedCollection.cs rename to NadekoBot.Core/Common/Collections/IndexedCollection.cs index 6ef057c8..31ad1f3d 100644 --- a/src/NadekoBot/Common/Collections/IndexedCollection.cs +++ b/NadekoBot.Core/Common/Collections/IndexedCollection.cs @@ -1,7 +1,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Common.Collections { diff --git a/src/NadekoBot/Common/Collections/PoopyRingBuffer.cs b/NadekoBot.Core/Common/Collections/PoopyRingBuffer.cs similarity index 100% rename from src/NadekoBot/Common/Collections/PoopyRingBuffer.cs rename to NadekoBot.Core/Common/Collections/PoopyRingBuffer.cs diff --git a/src/NadekoBot/Common/CommandData.cs b/NadekoBot.Core/Common/CommandData.cs similarity index 100% rename from src/NadekoBot/Common/CommandData.cs rename to NadekoBot.Core/Common/CommandData.cs diff --git a/src/NadekoBot/Common/ModuleBehaviors/IEarlyBlocker.cs b/NadekoBot.Core/Common/ModuleBehaviors/IEarlyBlocker.cs similarity index 100% rename from src/NadekoBot/Common/ModuleBehaviors/IEarlyBlocker.cs rename to NadekoBot.Core/Common/ModuleBehaviors/IEarlyBlocker.cs diff --git a/src/NadekoBot/Common/ModuleBehaviors/IEarlyBlockingExecutor.cs b/NadekoBot.Core/Common/ModuleBehaviors/IEarlyBlockingExecutor.cs similarity index 100% rename from src/NadekoBot/Common/ModuleBehaviors/IEarlyBlockingExecutor.cs rename to NadekoBot.Core/Common/ModuleBehaviors/IEarlyBlockingExecutor.cs diff --git a/src/NadekoBot/Common/ModuleBehaviors/IEarlyExecutor.cs b/NadekoBot.Core/Common/ModuleBehaviors/IEarlyExecutor.cs similarity index 100% rename from src/NadekoBot/Common/ModuleBehaviors/IEarlyExecutor.cs rename to NadekoBot.Core/Common/ModuleBehaviors/IEarlyExecutor.cs diff --git a/src/NadekoBot/Common/ModuleBehaviors/IINputTransformer.cs b/NadekoBot.Core/Common/ModuleBehaviors/IINputTransformer.cs similarity index 100% rename from src/NadekoBot/Common/ModuleBehaviors/IINputTransformer.cs rename to NadekoBot.Core/Common/ModuleBehaviors/IINputTransformer.cs diff --git a/src/NadekoBot/Common/ModuleBehaviors/ILateBlocker.cs b/NadekoBot.Core/Common/ModuleBehaviors/ILateBlocker.cs similarity index 100% rename from src/NadekoBot/Common/ModuleBehaviors/ILateBlocker.cs rename to NadekoBot.Core/Common/ModuleBehaviors/ILateBlocker.cs diff --git a/src/NadekoBot/Common/ModuleBehaviors/ILateBlockingExecutor.cs b/NadekoBot.Core/Common/ModuleBehaviors/ILateBlockingExecutor.cs similarity index 100% rename from src/NadekoBot/Common/ModuleBehaviors/ILateBlockingExecutor.cs rename to NadekoBot.Core/Common/ModuleBehaviors/ILateBlockingExecutor.cs diff --git a/src/NadekoBot/Common/ModuleBehaviors/ILateExecutor.cs b/NadekoBot.Core/Common/ModuleBehaviors/ILateExecutor.cs similarity index 100% rename from src/NadekoBot/Common/ModuleBehaviors/ILateExecutor.cs rename to NadekoBot.Core/Common/ModuleBehaviors/ILateExecutor.cs diff --git a/src/NadekoBot/Modules/NadekoModule.cs b/NadekoBot.Core/Common/NadekoModule.cs similarity index 98% rename from src/NadekoBot/Modules/NadekoModule.cs rename to NadekoBot.Core/Common/NadekoModule.cs index f6f06afd..5a563ba6 100644 --- a/src/NadekoBot/Modules/NadekoModule.cs +++ b/NadekoBot.Core/Common/NadekoModule.cs @@ -1,12 +1,12 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using NLog; using System.Globalization; using System.Threading.Tasks; using Discord.WebSocket; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Modules { diff --git a/src/NadekoBot/Modules/NadekoModuleExtensions.cs b/NadekoBot.Core/Common/NadekoModuleExtensions.cs similarity index 100% rename from src/NadekoBot/Modules/NadekoModuleExtensions.cs rename to NadekoBot.Core/Common/NadekoModuleExtensions.cs diff --git a/src/NadekoBot/Common/NadekoRandom.cs b/NadekoBot.Core/Common/NadekoRandom.cs similarity index 100% rename from src/NadekoBot/Common/NadekoRandom.cs rename to NadekoBot.Core/Common/NadekoRandom.cs diff --git a/src/NadekoBot/Common/NoPublicBotPrecondition.cs b/NadekoBot.Core/Common/NoPublicBotPrecondition.cs similarity index 100% rename from src/NadekoBot/Common/NoPublicBotPrecondition.cs rename to NadekoBot.Core/Common/NoPublicBotPrecondition.cs diff --git a/src/NadekoBot/Common/PlatformHelper.cs b/NadekoBot.Core/Common/PlatformHelper.cs similarity index 100% rename from src/NadekoBot/Common/PlatformHelper.cs rename to NadekoBot.Core/Common/PlatformHelper.cs diff --git a/src/NadekoBot/Common/Replacements/ReplacementBuilder.cs b/NadekoBot.Core/Common/Replacements/ReplacementBuilder.cs similarity index 98% rename from src/NadekoBot/Common/Replacements/ReplacementBuilder.cs rename to NadekoBot.Core/Common/Replacements/ReplacementBuilder.cs index 4df63980..ad6a2710 100644 --- a/src/NadekoBot/Common/Replacements/ReplacementBuilder.cs +++ b/NadekoBot.Core/Common/Replacements/ReplacementBuilder.cs @@ -6,8 +6,8 @@ using Discord; using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Modules.Administration.Services; using NadekoBot.Modules.Music.Services; +using NadekoBot.Modules.Administration.Services; namespace NadekoBot.Common.Replacements { @@ -97,7 +97,7 @@ namespace NadekoBot.Common.Replacements try { var mp = ms.MusicPlayers.FirstOrDefault(); - var title = mp.Value?.Current.Current?.Title; + var title = mp.Value?.Current.Current?.Title; return title ?? "No songs"; } catch diff --git a/src/NadekoBot/Common/Replacements/Replacer.cs b/NadekoBot.Core/Common/Replacements/Replacer.cs similarity index 100% rename from src/NadekoBot/Common/Replacements/Replacer.cs rename to NadekoBot.Core/Common/Replacements/Replacer.cs diff --git a/src/NadekoBot/Common/ShardCom/IShardComMessage.cs b/NadekoBot.Core/Common/ShardCom/ShardComMessage.cs similarity index 100% rename from src/NadekoBot/Common/ShardCom/IShardComMessage.cs rename to NadekoBot.Core/Common/ShardCom/ShardComMessage.cs diff --git a/NadekoBot.Core/Common/ShardCom/ShardComServer.cs b/NadekoBot.Core/Common/ShardCom/ShardComServer.cs new file mode 100644 index 00000000..cc612ec9 --- /dev/null +++ b/NadekoBot.Core/Common/ShardCom/ShardComServer.cs @@ -0,0 +1,31 @@ +using System; +using System.Net; +using System.Net.Sockets; +using System.Text; +using System.Threading.Tasks; +using Newtonsoft.Json; +using NadekoBot.Core.Services; + +namespace NadekoBot.Common.ShardCom +{ + public class ShardComServer + { + private readonly IDataCache _cache; + + public ShardComServer(IDataCache cache) + { + _cache = cache; + } + + public void Start() + { + var sub = _cache.Redis.GetSubscriber(); + sub.SubscribeAsync("shardcoord_send", (ch, data) => + { + var _ = OnDataReceived(JsonConvert.DeserializeObject(data)); + }, StackExchange.Redis.CommandFlags.FireAndForget); + } + + public event Func OnDataReceived = delegate { return Task.CompletedTask; }; + } +} diff --git a/src/NadekoBot/Services/Discord/SocketMessageEventWrapper.cs b/NadekoBot.Core/Common/SocketMessageEventWrapper.cs similarity index 98% rename from src/NadekoBot/Services/Discord/SocketMessageEventWrapper.cs rename to NadekoBot.Core/Common/SocketMessageEventWrapper.cs index 3c3aabf9..05e94025 100644 --- a/src/NadekoBot/Services/Discord/SocketMessageEventWrapper.cs +++ b/NadekoBot.Core/Common/SocketMessageEventWrapper.cs @@ -3,7 +3,7 @@ using Discord.WebSocket; using System; using System.Threading.Tasks; -namespace NadekoBot.Services.Discord +namespace NadekoBot.Common { public class ReactionEventWrapper : IDisposable { diff --git a/src/NadekoBot/Common/TypeReaders/AddRemove.cs b/NadekoBot.Core/Common/TypeReaders/AddRemove.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/AddRemove.cs rename to NadekoBot.Core/Common/TypeReaders/AddRemove.cs diff --git a/src/NadekoBot/Common/TypeReaders/BotCommandTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs similarity index 77% rename from src/NadekoBot/Common/TypeReaders/BotCommandTypeReader.cs rename to NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs index d80fbd52..32e4ee6b 100644 --- a/src/NadekoBot/Common/TypeReaders/BotCommandTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/BotCommandTypeReader.cs @@ -2,13 +2,19 @@ using System.Linq; using System.Threading.Tasks; using Discord.Commands; +using NadekoBot.Core.Services; using NadekoBot.Modules.CustomReactions.Services; -using NadekoBot.Services; +using NadekoBot.Core.Common.TypeReaders; +using Discord.WebSocket; namespace NadekoBot.Common.TypeReaders { - public class CommandTypeReader : TypeReader + public class CommandTypeReader : NadekoTypeReader { + public CommandTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) + { + } + public override Task Read(ICommandContext context, string input, IServiceProvider services) { var _cmds = ((INServiceProvider)services).GetService(); @@ -29,8 +35,16 @@ namespace NadekoBot.Common.TypeReaders } } - public class CommandOrCrTypeReader : CommandTypeReader + public class CommandOrCrTypeReader : NadekoTypeReader { + private readonly DiscordSocketClient _client; + private readonly CommandService _cmds; + public CommandOrCrTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) + { + _client = client; + _cmds = cmds; + } + public override async Task Read(ICommandContext context, string input, IServiceProvider services) { input = input.ToUpperInvariant(); @@ -53,7 +67,7 @@ namespace NadekoBot.Common.TypeReaders } } - var cmd = await base.Read(context, input, services); + var cmd = await new CommandTypeReader(_client, _cmds).Read(context, input, services); if (cmd.IsSuccess) { return TypeReaderResult.FromSuccess(new CommandOrCrInfo(((CommandInfo)cmd.Values.First().Value).Name)); diff --git a/src/NadekoBot/Common/TypeReaders/GuildDateTimeTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs similarity index 83% rename from src/NadekoBot/Common/TypeReaders/GuildDateTimeTypeReader.cs rename to NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs index b1fa1f00..3103cbf3 100644 --- a/src/NadekoBot/Common/TypeReaders/GuildDateTimeTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/GuildDateTimeTypeReader.cs @@ -2,11 +2,17 @@ using System.Threading.Tasks; using Discord.Commands; using NadekoBot.Modules.Administration.Services; +using NadekoBot.Core.Common.TypeReaders; +using Discord.WebSocket; namespace NadekoBot.Common.TypeReaders { - public class GuildDateTimeTypeReader : TypeReader + public class GuildDateTimeTypeReader : NadekoTypeReader { + public GuildDateTimeTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) + { + } + public override Task Read(ICommandContext context, string input, IServiceProvider services) { var _gts = (GuildTimezoneService)services.GetService(typeof(GuildTimezoneService)); diff --git a/src/NadekoBot/Common/TypeReaders/GuildTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/GuildTypeReader.cs similarity index 81% rename from src/NadekoBot/Common/TypeReaders/GuildTypeReader.cs rename to NadekoBot.Core/Common/TypeReaders/GuildTypeReader.cs index 132e1f0f..cad1a8e4 100644 --- a/src/NadekoBot/Common/TypeReaders/GuildTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/GuildTypeReader.cs @@ -3,17 +3,20 @@ using System.Linq; using System.Threading.Tasks; using Discord.Commands; using Discord.WebSocket; +using NadekoBot.Core.Common.TypeReaders; +using Discord; namespace NadekoBot.Common.TypeReaders { - public class GuildTypeReader : TypeReader + public class GuildTypeReader : NadekoTypeReader { private readonly DiscordSocketClient _client; - public GuildTypeReader(DiscordSocketClient client) + public GuildTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) { _client = client; } + public override Task Read(ICommandContext context, string input, IServiceProvider _) { input = input.Trim().ToLowerInvariant(); diff --git a/src/NadekoBot/Common/TypeReaders/Models/PermissionAction.cs b/NadekoBot.Core/Common/TypeReaders/Models/PermissionAction.cs similarity index 100% rename from src/NadekoBot/Common/TypeReaders/Models/PermissionAction.cs rename to NadekoBot.Core/Common/TypeReaders/Models/PermissionAction.cs diff --git a/src/NadekoBot/Common/TypeReaders/ModuleTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/ModuleTypeReader.cs similarity index 80% rename from src/NadekoBot/Common/TypeReaders/ModuleTypeReader.cs rename to NadekoBot.Core/Common/TypeReaders/ModuleTypeReader.cs index 1978732d..e7f49ec7 100644 --- a/src/NadekoBot/Common/TypeReaders/ModuleTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/ModuleTypeReader.cs @@ -3,14 +3,16 @@ using System.Linq; using System.Threading.Tasks; using Discord.Commands; using NadekoBot.Extensions; +using NadekoBot.Core.Common.TypeReaders; +using Discord.WebSocket; namespace NadekoBot.Common.TypeReaders { - public class ModuleTypeReader : TypeReader + public class ModuleTypeReader : NadekoTypeReader { private readonly CommandService _cmds; - public ModuleTypeReader(CommandService cmds) + public ModuleTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) { _cmds = cmds; } @@ -26,11 +28,11 @@ namespace NadekoBot.Common.TypeReaders } } - public class ModuleOrCrTypeReader : TypeReader + public class ModuleOrCrTypeReader : NadekoTypeReader { private readonly CommandService _cmds; - public ModuleOrCrTypeReader(CommandService cmds) + public ModuleOrCrTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) { _cmds = cmds; } diff --git a/NadekoBot.Core/Common/TypeReaders/NadekoTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/NadekoTypeReader.cs new file mode 100644 index 00000000..062b4537 --- /dev/null +++ b/NadekoBot.Core/Common/TypeReaders/NadekoTypeReader.cs @@ -0,0 +1,19 @@ +using Discord.Commands; +using Discord.WebSocket; + +namespace NadekoBot.Core.Common.TypeReaders +{ + public abstract class NadekoTypeReader : TypeReader where + T : class + { + private readonly DiscordSocketClient _client; + private readonly CommandService _cmds; + + private NadekoTypeReader() { } + public NadekoTypeReader(DiscordSocketClient client, CommandService cmds) + { + _client = client; + _cmds = cmds; + } + } +} diff --git a/src/NadekoBot/Common/TypeReaders/PermissionActionTypeReader.cs b/NadekoBot.Core/Common/TypeReaders/PermissionActionTypeReader.cs similarity index 83% rename from src/NadekoBot/Common/TypeReaders/PermissionActionTypeReader.cs rename to NadekoBot.Core/Common/TypeReaders/PermissionActionTypeReader.cs index 82e16e16..c9455b98 100644 --- a/src/NadekoBot/Common/TypeReaders/PermissionActionTypeReader.cs +++ b/NadekoBot.Core/Common/TypeReaders/PermissionActionTypeReader.cs @@ -1,15 +1,21 @@ using System; using System.Threading.Tasks; using Discord.Commands; +using Discord.WebSocket; using NadekoBot.Common.TypeReaders.Models; +using NadekoBot.Core.Common.TypeReaders; namespace NadekoBot.Common.TypeReaders { /// /// Used instead of bool for more flexible keywords for true/false only in the permission module /// - public class PermissionActionTypeReader : TypeReader + public class PermissionActionTypeReader : NadekoTypeReader { + public PermissionActionTypeReader(DiscordSocketClient client, CommandService cmds) : base(client, cmds) + { + } + public override Task Read(ICommandContext context, string input, IServiceProvider _) { input = input.ToUpperInvariant(); diff --git a/src/NadekoBot/Migrations/20161011200458_first.Designer.cs b/NadekoBot.Core/Migrations/20161011200458_first.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20161011200458_first.Designer.cs rename to NadekoBot.Core/Migrations/20161011200458_first.Designer.cs index 3f80251a..6abdaa2a 100644 --- a/src/NadekoBot/Migrations/20161011200458_first.Designer.cs +++ b/NadekoBot.Core/Migrations/20161011200458_first.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.0.0-rtm-21431"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -92,7 +92,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -114,7 +114,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -132,7 +132,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -148,7 +148,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -165,7 +165,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -185,7 +185,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -204,7 +204,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -220,7 +220,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -240,7 +240,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -256,7 +256,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -278,7 +278,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -294,7 +294,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -359,7 +359,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -375,7 +375,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -391,7 +391,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -467,7 +467,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -492,7 +492,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -508,7 +508,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -532,7 +532,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -555,7 +555,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -573,7 +573,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -595,7 +595,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -616,7 +616,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -633,124 +633,124 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/src/NadekoBot/Migrations/20161011200458_first.cs b/NadekoBot.Core/Migrations/20161011200458_first.cs similarity index 100% rename from src/NadekoBot/Migrations/20161011200458_first.cs rename to NadekoBot.Core/Migrations/20161011200458_first.cs diff --git a/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.Designer.cs b/NadekoBot.Core/Migrations/20161015005020_CurrencyTransaction.Designer.cs similarity index 76% rename from src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.Designer.cs rename to NadekoBot.Core/Migrations/20161015005020_CurrencyTransaction.Designer.cs index 52db3bf9..36187eec 100644 --- a/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.Designer.cs +++ b/NadekoBot.Core/Migrations/20161015005020_CurrencyTransaction.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.0.0-rtm-21431"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -92,7 +92,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -114,7 +114,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -132,7 +132,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -148,7 +148,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -165,7 +165,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -181,7 +181,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -201,7 +201,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -220,7 +220,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -236,7 +236,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -256,7 +256,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -272,7 +272,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -294,7 +294,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -310,7 +310,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -375,7 +375,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -391,7 +391,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -407,7 +407,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -449,7 +449,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -467,7 +467,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -483,7 +483,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -508,7 +508,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -524,7 +524,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -548,7 +548,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -571,7 +571,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -589,7 +589,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -611,7 +611,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -632,7 +632,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -649,124 +649,124 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.cs b/NadekoBot.Core/Migrations/20161015005020_CurrencyTransaction.cs similarity index 100% rename from src/NadekoBot/Migrations/20161015005020_CurrencyTransaction.cs rename to NadekoBot.Core/Migrations/20161015005020_CurrencyTransaction.cs diff --git a/src/NadekoBot/Migrations/20161015102407_coc.Designer.cs b/NadekoBot.Core/Migrations/20161015102407_coc.Designer.cs similarity index 76% rename from src/NadekoBot/Migrations/20161015102407_coc.Designer.cs rename to NadekoBot.Core/Migrations/20161015102407_coc.Designer.cs index fd104e1a..3b22fd98 100644 --- a/src/NadekoBot/Migrations/20161015102407_coc.Designer.cs +++ b/NadekoBot.Core/Migrations/20161015102407_coc.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.0.0-rtm-21431"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -377,7 +377,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -409,7 +409,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -469,7 +469,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -485,7 +485,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -510,7 +510,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -526,7 +526,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -550,7 +550,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -573,7 +573,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -591,7 +591,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -613,7 +613,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -634,7 +634,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -651,124 +651,124 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/src/NadekoBot/Migrations/20161015102407_coc.cs b/NadekoBot.Core/Migrations/20161015102407_coc.cs similarity index 100% rename from src/NadekoBot/Migrations/20161015102407_coc.cs rename to NadekoBot.Core/Migrations/20161015102407_coc.cs diff --git a/src/NadekoBot/Migrations/20161019055137_MuteRoleName.Designer.cs b/NadekoBot.Core/Migrations/20161019055137_MuteRoleName.Designer.cs similarity index 76% rename from src/NadekoBot/Migrations/20161019055137_MuteRoleName.Designer.cs rename to NadekoBot.Core/Migrations/20161019055137_MuteRoleName.Designer.cs index f86d532c..8f4db4e6 100644 --- a/src/NadekoBot/Migrations/20161019055137_MuteRoleName.Designer.cs +++ b/NadekoBot.Core/Migrations/20161019055137_MuteRoleName.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.0.0-rtm-21431"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -379,7 +379,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -395,7 +395,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -453,7 +453,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -471,7 +471,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -487,7 +487,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -512,7 +512,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -528,7 +528,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -552,7 +552,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -575,7 +575,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -593,7 +593,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -615,7 +615,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -636,7 +636,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -653,124 +653,124 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/src/NadekoBot/Migrations/20161019055137_MuteRoleName.cs b/NadekoBot.Core/Migrations/20161019055137_MuteRoleName.cs similarity index 100% rename from src/NadekoBot/Migrations/20161019055137_MuteRoleName.cs rename to NadekoBot.Core/Migrations/20161019055137_MuteRoleName.cs diff --git a/src/NadekoBot/Migrations/20161107213222_Cleverbot.Designer.cs b/NadekoBot.Core/Migrations/20161107213222_Cleverbot.Designer.cs similarity index 76% rename from src/NadekoBot/Migrations/20161107213222_Cleverbot.Designer.cs rename to NadekoBot.Core/Migrations/20161107213222_Cleverbot.Designer.cs index 50ac3309..6de7b38d 100644 --- a/src/NadekoBot/Migrations/20161107213222_Cleverbot.Designer.cs +++ b/NadekoBot.Core/Migrations/20161107213222_Cleverbot.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.0.0-rtm-21431"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -381,7 +381,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -397,7 +397,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -413,7 +413,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -455,7 +455,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -473,7 +473,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -489,7 +489,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -514,7 +514,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -530,7 +530,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -554,7 +554,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -577,7 +577,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -595,7 +595,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -617,7 +617,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -638,7 +638,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -655,124 +655,124 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/src/NadekoBot/Migrations/20161107213222_Cleverbot.cs b/NadekoBot.Core/Migrations/20161107213222_Cleverbot.cs similarity index 100% rename from src/NadekoBot/Migrations/20161107213222_Cleverbot.cs rename to NadekoBot.Core/Migrations/20161107213222_Cleverbot.cs diff --git a/src/NadekoBot/Migrations/20161122100602_Greet and bye improved.Designer.cs b/NadekoBot.Core/Migrations/20161122100602_Greet and bye improved.Designer.cs similarity index 76% rename from src/NadekoBot/Migrations/20161122100602_Greet and bye improved.Designer.cs rename to NadekoBot.Core/Migrations/20161122100602_Greet and bye improved.Designer.cs index 8a9f83eb..81a967e6 100644 --- a/src/NadekoBot/Migrations/20161122100602_Greet and bye improved.Designer.cs +++ b/NadekoBot.Core/Migrations/20161122100602_Greet and bye improved.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -415,7 +415,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -457,7 +457,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -491,7 +491,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -516,7 +516,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -532,7 +532,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -556,7 +556,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -579,7 +579,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -597,7 +597,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -619,7 +619,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -640,7 +640,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -657,124 +657,124 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/src/NadekoBot/Migrations/20161122100602_Greet and bye improved.cs b/NadekoBot.Core/Migrations/20161122100602_Greet and bye improved.cs similarity index 100% rename from src/NadekoBot/Migrations/20161122100602_Greet and bye improved.cs rename to NadekoBot.Core/Migrations/20161122100602_Greet and bye improved.cs diff --git a/src/NadekoBot/Migrations/20161127233843_PokeGame.Designer.cs b/NadekoBot.Core/Migrations/20161127233843_PokeGame.Designer.cs similarity index 76% rename from src/NadekoBot/Migrations/20161127233843_PokeGame.Designer.cs rename to NadekoBot.Core/Migrations/20161127233843_PokeGame.Designer.cs index b1856225..b8ecfa48 100644 --- a/src/NadekoBot/Migrations/20161127233843_PokeGame.Designer.cs +++ b/NadekoBot.Core/Migrations/20161127233843_PokeGame.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -415,7 +415,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -457,7 +457,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -491,7 +491,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -516,7 +516,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -532,7 +532,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -556,7 +556,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -579,7 +579,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -597,7 +597,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -619,7 +619,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -640,7 +640,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -657,7 +657,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -674,124 +674,124 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/src/NadekoBot/Migrations/20161127233843_PokeGame.cs b/NadekoBot.Core/Migrations/20161127233843_PokeGame.cs similarity index 100% rename from src/NadekoBot/Migrations/20161127233843_PokeGame.cs rename to NadekoBot.Core/Migrations/20161127233843_PokeGame.cs diff --git a/src/NadekoBot/Migrations/20161213025624_mutedusers.Designer.cs b/NadekoBot.Core/Migrations/20161213025624_mutedusers.Designer.cs similarity index 76% rename from src/NadekoBot/Migrations/20161213025624_mutedusers.Designer.cs rename to NadekoBot.Core/Migrations/20161213025624_mutedusers.Designer.cs index f142b4fc..69660b6d 100644 --- a/src/NadekoBot/Migrations/20161213025624_mutedusers.Designer.cs +++ b/NadekoBot.Core/Migrations/20161213025624_mutedusers.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -415,7 +415,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -457,7 +457,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -491,7 +491,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -507,7 +507,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -532,7 +532,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -548,7 +548,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -595,7 +595,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -613,7 +613,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -635,7 +635,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -656,7 +656,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -673,7 +673,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -690,131 +690,131 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/src/NadekoBot/Migrations/20161213025624_mutedusers.cs b/NadekoBot.Core/Migrations/20161213025624_mutedusers.cs similarity index 100% rename from src/NadekoBot/Migrations/20161213025624_mutedusers.cs rename to NadekoBot.Core/Migrations/20161213025624_mutedusers.cs diff --git a/src/NadekoBot/Migrations/20161224032833_logsettings.Designer.cs b/NadekoBot.Core/Migrations/20161224032833_logsettings.Designer.cs similarity index 76% rename from src/NadekoBot/Migrations/20161224032833_logsettings.Designer.cs rename to NadekoBot.Core/Migrations/20161224032833_logsettings.Designer.cs index 6f288421..fda45918 100644 --- a/src/NadekoBot/Migrations/20161224032833_logsettings.Designer.cs +++ b/NadekoBot.Core/Migrations/20161224032833_logsettings.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -415,7 +415,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -487,7 +487,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -505,7 +505,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -521,7 +521,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -537,7 +537,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -562,7 +562,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -578,7 +578,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -602,7 +602,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -625,7 +625,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -643,7 +643,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -665,7 +665,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Repeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -686,7 +686,7 @@ namespace NadekoBot.Migrations b.ToTable("Repeaters"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -703,7 +703,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -720,131 +720,131 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/src/NadekoBot/Migrations/20161224032833_logsettings.cs b/NadekoBot.Core/Migrations/20161224032833_logsettings.cs similarity index 100% rename from src/NadekoBot/Migrations/20161224032833_logsettings.cs rename to NadekoBot.Core/Migrations/20161224032833_logsettings.cs diff --git a/src/NadekoBot/Migrations/20170110111159_repeater-drop.Designer.cs b/NadekoBot.Core/Migrations/20170110111159_repeater-drop.Designer.cs similarity index 76% rename from src/NadekoBot/Migrations/20170110111159_repeater-drop.Designer.cs rename to NadekoBot.Core/Migrations/20170110111159_repeater-drop.Designer.cs index 2a3fb271..01b8eb37 100644 --- a/src/NadekoBot/Migrations/20170110111159_repeater-drop.Designer.cs +++ b/NadekoBot.Core/Migrations/20170110111159_repeater-drop.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -415,7 +415,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -487,7 +487,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -505,7 +505,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -521,7 +521,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -537,7 +537,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -562,7 +562,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -578,7 +578,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -602,7 +602,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -625,7 +625,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -643,7 +643,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -665,7 +665,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -682,7 +682,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -699,131 +699,131 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170110111159_repeater-drop.cs b/NadekoBot.Core/Migrations/20170110111159_repeater-drop.cs similarity index 100% rename from src/NadekoBot/Migrations/20170110111159_repeater-drop.cs rename to NadekoBot.Core/Migrations/20170110111159_repeater-drop.cs diff --git a/src/NadekoBot/Migrations/20170110111302_repeater-new.Designer.cs b/NadekoBot.Core/Migrations/20170110111302_repeater-new.Designer.cs similarity index 76% rename from src/NadekoBot/Migrations/20170110111302_repeater-new.Designer.cs rename to NadekoBot.Core/Migrations/20170110111302_repeater-new.Designer.cs index b8a72c04..359fe543 100644 --- a/src/NadekoBot/Migrations/20170110111302_repeater-new.Designer.cs +++ b/NadekoBot.Core/Migrations/20170110111302_repeater-new.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -34,7 +34,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -70,7 +70,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -94,7 +94,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -116,7 +116,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -134,7 +134,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -167,7 +167,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -203,7 +203,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -222,7 +222,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -238,7 +238,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -405,7 +405,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -421,7 +421,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -437,7 +437,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -509,7 +509,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -527,7 +527,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -543,7 +543,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -559,7 +559,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -584,7 +584,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -600,7 +600,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -624,7 +624,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -647,7 +647,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -665,7 +665,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -687,7 +687,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -704,7 +704,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -721,138 +721,138 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170110111302_repeater-new.cs b/NadekoBot.Core/Migrations/20170110111302_repeater-new.cs similarity index 100% rename from src/NadekoBot/Migrations/20170110111302_repeater-new.cs rename to NadekoBot.Core/Migrations/20170110111302_repeater-new.cs diff --git a/src/NadekoBot/Migrations/20170110180534_protection.Designer.cs b/NadekoBot.Core/Migrations/20170110180534_protection.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170110180534_protection.Designer.cs rename to NadekoBot.Core/Migrations/20170110180534_protection.Designer.cs index f85c57c4..081d4ee4 100644 --- a/src/NadekoBot/Migrations/20170110180534_protection.Designer.cs +++ b/NadekoBot.Core/Migrations/20170110180534_protection.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -37,7 +37,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -53,7 +53,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -72,7 +72,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -90,7 +90,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -126,7 +126,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -150,7 +150,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -172,7 +172,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -190,7 +190,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -223,7 +223,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -239,7 +239,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -259,7 +259,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -278,7 +278,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -294,7 +294,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -314,7 +314,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -330,7 +330,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -352,7 +352,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -368,7 +368,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -439,7 +439,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -461,7 +461,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -477,7 +477,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -565,7 +565,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -583,7 +583,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -599,7 +599,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -615,7 +615,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -640,7 +640,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -656,7 +656,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -680,7 +680,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -703,7 +703,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -721,7 +721,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -743,7 +743,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -760,7 +760,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -777,161 +777,161 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170110180534_protection.cs b/NadekoBot.Core/Migrations/20170110180534_protection.cs similarity index 100% rename from src/NadekoBot/Migrations/20170110180534_protection.cs rename to NadekoBot.Core/Migrations/20170110180534_protection.cs diff --git a/src/NadekoBot/Migrations/20170112185538_currency-modifications.Designer.cs b/NadekoBot.Core/Migrations/20170112185538_currency-modifications.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170112185538_currency-modifications.Designer.cs rename to NadekoBot.Core/Migrations/20170112185538_currency-modifications.Designer.cs index 6550cc1d..f3a3d38c 100644 --- a/src/NadekoBot/Migrations/20170112185538_currency-modifications.Designer.cs +++ b/NadekoBot.Core/Migrations/20170112185538_currency-modifications.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -37,7 +37,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -53,7 +53,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -72,7 +72,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -90,7 +90,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -140,7 +140,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -164,7 +164,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -186,7 +186,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -204,7 +204,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -225,7 +225,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -241,7 +241,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -258,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -274,7 +274,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -294,7 +294,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -313,7 +313,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -329,7 +329,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -349,7 +349,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -365,7 +365,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -387,7 +387,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -403,7 +403,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -474,7 +474,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -496,7 +496,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -512,7 +512,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -528,7 +528,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -600,7 +600,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -618,7 +618,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -634,7 +634,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -650,7 +650,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -675,7 +675,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -691,7 +691,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -715,7 +715,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -738,7 +738,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -756,7 +756,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -778,7 +778,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -795,7 +795,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -812,168 +812,168 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170112185538_currency-modifications.cs b/NadekoBot.Core/Migrations/20170112185538_currency-modifications.cs similarity index 100% rename from src/NadekoBot/Migrations/20170112185538_currency-modifications.cs rename to NadekoBot.Core/Migrations/20170112185538_currency-modifications.cs diff --git a/src/NadekoBot/Migrations/20170118202307_ok-error-colors.Designer.cs b/NadekoBot.Core/Migrations/20170118202307_ok-error-colors.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170118202307_ok-error-colors.Designer.cs rename to NadekoBot.Core/Migrations/20170118202307_ok-error-colors.Designer.cs index 8bfa7330..a08693c8 100644 --- a/src/NadekoBot/Migrations/20170118202307_ok-error-colors.Designer.cs +++ b/NadekoBot.Core/Migrations/20170118202307_ok-error-colors.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -37,7 +37,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -53,7 +53,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -72,7 +72,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -90,7 +90,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -144,7 +144,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -168,7 +168,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -190,7 +190,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -208,7 +208,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -229,7 +229,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -245,7 +245,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -262,7 +262,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -278,7 +278,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -298,7 +298,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -317,7 +317,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -333,7 +333,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -353,7 +353,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -369,7 +369,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -391,7 +391,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -407,7 +407,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -478,7 +478,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -500,7 +500,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -516,7 +516,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -532,7 +532,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -604,7 +604,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -622,7 +622,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -638,7 +638,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -654,7 +654,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -679,7 +679,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -695,7 +695,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -719,7 +719,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -742,7 +742,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -760,7 +760,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -782,7 +782,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -799,7 +799,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -816,168 +816,168 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170118202307_ok-error-colors.cs b/NadekoBot.Core/Migrations/20170118202307_ok-error-colors.cs similarity index 100% rename from src/NadekoBot/Migrations/20170118202307_ok-error-colors.cs rename to NadekoBot.Core/Migrations/20170118202307_ok-error-colors.cs diff --git a/src/NadekoBot/Migrations/20170122044958_waifus.Designer.cs b/NadekoBot.Core/Migrations/20170122044958_waifus.Designer.cs similarity index 74% rename from src/NadekoBot/Migrations/20170122044958_waifus.Designer.cs rename to NadekoBot.Core/Migrations/20170122044958_waifus.Designer.cs index 0db0f6a2..cc799a91 100644 --- a/src/NadekoBot/Migrations/20170122044958_waifus.Designer.cs +++ b/NadekoBot.Core/Migrations/20170122044958_waifus.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -37,7 +37,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -53,7 +53,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -72,7 +72,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -90,7 +90,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -144,7 +144,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -168,7 +168,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -190,7 +190,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -208,7 +208,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -229,7 +229,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -245,7 +245,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -262,7 +262,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -278,7 +278,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -298,7 +298,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -318,7 +318,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -337,7 +337,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -353,7 +353,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -373,7 +373,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -389,7 +389,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -427,7 +427,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -498,7 +498,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -520,7 +520,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -536,7 +536,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -552,7 +552,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -624,7 +624,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -642,7 +642,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -658,7 +658,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -674,7 +674,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -699,7 +699,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -715,7 +715,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -739,7 +739,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -762,7 +762,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -780,7 +780,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -802,7 +802,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -819,7 +819,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -836,7 +836,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -861,7 +861,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -885,199 +885,199 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/src/NadekoBot/Migrations/20170122044958_waifus.cs b/NadekoBot.Core/Migrations/20170122044958_waifus.cs similarity index 100% rename from src/NadekoBot/Migrations/20170122044958_waifus.cs rename to NadekoBot.Core/Migrations/20170122044958_waifus.cs diff --git a/src/NadekoBot/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs b/NadekoBot.Core/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs similarity index 74% rename from src/NadekoBot/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs rename to NadekoBot.Core/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs index e5515381..ccb91e07 100644 --- a/src/NadekoBot/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs +++ b/NadekoBot.Core/Migrations/20170213164350_guild-timezone-and-locale.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -37,7 +37,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -53,7 +53,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -72,7 +72,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -90,7 +90,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -146,7 +146,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -170,7 +170,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -192,7 +192,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -210,7 +210,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -231,7 +231,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -247,7 +247,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -264,7 +264,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -280,7 +280,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -300,7 +300,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -320,7 +320,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -339,7 +339,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -355,7 +355,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -375,7 +375,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -391,7 +391,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -413,7 +413,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -429,7 +429,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -504,7 +504,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -526,7 +526,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -542,7 +542,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -558,7 +558,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -630,7 +630,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -648,7 +648,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -664,7 +664,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -680,7 +680,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -705,7 +705,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -721,7 +721,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -745,7 +745,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -768,7 +768,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -786,7 +786,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -808,7 +808,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -825,7 +825,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -842,7 +842,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -867,7 +867,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -891,199 +891,199 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/src/NadekoBot/Migrations/20170213164350_guild-timezone-and-locale.cs b/NadekoBot.Core/Migrations/20170213164350_guild-timezone-and-locale.cs similarity index 100% rename from src/NadekoBot/Migrations/20170213164350_guild-timezone-and-locale.cs rename to NadekoBot.Core/Migrations/20170213164350_guild-timezone-and-locale.cs diff --git a/src/NadekoBot/Migrations/20170222162505_dateadded.Designer.cs b/NadekoBot.Core/Migrations/20170222162505_dateadded.Designer.cs similarity index 76% rename from src/NadekoBot/Migrations/20170222162505_dateadded.Designer.cs rename to NadekoBot.Core/Migrations/20170222162505_dateadded.Designer.cs index 9ab4340d..954f1709 100644 --- a/src/NadekoBot/Migrations/20170222162505_dateadded.Designer.cs +++ b/NadekoBot.Core/Migrations/20170222162505_dateadded.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -249,7 +249,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -267,7 +267,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -286,7 +286,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -326,7 +326,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -348,7 +348,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -369,7 +369,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -387,7 +387,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -409,7 +409,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -427,7 +427,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -469,7 +469,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -546,7 +546,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -570,7 +570,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -588,7 +588,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -606,7 +606,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -680,7 +680,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -700,7 +700,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -718,7 +718,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -736,7 +736,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -763,7 +763,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -781,7 +781,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -807,7 +807,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -832,7 +832,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -852,7 +852,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -876,7 +876,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -895,7 +895,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -914,7 +914,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -941,7 +941,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -967,199 +967,199 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/src/NadekoBot/Migrations/20170222162505_dateadded.cs b/NadekoBot.Core/Migrations/20170222162505_dateadded.cs similarity index 100% rename from src/NadekoBot/Migrations/20170222162505_dateadded.cs rename to NadekoBot.Core/Migrations/20170222162505_dateadded.cs diff --git a/src/NadekoBot/Migrations/20170308033058_permsv2.Designer.cs b/NadekoBot.Core/Migrations/20170308033058_permsv2.Designer.cs similarity index 76% rename from src/NadekoBot/Migrations/20170308033058_permsv2.Designer.cs rename to NadekoBot.Core/Migrations/20170308033058_permsv2.Designer.cs index e0717137..9c4fd39e 100644 --- a/src/NadekoBot/Migrations/20170308033058_permsv2.Designer.cs +++ b/NadekoBot.Core/Migrations/20170308033058_permsv2.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -249,7 +249,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -267,7 +267,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -286,7 +286,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -326,7 +326,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -348,7 +348,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -369,7 +369,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -387,7 +387,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -409,7 +409,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -427,7 +427,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -469,7 +469,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -546,7 +546,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -570,7 +570,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -588,7 +588,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -606,7 +606,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -680,7 +680,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -700,7 +700,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -718,7 +718,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -736,7 +736,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -763,7 +763,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -791,7 +791,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -809,7 +809,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -860,7 +860,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -880,7 +880,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -904,7 +904,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -923,7 +923,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -942,7 +942,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -969,7 +969,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -995,206 +995,206 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/src/NadekoBot/Migrations/20170308033058_permsv2.cs b/NadekoBot.Core/Migrations/20170308033058_permsv2.cs similarity index 100% rename from src/NadekoBot/Migrations/20170308033058_permsv2.cs rename to NadekoBot.Core/Migrations/20170308033058_permsv2.cs diff --git a/src/NadekoBot/Migrations/20170310210952_unmute-timers.Designer.cs b/NadekoBot.Core/Migrations/20170310210952_unmute-timers.Designer.cs similarity index 76% rename from src/NadekoBot/Migrations/20170310210952_unmute-timers.Designer.cs rename to NadekoBot.Core/Migrations/20170310210952_unmute-timers.Designer.cs index 34517ca8..dbee3fc0 100644 --- a/src/NadekoBot/Migrations/20170310210952_unmute-timers.Designer.cs +++ b/NadekoBot.Core/Migrations/20170310210952_unmute-timers.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -249,7 +249,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -267,7 +267,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -286,7 +286,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -326,7 +326,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -348,7 +348,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -369,7 +369,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -387,7 +387,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -409,7 +409,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -427,7 +427,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -469,7 +469,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -546,7 +546,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -570,7 +570,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -588,7 +588,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -606,7 +606,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -680,7 +680,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -700,7 +700,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -718,7 +718,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -736,7 +736,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -763,7 +763,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -791,7 +791,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -809,7 +809,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -860,7 +860,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -880,7 +880,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -904,7 +904,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -923,7 +923,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -943,7 +943,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -962,7 +962,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -989,7 +989,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1015,213 +1015,213 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/src/NadekoBot/Migrations/20170310210952_unmute-timers.cs b/NadekoBot.Core/Migrations/20170310210952_unmute-timers.cs similarity index 100% rename from src/NadekoBot/Migrations/20170310210952_unmute-timers.cs rename to NadekoBot.Core/Migrations/20170310210952_unmute-timers.cs diff --git a/src/NadekoBot/Migrations/20170311054632_vcrole.Designer.cs b/NadekoBot.Core/Migrations/20170311054632_vcrole.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170311054632_vcrole.Designer.cs rename to NadekoBot.Core/Migrations/20170311054632_vcrole.Designer.cs index 99dcee74..efdcec54 100644 --- a/src/NadekoBot/Migrations/20170311054632_vcrole.Designer.cs +++ b/NadekoBot.Core/Migrations/20170311054632_vcrole.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -249,7 +249,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -267,7 +267,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -286,7 +286,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -326,7 +326,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -348,7 +348,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -369,7 +369,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -387,7 +387,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -409,7 +409,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -427,7 +427,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -469,7 +469,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -546,7 +546,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -570,7 +570,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -588,7 +588,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -606,7 +606,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -680,7 +680,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -700,7 +700,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -718,7 +718,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -736,7 +736,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -763,7 +763,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -791,7 +791,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -809,7 +809,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -860,7 +860,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -880,7 +880,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -904,7 +904,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -923,7 +923,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -943,7 +943,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -962,7 +962,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -982,7 +982,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1009,7 +1009,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1035,220 +1035,220 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/src/NadekoBot/Migrations/20170311054632_vcrole.cs b/NadekoBot.Core/Migrations/20170311054632_vcrole.cs similarity index 100% rename from src/NadekoBot/Migrations/20170311054632_vcrole.cs rename to NadekoBot.Core/Migrations/20170311054632_vcrole.cs diff --git a/src/NadekoBot/Migrations/20170318190018_crad-and-crdm.Designer.cs b/NadekoBot.Core/Migrations/20170318190018_crad-and-crdm.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170318190018_crad-and-crdm.Designer.cs rename to NadekoBot.Core/Migrations/20170318190018_crad-and-crdm.Designer.cs index 3b25cdab..73bf155a 100644 --- a/src/NadekoBot/Migrations/20170318190018_crad-and-crdm.Designer.cs +++ b/NadekoBot.Core/Migrations/20170318190018_crad-and-crdm.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -249,7 +249,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -267,7 +267,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -286,7 +286,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -330,7 +330,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -352,7 +352,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -373,7 +373,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -391,7 +391,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -413,7 +413,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -431,7 +431,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -455,7 +455,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -473,7 +473,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -550,7 +550,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -574,7 +574,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -592,7 +592,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -610,7 +610,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -684,7 +684,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -704,7 +704,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -722,7 +722,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -740,7 +740,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -767,7 +767,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -795,7 +795,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -813,7 +813,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -839,7 +839,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -864,7 +864,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -884,7 +884,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -908,7 +908,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -927,7 +927,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -947,7 +947,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -966,7 +966,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -986,7 +986,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1013,7 +1013,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1039,220 +1039,220 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/src/NadekoBot/Migrations/20170318190018_crad-and-crdm.cs b/NadekoBot.Core/Migrations/20170318190018_crad-and-crdm.cs similarity index 100% rename from src/NadekoBot/Migrations/20170318190018_crad-and-crdm.cs rename to NadekoBot.Core/Migrations/20170318190018_crad-and-crdm.cs diff --git a/src/NadekoBot/Migrations/20170320090138_command-aliasing.Designer.cs b/NadekoBot.Core/Migrations/20170320090138_command-aliasing.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170320090138_command-aliasing.Designer.cs rename to NadekoBot.Core/Migrations/20170320090138_command-aliasing.Designer.cs index 7fe32ff1..0031a051 100644 --- a/src/NadekoBot/Migrations/20170320090138_command-aliasing.Designer.cs +++ b/NadekoBot.Core/Migrations/20170320090138_command-aliasing.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -246,7 +246,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -269,7 +269,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -287,7 +287,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -306,7 +306,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -350,7 +350,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -570,7 +570,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -594,7 +594,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -612,7 +612,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -630,7 +630,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -704,7 +704,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -724,7 +724,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -742,7 +742,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -760,7 +760,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -787,7 +787,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -815,7 +815,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -833,7 +833,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -859,7 +859,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -884,7 +884,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -904,7 +904,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -928,7 +928,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -947,7 +947,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -967,7 +967,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -986,7 +986,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1006,7 +1006,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1033,7 +1033,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1059,227 +1059,227 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); diff --git a/src/NadekoBot/Migrations/20170320090138_command-aliasing.cs b/NadekoBot.Core/Migrations/20170320090138_command-aliasing.cs similarity index 100% rename from src/NadekoBot/Migrations/20170320090138_command-aliasing.cs rename to NadekoBot.Core/Migrations/20170320090138_command-aliasing.cs diff --git a/src/NadekoBot/Migrations/20170330000613_warning-commands.Designer.cs b/NadekoBot.Core/Migrations/20170330000613_warning-commands.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170330000613_warning-commands.Designer.cs rename to NadekoBot.Core/Migrations/20170330000613_warning-commands.Designer.cs index 5cb6a428..57f29a43 100644 --- a/src/NadekoBot/Migrations/20170330000613_warning-commands.Designer.cs +++ b/NadekoBot.Core/Migrations/20170330000613_warning-commands.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -246,7 +246,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -269,7 +269,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -287,7 +287,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -306,7 +306,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -350,7 +350,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -596,7 +596,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -614,7 +614,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -632,7 +632,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -706,7 +706,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -726,7 +726,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -744,7 +744,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -762,7 +762,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -789,7 +789,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -817,7 +817,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -861,7 +861,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -886,7 +886,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -906,7 +906,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -949,7 +949,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -969,7 +969,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -988,7 +988,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1008,7 +1008,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1035,7 +1035,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1061,7 +1061,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1085,7 +1085,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1107,235 +1107,235 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170330000613_warning-commands.cs b/NadekoBot.Core/Migrations/20170330000613_warning-commands.cs similarity index 100% rename from src/NadekoBot/Migrations/20170330000613_warning-commands.cs rename to NadekoBot.Core/Migrations/20170330000613_warning-commands.cs diff --git a/src/NadekoBot/Migrations/20170331093025_startup-commands.Designer.cs b/NadekoBot.Core/Migrations/20170331093025_startup-commands.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170331093025_startup-commands.Designer.cs rename to NadekoBot.Core/Migrations/20170331093025_startup-commands.Designer.cs index 1ba8cc51..8a7566bf 100644 --- a/src/NadekoBot/Migrations/20170331093025_startup-commands.Designer.cs +++ b/NadekoBot.Core/Migrations/20170331093025_startup-commands.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -246,7 +246,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -269,7 +269,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -287,7 +287,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -306,7 +306,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -350,7 +350,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -596,7 +596,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -614,7 +614,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -632,7 +632,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -706,7 +706,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -726,7 +726,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -744,7 +744,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -762,7 +762,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -789,7 +789,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -817,7 +817,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -861,7 +861,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -886,7 +886,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -906,7 +906,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -949,7 +949,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -981,7 +981,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1001,7 +1001,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1020,7 +1020,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1040,7 +1040,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1067,7 +1067,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1093,7 +1093,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1117,7 +1117,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1139,242 +1139,242 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170331093025_startup-commands.cs b/NadekoBot.Core/Migrations/20170331093025_startup-commands.cs similarity index 100% rename from src/NadekoBot/Migrations/20170331093025_startup-commands.cs rename to NadekoBot.Core/Migrations/20170331093025_startup-commands.cs diff --git a/src/NadekoBot/Migrations/20170401161600_slowmode-whitelist.Designer.cs b/NadekoBot.Core/Migrations/20170401161600_slowmode-whitelist.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170401161600_slowmode-whitelist.Designer.cs rename to NadekoBot.Core/Migrations/20170401161600_slowmode-whitelist.Designer.cs index a6cdb622..5416fe51 100644 --- a/src/NadekoBot/Migrations/20170401161600_slowmode-whitelist.Designer.cs +++ b/NadekoBot.Core/Migrations/20170401161600_slowmode-whitelist.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -246,7 +246,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -269,7 +269,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -287,7 +287,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -306,7 +306,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -350,7 +350,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -596,7 +596,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -614,7 +614,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -632,7 +632,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -706,7 +706,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -726,7 +726,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -744,7 +744,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -762,7 +762,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -789,7 +789,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -817,7 +817,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -861,7 +861,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -886,7 +886,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -906,7 +906,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -949,7 +949,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -967,7 +967,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -985,7 +985,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1017,7 +1017,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1037,7 +1037,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1056,7 +1056,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1076,7 +1076,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1103,7 +1103,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1129,7 +1129,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1153,7 +1153,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1175,256 +1175,256 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170401161600_slowmode-whitelist.cs b/NadekoBot.Core/Migrations/20170401161600_slowmode-whitelist.cs similarity index 100% rename from src/NadekoBot/Migrations/20170401161600_slowmode-whitelist.cs rename to NadekoBot.Core/Migrations/20170401161600_slowmode-whitelist.cs diff --git a/src/NadekoBot/Migrations/20170401205753_patreon-rewards.Designer.cs b/NadekoBot.Core/Migrations/20170401205753_patreon-rewards.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170401205753_patreon-rewards.Designer.cs rename to NadekoBot.Core/Migrations/20170401205753_patreon-rewards.Designer.cs index 2c60d6c8..8c314a7e 100644 --- a/src/NadekoBot/Migrations/20170401205753_patreon-rewards.Designer.cs +++ b/NadekoBot.Core/Migrations/20170401205753_patreon-rewards.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -246,7 +246,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -269,7 +269,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -287,7 +287,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -306,7 +306,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -350,7 +350,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -596,7 +596,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -614,7 +614,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -632,7 +632,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -706,7 +706,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -726,7 +726,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -744,7 +744,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -762,7 +762,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -789,7 +789,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -817,7 +817,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -861,7 +861,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -886,7 +886,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -906,7 +906,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -951,7 +951,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -970,7 +970,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -988,7 +988,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1006,7 +1006,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1038,7 +1038,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1058,7 +1058,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1077,7 +1077,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1097,7 +1097,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1124,7 +1124,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1150,7 +1150,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1174,7 +1174,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1196,256 +1196,256 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170401205753_patreon-rewards.cs b/NadekoBot.Core/Migrations/20170401205753_patreon-rewards.cs similarity index 100% rename from src/NadekoBot/Migrations/20170401205753_patreon-rewards.cs rename to NadekoBot.Core/Migrations/20170401205753_patreon-rewards.cs diff --git a/src/NadekoBot/Migrations/20170405161814_flower-shop.Designer.cs b/NadekoBot.Core/Migrations/20170405161814_flower-shop.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170405161814_flower-shop.Designer.cs rename to NadekoBot.Core/Migrations/20170405161814_flower-shop.Designer.cs index a9836330..8c977e61 100644 --- a/src/NadekoBot/Migrations/20170405161814_flower-shop.Designer.cs +++ b/NadekoBot.Core/Migrations/20170405161814_flower-shop.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -246,7 +246,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -269,7 +269,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -287,7 +287,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -306,7 +306,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -350,7 +350,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -596,7 +596,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -614,7 +614,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -632,7 +632,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -706,7 +706,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -726,7 +726,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -744,7 +744,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -762,7 +762,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -789,7 +789,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -817,7 +817,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -835,7 +835,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -861,7 +861,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -886,7 +886,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -906,7 +906,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -951,7 +951,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -970,7 +970,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1000,7 +1000,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1018,7 +1018,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1036,7 +1036,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1054,7 +1054,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1086,7 +1086,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1106,7 +1106,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1125,7 +1125,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1145,7 +1145,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1172,7 +1172,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1198,7 +1198,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1222,7 +1222,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1244,270 +1244,270 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170405161814_flower-shop.cs b/NadekoBot.Core/Migrations/20170405161814_flower-shop.cs similarity index 100% rename from src/NadekoBot/Migrations/20170405161814_flower-shop.cs rename to NadekoBot.Core/Migrations/20170405161814_flower-shop.cs diff --git a/src/NadekoBot/Migrations/20170408162851_game-voice-channel.Designer.cs b/NadekoBot.Core/Migrations/20170408162851_game-voice-channel.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170408162851_game-voice-channel.Designer.cs rename to NadekoBot.Core/Migrations/20170408162851_game-voice-channel.Designer.cs index ff8d5d8d..cbce7eaa 100644 --- a/src/NadekoBot/Migrations/20170408162851_game-voice-channel.Designer.cs +++ b/NadekoBot.Core/Migrations/20170408162851_game-voice-channel.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -156,7 +156,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -182,7 +182,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -206,7 +206,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -226,7 +226,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -246,7 +246,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -269,7 +269,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -287,7 +287,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -306,7 +306,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -350,7 +350,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -393,7 +393,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -411,7 +411,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -451,7 +451,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -475,7 +475,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -493,7 +493,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -574,7 +574,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -598,7 +598,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -616,7 +616,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -634,7 +634,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -708,7 +708,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -728,7 +728,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -746,7 +746,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -764,7 +764,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -791,7 +791,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -819,7 +819,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -837,7 +837,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -863,7 +863,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -888,7 +888,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -908,7 +908,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -932,7 +932,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -953,7 +953,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -972,7 +972,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1002,7 +1002,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1020,7 +1020,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1038,7 +1038,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1056,7 +1056,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1088,7 +1088,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1108,7 +1108,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1127,7 +1127,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1147,7 +1147,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1174,7 +1174,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1200,7 +1200,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1224,7 +1224,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1246,270 +1246,270 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170408162851_game-voice-channel.cs b/NadekoBot.Core/Migrations/20170408162851_game-voice-channel.cs similarity index 100% rename from src/NadekoBot/Migrations/20170408162851_game-voice-channel.cs rename to NadekoBot.Core/Migrations/20170408162851_game-voice-channel.cs diff --git a/src/NadekoBot/Migrations/20170409193757_gmod-and-cmod.Designer.cs b/NadekoBot.Core/Migrations/20170409193757_gmod-and-cmod.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170409193757_gmod-and-cmod.Designer.cs rename to NadekoBot.Core/Migrations/20170409193757_gmod-and-cmod.Designer.cs index 98eb17ff..4da980d9 100644 --- a/src/NadekoBot/Migrations/20170409193757_gmod-and-cmod.Designer.cs +++ b/NadekoBot.Core/Migrations/20170409193757_gmod-and-cmod.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -120,7 +120,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -178,7 +178,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -204,7 +204,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -228,7 +228,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -248,7 +248,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -268,7 +268,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -291,7 +291,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -309,7 +309,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -328,7 +328,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -346,7 +346,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -394,7 +394,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -415,7 +415,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -455,7 +455,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -473,7 +473,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -497,7 +497,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -515,7 +515,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -596,7 +596,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -620,7 +620,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -638,7 +638,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -656,7 +656,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -730,7 +730,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -750,7 +750,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -768,7 +768,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -786,7 +786,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -813,7 +813,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -841,7 +841,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -859,7 +859,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -885,7 +885,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -910,7 +910,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -954,7 +954,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -975,7 +975,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -994,7 +994,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1024,7 +1024,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1042,7 +1042,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1060,7 +1060,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1078,7 +1078,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1110,7 +1110,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1130,7 +1130,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1149,7 +1149,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1169,7 +1169,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1196,7 +1196,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1222,7 +1222,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1246,7 +1246,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1268,281 +1268,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170409193757_gmod-and-cmod.cs b/NadekoBot.Core/Migrations/20170409193757_gmod-and-cmod.cs similarity index 100% rename from src/NadekoBot/Migrations/20170409193757_gmod-and-cmod.cs rename to NadekoBot.Core/Migrations/20170409193757_gmod-and-cmod.cs diff --git a/src/NadekoBot/Migrations/20170501103455_patreon-id.Designer.cs b/NadekoBot.Core/Migrations/20170501103455_patreon-id.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170501103455_patreon-id.Designer.cs rename to NadekoBot.Core/Migrations/20170501103455_patreon-id.Designer.cs index 3ca47b2c..c3b82dc2 100644 --- a/src/NadekoBot/Migrations/20170501103455_patreon-id.Designer.cs +++ b/NadekoBot.Core/Migrations/20170501103455_patreon-id.Designer.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; namespace NadekoBot.Migrations { @@ -16,7 +16,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -39,7 +39,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +57,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -78,7 +78,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -98,7 +98,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -120,7 +120,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -178,7 +178,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -204,7 +204,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -228,7 +228,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -248,7 +248,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -268,7 +268,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -291,7 +291,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -309,7 +309,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -328,7 +328,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -346,7 +346,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -372,7 +372,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -394,7 +394,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -415,7 +415,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -433,7 +433,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -455,7 +455,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -473,7 +473,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -497,7 +497,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -515,7 +515,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -596,7 +596,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -620,7 +620,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -638,7 +638,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -656,7 +656,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -730,7 +730,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -750,7 +750,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -768,7 +768,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -786,7 +786,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -813,7 +813,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -841,7 +841,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -859,7 +859,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -885,7 +885,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -910,7 +910,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +930,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -954,7 +954,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -977,7 +977,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -996,7 +996,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1026,7 +1026,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1044,7 +1044,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1062,7 +1062,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1080,7 +1080,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1112,7 +1112,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1132,7 +1132,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1151,7 +1151,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1171,7 +1171,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1198,7 +1198,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1224,7 +1224,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1248,7 +1248,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1270,281 +1270,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170501103455_patreon-id.cs b/NadekoBot.Core/Migrations/20170501103455_patreon-id.cs similarity index 100% rename from src/NadekoBot/Migrations/20170501103455_patreon-id.cs rename to NadekoBot.Core/Migrations/20170501103455_patreon-id.cs diff --git a/src/NadekoBot/Migrations/20170528001839_permissions-version.Designer.cs b/NadekoBot.Core/Migrations/20170528001839_permissions-version.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170528001839_permissions-version.Designer.cs rename to NadekoBot.Core/Migrations/20170528001839_permissions-version.Designer.cs index b46dd601..31a1d795 100644 --- a/src/NadekoBot/Migrations/20170528001839_permissions-version.Designer.cs +++ b/NadekoBot.Core/Migrations/20170528001839_permissions-version.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -181,7 +181,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -207,7 +207,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -231,7 +231,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -251,7 +251,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -271,7 +271,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -294,7 +294,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -312,7 +312,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -331,7 +331,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -349,7 +349,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -375,7 +375,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -397,7 +397,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -418,7 +418,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -436,7 +436,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -458,7 +458,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -476,7 +476,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -500,7 +500,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -518,7 +518,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -599,7 +599,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -623,7 +623,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -641,7 +641,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -659,7 +659,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -733,7 +733,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -753,7 +753,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -771,7 +771,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -789,7 +789,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -816,7 +816,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -844,7 +844,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -862,7 +862,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -888,7 +888,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -913,7 +913,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -933,7 +933,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -957,7 +957,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -980,7 +980,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -999,7 +999,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1029,7 +1029,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1047,7 +1047,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1065,7 +1065,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1083,7 +1083,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1115,7 +1115,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1135,7 +1135,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1154,7 +1154,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1174,7 +1174,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1201,7 +1201,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1227,7 +1227,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1251,7 +1251,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1273,281 +1273,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170528001839_permissions-version.cs b/NadekoBot.Core/Migrations/20170528001839_permissions-version.cs similarity index 100% rename from src/NadekoBot/Migrations/20170528001839_permissions-version.cs rename to NadekoBot.Core/Migrations/20170528001839_permissions-version.cs diff --git a/src/NadekoBot/Migrations/20170530033406_guild-prefixes.Designer.cs b/NadekoBot.Core/Migrations/20170530033406_guild-prefixes.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170530033406_guild-prefixes.Designer.cs rename to NadekoBot.Core/Migrations/20170530033406_guild-prefixes.Designer.cs index 4a11493b..7925b10b 100644 --- a/src/NadekoBot/Migrations/20170530033406_guild-prefixes.Designer.cs +++ b/NadekoBot.Core/Migrations/20170530033406_guild-prefixes.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -209,7 +209,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -233,7 +233,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -253,7 +253,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -273,7 +273,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -314,7 +314,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -333,7 +333,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -351,7 +351,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -377,7 +377,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -420,7 +420,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -438,7 +438,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -460,7 +460,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -478,7 +478,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -502,7 +502,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -520,7 +520,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -603,7 +603,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -627,7 +627,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -645,7 +645,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -663,7 +663,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -737,7 +737,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -757,7 +757,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -775,7 +775,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -793,7 +793,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -820,7 +820,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -848,7 +848,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -866,7 +866,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -892,7 +892,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -917,7 +917,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -937,7 +937,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -961,7 +961,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -984,7 +984,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1003,7 +1003,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1033,7 +1033,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1051,7 +1051,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1069,7 +1069,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1087,7 +1087,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1119,7 +1119,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1139,7 +1139,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1158,7 +1158,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1178,7 +1178,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1205,7 +1205,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1231,7 +1231,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1255,7 +1255,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1277,281 +1277,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170530033406_guild-prefixes.cs b/NadekoBot.Core/Migrations/20170530033406_guild-prefixes.cs similarity index 100% rename from src/NadekoBot/Migrations/20170530033406_guild-prefixes.cs rename to NadekoBot.Core/Migrations/20170530033406_guild-prefixes.cs diff --git a/src/NadekoBot/Migrations/20170612094138_verbose-errors.Designer.cs b/NadekoBot.Core/Migrations/20170612094138_verbose-errors.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170612094138_verbose-errors.Designer.cs rename to NadekoBot.Core/Migrations/20170612094138_verbose-errors.Designer.cs index c4ebb7cc..90c9c0a5 100644 --- a/src/NadekoBot/Migrations/20170612094138_verbose-errors.Designer.cs +++ b/NadekoBot.Core/Migrations/20170612094138_verbose-errors.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -209,7 +209,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -233,7 +233,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -253,7 +253,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -273,7 +273,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -314,7 +314,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -333,7 +333,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -351,7 +351,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -377,7 +377,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -420,7 +420,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -438,7 +438,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -460,7 +460,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -478,7 +478,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -502,7 +502,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -520,7 +520,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -605,7 +605,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -629,7 +629,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -647,7 +647,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -665,7 +665,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -739,7 +739,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -759,7 +759,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -777,7 +777,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -795,7 +795,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -822,7 +822,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -850,7 +850,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -868,7 +868,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -894,7 +894,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -919,7 +919,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -939,7 +939,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -963,7 +963,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -986,7 +986,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1005,7 +1005,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1035,7 +1035,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1053,7 +1053,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1071,7 +1071,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1089,7 +1089,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1121,7 +1121,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1141,7 +1141,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1160,7 +1160,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1180,7 +1180,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1207,7 +1207,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1233,7 +1233,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1257,7 +1257,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1279,281 +1279,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170612094138_verbose-errors.cs b/NadekoBot.Core/Migrations/20170612094138_verbose-errors.cs similarity index 100% rename from src/NadekoBot/Migrations/20170612094138_verbose-errors.cs rename to NadekoBot.Core/Migrations/20170612094138_verbose-errors.cs diff --git a/src/NadekoBot/Migrations/20170612234751_repeat time of day.Designer.cs b/NadekoBot.Core/Migrations/20170612234751_repeat time of day.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170612234751_repeat time of day.Designer.cs rename to NadekoBot.Core/Migrations/20170612234751_repeat time of day.Designer.cs index c97b4d1c..85b4f59b 100644 --- a/src/NadekoBot/Migrations/20170612234751_repeat time of day.Designer.cs +++ b/NadekoBot.Core/Migrations/20170612234751_repeat time of day.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -183,7 +183,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -209,7 +209,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -233,7 +233,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -253,7 +253,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -273,7 +273,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -296,7 +296,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -314,7 +314,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -333,7 +333,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -351,7 +351,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -377,7 +377,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -399,7 +399,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -420,7 +420,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -438,7 +438,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -460,7 +460,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -478,7 +478,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -502,7 +502,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -520,7 +520,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -605,7 +605,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -631,7 +631,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -649,7 +649,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -667,7 +667,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -741,7 +741,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -761,7 +761,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -779,7 +779,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -797,7 +797,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -824,7 +824,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -852,7 +852,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -870,7 +870,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -896,7 +896,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -921,7 +921,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -941,7 +941,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -965,7 +965,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -988,7 +988,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1007,7 +1007,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1037,7 +1037,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1055,7 +1055,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1073,7 +1073,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1091,7 +1091,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1123,7 +1123,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1143,7 +1143,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1162,7 +1162,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1182,7 +1182,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1209,7 +1209,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1235,7 +1235,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1259,7 +1259,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1281,281 +1281,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170612234751_repeat time of day.cs b/NadekoBot.Core/Migrations/20170612234751_repeat time of day.cs similarity index 100% rename from src/NadekoBot/Migrations/20170612234751_repeat time of day.cs rename to NadekoBot.Core/Migrations/20170612234751_repeat time of day.cs diff --git a/src/NadekoBot/Migrations/20170613231358_maxdropamount.Designer.cs b/NadekoBot.Core/Migrations/20170613231358_maxdropamount.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170613231358_maxdropamount.Designer.cs rename to NadekoBot.Core/Migrations/20170613231358_maxdropamount.Designer.cs index c007c907..ccedbe5a 100644 --- a/src/NadekoBot/Migrations/20170613231358_maxdropamount.Designer.cs +++ b/NadekoBot.Core/Migrations/20170613231358_maxdropamount.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -185,7 +185,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -211,7 +211,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -235,7 +235,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -255,7 +255,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -275,7 +275,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -298,7 +298,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -316,7 +316,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -335,7 +335,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -353,7 +353,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -379,7 +379,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -401,7 +401,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -422,7 +422,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -440,7 +440,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -462,7 +462,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -480,7 +480,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -504,7 +504,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -522,7 +522,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -607,7 +607,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -633,7 +633,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -651,7 +651,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -669,7 +669,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -743,7 +743,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -763,7 +763,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -781,7 +781,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -799,7 +799,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -826,7 +826,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -854,7 +854,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -872,7 +872,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -898,7 +898,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -923,7 +923,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -943,7 +943,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -967,7 +967,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -990,7 +990,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1009,7 +1009,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1039,7 +1039,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1057,7 +1057,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1075,7 +1075,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1093,7 +1093,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1125,7 +1125,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1145,7 +1145,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1164,7 +1164,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1184,7 +1184,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1211,7 +1211,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1237,7 +1237,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1261,7 +1261,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1283,281 +1283,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170613231358_maxdropamount.cs b/NadekoBot.Core/Migrations/20170613231358_maxdropamount.cs similarity index 100% rename from src/NadekoBot/Migrations/20170613231358_maxdropamount.cs rename to NadekoBot.Core/Migrations/20170613231358_maxdropamount.cs diff --git a/src/NadekoBot/Migrations/20170616154106_crstartswith.Designer.cs b/NadekoBot.Core/Migrations/20170616154106_crstartswith.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170616154106_crstartswith.Designer.cs rename to NadekoBot.Core/Migrations/20170616154106_crstartswith.Designer.cs index 57e8960b..85ab2f4e 100644 --- a/src/NadekoBot/Migrations/20170616154106_crstartswith.Designer.cs +++ b/NadekoBot.Core/Migrations/20170616154106_crstartswith.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -187,7 +187,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -213,7 +213,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -237,7 +237,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -257,7 +257,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -300,7 +300,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -318,7 +318,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -337,7 +337,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -355,7 +355,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -381,7 +381,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -403,7 +403,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -424,7 +424,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -442,7 +442,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -464,7 +464,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -482,7 +482,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -506,7 +506,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -524,7 +524,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -609,7 +609,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -635,7 +635,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -653,7 +653,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -671,7 +671,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -745,7 +745,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -765,7 +765,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -783,7 +783,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -801,7 +801,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -828,7 +828,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -856,7 +856,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -874,7 +874,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -900,7 +900,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -925,7 +925,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -945,7 +945,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -969,7 +969,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -992,7 +992,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1011,7 +1011,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1041,7 +1041,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1059,7 +1059,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1077,7 +1077,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1095,7 +1095,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1127,7 +1127,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1147,7 +1147,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1166,7 +1166,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1186,7 +1186,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1213,7 +1213,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1239,7 +1239,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1263,7 +1263,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1285,281 +1285,281 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170616154106_crstartswith.cs b/NadekoBot.Core/Migrations/20170616154106_crstartswith.cs similarity index 100% rename from src/NadekoBot/Migrations/20170616154106_crstartswith.cs rename to NadekoBot.Core/Migrations/20170616154106_crstartswith.cs diff --git a/src/NadekoBot/Migrations/20170714021615_stream-role.Designer.cs b/NadekoBot.Core/Migrations/20170714021615_stream-role.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170714021615_stream-role.Designer.cs rename to NadekoBot.Core/Migrations/20170714021615_stream-role.Designer.cs index a1621e42..2ffa1bf9 100644 --- a/src/NadekoBot/Migrations/20170714021615_stream-role.Designer.cs +++ b/NadekoBot.Core/Migrations/20170714021615_stream-role.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -187,7 +187,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -213,7 +213,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -237,7 +237,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -257,7 +257,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -300,7 +300,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -318,7 +318,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -337,7 +337,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -355,7 +355,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -381,7 +381,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -403,7 +403,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -424,7 +424,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -442,7 +442,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -464,7 +464,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -482,7 +482,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -506,7 +506,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -524,7 +524,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -609,7 +609,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -635,7 +635,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -653,7 +653,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -671,7 +671,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -745,7 +745,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -765,7 +765,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -783,7 +783,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -801,7 +801,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -828,7 +828,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -856,7 +856,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -874,7 +874,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -900,7 +900,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -925,7 +925,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -945,7 +945,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -969,7 +969,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -992,7 +992,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1011,7 +1011,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1041,7 +1041,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1059,7 +1059,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1077,7 +1077,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1095,7 +1095,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1127,7 +1127,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1148,7 +1148,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1168,7 +1168,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1187,7 +1187,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1207,7 +1207,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1234,7 +1234,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1260,7 +1260,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1284,7 +1284,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1306,289 +1306,289 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170714021615_stream-role.cs b/NadekoBot.Core/Migrations/20170714021615_stream-role.cs similarity index 100% rename from src/NadekoBot/Migrations/20170714021615_stream-role.cs rename to NadekoBot.Core/Migrations/20170714021615_stream-role.cs diff --git a/src/NadekoBot/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs b/NadekoBot.Core/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs rename to NadekoBot.Core/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs index 222865ec..aa3880e6 100644 --- a/src/NadekoBot/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs +++ b/NadekoBot.Core/Migrations/20170719023924_streamrole-kw-bl-wl.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -187,7 +187,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -213,7 +213,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -237,7 +237,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -257,7 +257,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -300,7 +300,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -318,7 +318,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -337,7 +337,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -355,7 +355,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -381,7 +381,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -403,7 +403,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -424,7 +424,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -442,7 +442,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -464,7 +464,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -482,7 +482,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -506,7 +506,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -524,7 +524,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -609,7 +609,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -635,7 +635,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -653,7 +653,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -671,7 +671,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -745,7 +745,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -765,7 +765,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -783,7 +783,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -801,7 +801,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -828,7 +828,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -856,7 +856,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -874,7 +874,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -900,7 +900,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -925,7 +925,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -945,7 +945,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -969,7 +969,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -992,7 +992,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1011,7 +1011,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1041,7 +1041,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1059,7 +1059,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1077,7 +1077,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1095,7 +1095,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1127,7 +1127,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1147,7 +1147,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1172,7 +1172,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1192,7 +1192,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1212,7 +1212,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1231,7 +1231,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1251,7 +1251,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1278,7 +1278,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1304,7 +1304,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1328,7 +1328,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1350,303 +1350,303 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170719023924_streamrole-kw-bl-wl.cs b/NadekoBot.Core/Migrations/20170719023924_streamrole-kw-bl-wl.cs similarity index 100% rename from src/NadekoBot/Migrations/20170719023924_streamrole-kw-bl-wl.cs rename to NadekoBot.Core/Migrations/20170719023924_streamrole-kw-bl-wl.cs diff --git a/src/NadekoBot/Migrations/20170721004230_nsfw-blacklist.Designer.cs b/NadekoBot.Core/Migrations/20170721004230_nsfw-blacklist.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170721004230_nsfw-blacklist.Designer.cs rename to NadekoBot.Core/Migrations/20170721004230_nsfw-blacklist.Designer.cs index 918bf926..205632ba 100644 --- a/src/NadekoBot/Migrations/20170721004230_nsfw-blacklist.Designer.cs +++ b/NadekoBot.Core/Migrations/20170721004230_nsfw-blacklist.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -187,7 +187,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -213,7 +213,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -237,7 +237,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -257,7 +257,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -300,7 +300,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -318,7 +318,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -337,7 +337,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -355,7 +355,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -381,7 +381,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -403,7 +403,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -424,7 +424,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -442,7 +442,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -464,7 +464,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -482,7 +482,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -506,7 +506,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -524,7 +524,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -609,7 +609,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -635,7 +635,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -653,7 +653,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -671,7 +671,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -745,7 +745,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -765,7 +765,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -783,7 +783,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -801,7 +801,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -819,7 +819,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -846,7 +846,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -874,7 +874,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -892,7 +892,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -918,7 +918,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -943,7 +943,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -963,7 +963,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -987,7 +987,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1010,7 +1010,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1029,7 +1029,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1059,7 +1059,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1077,7 +1077,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1095,7 +1095,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1113,7 +1113,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1145,7 +1145,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1165,7 +1165,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1190,7 +1190,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1210,7 +1210,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1230,7 +1230,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1249,7 +1249,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1269,7 +1269,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1296,7 +1296,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1322,7 +1322,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1346,7 +1346,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1368,310 +1368,310 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170721004230_nsfw-blacklist.cs b/NadekoBot.Core/Migrations/20170721004230_nsfw-blacklist.cs similarity index 100% rename from src/NadekoBot/Migrations/20170721004230_nsfw-blacklist.cs rename to NadekoBot.Core/Migrations/20170721004230_nsfw-blacklist.cs diff --git a/src/NadekoBot/Migrations/20170722074959_cr-ca.Designer.cs b/NadekoBot.Core/Migrations/20170722074959_cr-ca.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170722074959_cr-ca.Designer.cs rename to NadekoBot.Core/Migrations/20170722074959_cr-ca.Designer.cs index df888de6..87e8e223 100644 --- a/src/NadekoBot/Migrations/20170722074959_cr-ca.Designer.cs +++ b/NadekoBot.Core/Migrations/20170722074959_cr-ca.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -187,7 +187,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -213,7 +213,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -237,7 +237,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -257,7 +257,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -300,7 +300,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -318,7 +318,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -337,7 +337,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -355,7 +355,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -405,7 +405,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -426,7 +426,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -444,7 +444,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -466,7 +466,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -484,7 +484,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -508,7 +508,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -526,7 +526,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -611,7 +611,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -637,7 +637,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -655,7 +655,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -673,7 +673,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -747,7 +747,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -767,7 +767,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -785,7 +785,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -803,7 +803,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -821,7 +821,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -848,7 +848,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -876,7 +876,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -894,7 +894,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -920,7 +920,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -945,7 +945,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -965,7 +965,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -989,7 +989,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1012,7 +1012,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1031,7 +1031,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1061,7 +1061,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1079,7 +1079,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1097,7 +1097,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1115,7 +1115,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1147,7 +1147,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1167,7 +1167,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1192,7 +1192,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1212,7 +1212,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1232,7 +1232,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1251,7 +1251,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1271,7 +1271,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1298,7 +1298,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1324,7 +1324,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1348,7 +1348,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1370,310 +1370,310 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170722074959_cr-ca.cs b/NadekoBot.Core/Migrations/20170722074959_cr-ca.cs similarity index 100% rename from src/NadekoBot/Migrations/20170722074959_cr-ca.cs rename to NadekoBot.Core/Migrations/20170722074959_cr-ca.cs diff --git a/src/NadekoBot/Migrations/20170814044636_waifu-items.Designer.cs b/NadekoBot.Core/Migrations/20170814044636_waifu-items.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170814044636_waifu-items.Designer.cs rename to NadekoBot.Core/Migrations/20170814044636_waifu-items.Designer.cs index c76dcc33..a9b85a2b 100644 --- a/src/NadekoBot/Migrations/20170814044636_waifu-items.Designer.cs +++ b/NadekoBot.Core/Migrations/20170814044636_waifu-items.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -79,7 +79,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -99,7 +99,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -121,7 +121,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -187,7 +187,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -213,7 +213,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -237,7 +237,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -257,7 +257,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -300,7 +300,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -318,7 +318,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -337,7 +337,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -355,7 +355,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -383,7 +383,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -405,7 +405,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -426,7 +426,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -444,7 +444,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -466,7 +466,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -484,7 +484,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -508,7 +508,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -526,7 +526,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -611,7 +611,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -637,7 +637,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -655,7 +655,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -673,7 +673,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -747,7 +747,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -767,7 +767,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -785,7 +785,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -803,7 +803,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -821,7 +821,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -848,7 +848,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -876,7 +876,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -894,7 +894,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -920,7 +920,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -945,7 +945,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -965,7 +965,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -989,7 +989,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1012,7 +1012,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1031,7 +1031,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1061,7 +1061,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1079,7 +1079,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1097,7 +1097,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1115,7 +1115,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1147,7 +1147,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1167,7 +1167,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1192,7 +1192,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1212,7 +1212,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1232,7 +1232,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1251,7 +1251,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1271,7 +1271,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1298,7 +1298,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1320,7 +1320,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1346,7 +1346,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1370,7 +1370,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1392,317 +1392,317 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170814044636_waifu-items.cs b/NadekoBot.Core/Migrations/20170814044636_waifu-items.cs similarity index 100% rename from src/NadekoBot/Migrations/20170814044636_waifu-items.cs rename to NadekoBot.Core/Migrations/20170814044636_waifu-items.cs diff --git a/src/NadekoBot/Migrations/20170815222316_mute-time-antispam.Designer.cs b/NadekoBot.Core/Migrations/20170815222316_mute-time-antispam.Designer.cs similarity index 75% rename from src/NadekoBot/Migrations/20170815222316_mute-time-antispam.Designer.cs rename to NadekoBot.Core/Migrations/20170815222316_mute-time-antispam.Designer.cs index fcab240e..4c4201c0 100644 --- a/src/NadekoBot/Migrations/20170815222316_mute-time-antispam.Designer.cs +++ b/NadekoBot.Core/Migrations/20170815222316_mute-time-antispam.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -81,7 +81,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -101,7 +101,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -123,7 +123,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -189,7 +189,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -215,7 +215,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -239,7 +239,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -259,7 +259,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -279,7 +279,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -302,7 +302,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -320,7 +320,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -339,7 +339,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -357,7 +357,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -385,7 +385,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -407,7 +407,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -428,7 +428,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -446,7 +446,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -468,7 +468,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -486,7 +486,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -510,7 +510,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -528,7 +528,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -613,7 +613,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -639,7 +639,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -657,7 +657,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -675,7 +675,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -749,7 +749,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -769,7 +769,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -787,7 +787,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -805,7 +805,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -823,7 +823,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -850,7 +850,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -878,7 +878,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -896,7 +896,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -922,7 +922,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -947,7 +947,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -967,7 +967,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -991,7 +991,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1014,7 +1014,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1033,7 +1033,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1063,7 +1063,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1081,7 +1081,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1099,7 +1099,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1117,7 +1117,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1149,7 +1149,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1169,7 +1169,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1194,7 +1194,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1214,7 +1214,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1234,7 +1234,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1253,7 +1253,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1273,7 +1273,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1300,7 +1300,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1322,7 +1322,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1348,7 +1348,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1372,7 +1372,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1394,317 +1394,317 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); diff --git a/src/NadekoBot/Migrations/20170815222316_mute-time-antispam.cs b/NadekoBot.Core/Migrations/20170815222316_mute-time-antispam.cs similarity index 100% rename from src/NadekoBot/Migrations/20170815222316_mute-time-antispam.cs rename to NadekoBot.Core/Migrations/20170815222316_mute-time-antispam.cs diff --git a/src/NadekoBot/Migrations/20170908230730_xp-and-clubs.Designer.cs b/NadekoBot.Core/Migrations/20170908230730_xp-and-clubs.Designer.cs similarity index 74% rename from src/NadekoBot/Migrations/20170908230730_xp-and-clubs.Designer.cs rename to NadekoBot.Core/Migrations/20170908230730_xp-and-clubs.Designer.cs index 6b324c08..b6d86975 100644 --- a/src/NadekoBot/Migrations/20170908230730_xp-and-clubs.Designer.cs +++ b/NadekoBot.Core/Migrations/20170908230730_xp-and-clubs.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -81,7 +81,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -101,7 +101,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -123,7 +123,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -197,7 +197,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -223,7 +223,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -247,7 +247,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -260,7 +260,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubApplicants"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { b.Property("ClubId"); @@ -273,7 +273,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubBans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("Clubs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -344,7 +344,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -367,7 +367,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -385,7 +385,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -404,7 +404,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -422,7 +422,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -450,7 +450,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -482,7 +482,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -503,7 +503,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -521,7 +521,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -541,7 +541,7 @@ namespace NadekoBot.Migrations b.ToTable("ExcludedItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -563,7 +563,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -581,7 +581,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -605,7 +605,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -623,7 +623,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -708,7 +708,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -734,7 +734,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -752,7 +752,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -770,7 +770,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -844,7 +844,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -864,7 +864,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -882,7 +882,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -900,7 +900,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -918,7 +918,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -945,7 +945,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -973,7 +973,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -991,7 +991,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1017,7 +1017,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1042,7 +1042,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1062,7 +1062,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1086,7 +1086,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1109,7 +1109,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1128,7 +1128,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1158,7 +1158,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1176,7 +1176,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1194,7 +1194,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1212,7 +1212,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1244,7 +1244,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1264,7 +1264,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1289,7 +1289,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1309,7 +1309,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1329,7 +1329,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1348,7 +1348,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserXpStats", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1377,7 +1377,7 @@ namespace NadekoBot.Migrations b.ToTable("UserXpStats"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1397,7 +1397,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1424,7 +1424,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1446,7 +1446,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1472,7 +1472,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1496,7 +1496,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1518,7 +1518,7 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1540,7 +1540,7 @@ namespace NadekoBot.Migrations b.ToTable("XpRoleReward"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1563,381 +1563,381 @@ namespace NadekoBot.Migrations b.ToTable("XpSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Applicants") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Bans") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Owner") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.ClubInfo", "OwnerId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Users") .HasForeignKey("ClubId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("ExclusionList") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("RoleRewards") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("XpSettings") - .HasForeignKey("NadekoBot.Services.Database.Models.XpSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); } diff --git a/src/NadekoBot/Migrations/20170908230730_xp-and-clubs.cs b/NadekoBot.Core/Migrations/20170908230730_xp-and-clubs.cs similarity index 100% rename from src/NadekoBot/Migrations/20170908230730_xp-and-clubs.cs rename to NadekoBot.Core/Migrations/20170908230730_xp-and-clubs.cs diff --git a/src/NadekoBot/Migrations/20170911200031_lastXpGain.Designer.cs b/NadekoBot.Core/Migrations/20170911200031_lastXpGain.Designer.cs similarity index 74% rename from src/NadekoBot/Migrations/20170911200031_lastXpGain.Designer.cs rename to NadekoBot.Core/Migrations/20170911200031_lastXpGain.Designer.cs index e5c805df..6918f1a1 100644 --- a/src/NadekoBot/Migrations/20170911200031_lastXpGain.Designer.cs +++ b/NadekoBot.Core/Migrations/20170911200031_lastXpGain.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -81,7 +81,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -101,7 +101,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -123,7 +123,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -197,7 +197,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -223,7 +223,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -247,7 +247,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -260,7 +260,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubApplicants"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { b.Property("ClubId"); @@ -273,7 +273,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubBans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("Clubs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -344,7 +344,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -367,7 +367,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -385,7 +385,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -404,7 +404,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -422,7 +422,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -450,7 +450,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -484,7 +484,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -505,7 +505,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -523,7 +523,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -543,7 +543,7 @@ namespace NadekoBot.Migrations b.ToTable("ExcludedItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -565,7 +565,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -583,7 +583,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -607,7 +607,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -625,7 +625,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -710,7 +710,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -736,7 +736,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -754,7 +754,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -772,7 +772,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -846,7 +846,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -866,7 +866,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -884,7 +884,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -902,7 +902,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -920,7 +920,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -947,7 +947,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -975,7 +975,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -993,7 +993,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1019,7 +1019,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1044,7 +1044,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1064,7 +1064,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1088,7 +1088,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1111,7 +1111,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1130,7 +1130,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1160,7 +1160,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1178,7 +1178,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1196,7 +1196,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1214,7 +1214,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1246,7 +1246,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1266,7 +1266,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1291,7 +1291,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1311,7 +1311,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1331,7 +1331,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1350,7 +1350,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserXpStats", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1379,7 +1379,7 @@ namespace NadekoBot.Migrations b.ToTable("UserXpStats"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1399,7 +1399,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1426,7 +1426,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1448,7 +1448,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1474,7 +1474,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1498,7 +1498,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1520,7 +1520,7 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1542,7 +1542,7 @@ namespace NadekoBot.Migrations b.ToTable("XpRoleReward"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1565,381 +1565,381 @@ namespace NadekoBot.Migrations b.ToTable("XpSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Applicants") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Bans") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Owner") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.ClubInfo", "OwnerId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Users") .HasForeignKey("ClubId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("ExclusionList") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("RoleRewards") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("XpSettings") - .HasForeignKey("NadekoBot.Services.Database.Models.XpSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); } diff --git a/src/NadekoBot/Migrations/20170911200031_lastXpGain.cs b/NadekoBot.Core/Migrations/20170911200031_lastXpGain.cs similarity index 100% rename from src/NadekoBot/Migrations/20170911200031_lastXpGain.cs rename to NadekoBot.Core/Migrations/20170911200031_lastXpGain.cs diff --git a/src/NadekoBot/Migrations/20170913022654_total-xp.Designer.cs b/NadekoBot.Core/Migrations/20170913022654_total-xp.Designer.cs similarity index 74% rename from src/NadekoBot/Migrations/20170913022654_total-xp.Designer.cs rename to NadekoBot.Core/Migrations/20170913022654_total-xp.Designer.cs index 6764dd56..2780805f 100644 --- a/src/NadekoBot/Migrations/20170913022654_total-xp.Designer.cs +++ b/NadekoBot.Core/Migrations/20170913022654_total-xp.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -81,7 +81,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -101,7 +101,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -123,7 +123,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -197,7 +197,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -223,7 +223,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -247,7 +247,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -260,7 +260,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubApplicants"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { b.Property("ClubId"); @@ -273,7 +273,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubBans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("Clubs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -344,7 +344,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -367,7 +367,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -385,7 +385,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -404,7 +404,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -422,7 +422,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -450,7 +450,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -486,7 +486,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -507,7 +507,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -525,7 +525,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -545,7 +545,7 @@ namespace NadekoBot.Migrations b.ToTable("ExcludedItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -567,7 +567,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -585,7 +585,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -609,7 +609,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -627,7 +627,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -712,7 +712,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -738,7 +738,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -756,7 +756,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -774,7 +774,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -848,7 +848,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -868,7 +868,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -886,7 +886,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -904,7 +904,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -922,7 +922,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -949,7 +949,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -977,7 +977,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -995,7 +995,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1021,7 +1021,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1046,7 +1046,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1066,7 +1066,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1090,7 +1090,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1113,7 +1113,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1132,7 +1132,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1162,7 +1162,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1180,7 +1180,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1198,7 +1198,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1216,7 +1216,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1248,7 +1248,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1268,7 +1268,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1293,7 +1293,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1313,7 +1313,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1333,7 +1333,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1352,7 +1352,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserXpStats", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1381,7 +1381,7 @@ namespace NadekoBot.Migrations b.ToTable("UserXpStats"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1401,7 +1401,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1428,7 +1428,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1450,7 +1450,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1476,7 +1476,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1500,7 +1500,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1522,7 +1522,7 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1544,7 +1544,7 @@ namespace NadekoBot.Migrations b.ToTable("XpRoleReward"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1567,381 +1567,381 @@ namespace NadekoBot.Migrations b.ToTable("XpSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Applicants") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Bans") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Owner") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.ClubInfo", "OwnerId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Users") .HasForeignKey("ClubId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("ExclusionList") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("RoleRewards") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("XpSettings") - .HasForeignKey("NadekoBot.Services.Database.Models.XpSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); } diff --git a/src/NadekoBot/Migrations/20170913022654_total-xp.cs b/NadekoBot.Core/Migrations/20170913022654_total-xp.cs similarity index 100% rename from src/NadekoBot/Migrations/20170913022654_total-xp.cs rename to NadekoBot.Core/Migrations/20170913022654_total-xp.cs diff --git a/src/NadekoBot/Migrations/20170915034808_club-admins.Designer.cs b/NadekoBot.Core/Migrations/20170915034808_club-admins.Designer.cs similarity index 74% rename from src/NadekoBot/Migrations/20170915034808_club-admins.Designer.cs rename to NadekoBot.Core/Migrations/20170915034808_club-admins.Designer.cs index d7b4c4d9..d43b815a 100644 --- a/src/NadekoBot/Migrations/20170915034808_club-admins.Designer.cs +++ b/NadekoBot.Core/Migrations/20170915034808_club-admins.Designer.cs @@ -3,8 +3,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Migrations { @@ -17,7 +17,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "1.1.1"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -40,7 +40,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -58,7 +58,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -81,7 +81,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -101,7 +101,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -123,7 +123,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -197,7 +197,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -223,7 +223,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -247,7 +247,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -260,7 +260,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubApplicants"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { b.Property("ClubId"); @@ -273,7 +273,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubBans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -304,7 +304,7 @@ namespace NadekoBot.Migrations b.ToTable("Clubs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -324,7 +324,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -344,7 +344,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -367,7 +367,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -385,7 +385,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -404,7 +404,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -422,7 +422,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -450,7 +450,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -488,7 +488,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -509,7 +509,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -527,7 +527,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -547,7 +547,7 @@ namespace NadekoBot.Migrations b.ToTable("ExcludedItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -569,7 +569,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -587,7 +587,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -611,7 +611,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -629,7 +629,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -714,7 +714,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -740,7 +740,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -758,7 +758,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -776,7 +776,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -850,7 +850,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -870,7 +870,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -888,7 +888,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -906,7 +906,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -924,7 +924,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -951,7 +951,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -979,7 +979,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -997,7 +997,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1023,7 +1023,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1048,7 +1048,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1068,7 +1068,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1092,7 +1092,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1115,7 +1115,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1134,7 +1134,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1164,7 +1164,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1182,7 +1182,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1200,7 +1200,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1218,7 +1218,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1250,7 +1250,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1270,7 +1270,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1295,7 +1295,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1315,7 +1315,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1335,7 +1335,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1354,7 +1354,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserXpStats", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1383,7 +1383,7 @@ namespace NadekoBot.Migrations b.ToTable("UserXpStats"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1403,7 +1403,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1430,7 +1430,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1452,7 +1452,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1478,7 +1478,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1502,7 +1502,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1524,7 +1524,7 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1546,7 +1546,7 @@ namespace NadekoBot.Migrations b.ToTable("XpRoleReward"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1569,381 +1569,381 @@ namespace NadekoBot.Migrations b.ToTable("XpSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Applicants") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Bans") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Owner") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.ClubInfo", "OwnerId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Users") .HasForeignKey("ClubId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("ExclusionList") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("RoleRewards") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("XpSettings") - .HasForeignKey("NadekoBot.Services.Database.Models.XpSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); } diff --git a/src/NadekoBot/Migrations/20170915034808_club-admins.cs b/NadekoBot.Core/Migrations/20170915034808_club-admins.cs similarity index 100% rename from src/NadekoBot/Migrations/20170915034808_club-admins.cs rename to NadekoBot.Core/Migrations/20170915034808_club-admins.cs diff --git a/src/NadekoBot/Migrations/20170921185313_feeds.Designer.cs b/NadekoBot.Core/Migrations/20170921185313_feeds.Designer.cs similarity index 74% rename from src/NadekoBot/Migrations/20170921185313_feeds.Designer.cs rename to NadekoBot.Core/Migrations/20170921185313_feeds.Designer.cs index 86ee94cc..41a76330 100644 --- a/src/NadekoBot/Migrations/20170921185313_feeds.Designer.cs +++ b/NadekoBot.Core/Migrations/20170921185313_feeds.Designer.cs @@ -5,8 +5,8 @@ using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Storage.Internal; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; using System; namespace NadekoBot.Migrations @@ -21,7 +21,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "2.0.0-rtm-26452"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -44,7 +44,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -62,7 +62,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -85,7 +85,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -105,7 +105,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -127,7 +127,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -201,7 +201,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -227,7 +227,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -251,7 +251,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -264,7 +264,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubApplicants"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { b.Property("ClubId"); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubBans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -308,7 +308,7 @@ namespace NadekoBot.Migrations b.ToTable("Clubs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -328,7 +328,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -348,7 +348,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -371,7 +371,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -389,7 +389,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -408,7 +408,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -426,7 +426,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -454,7 +454,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -492,7 +492,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -513,7 +513,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -531,7 +531,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -551,7 +551,7 @@ namespace NadekoBot.Migrations b.ToTable("ExcludedItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FeedSub", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("FeedSub"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -594,7 +594,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -612,7 +612,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -636,7 +636,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -654,7 +654,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -739,7 +739,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -765,7 +765,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -783,7 +783,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -801,7 +801,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -875,7 +875,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -895,7 +895,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -913,7 +913,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -931,7 +931,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -949,7 +949,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -976,7 +976,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1004,7 +1004,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1022,7 +1022,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1048,7 +1048,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1073,7 +1073,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1093,7 +1093,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1117,7 +1117,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1140,7 +1140,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1159,7 +1159,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1189,7 +1189,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1207,7 +1207,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1225,7 +1225,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1243,7 +1243,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1275,7 +1275,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1295,7 +1295,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1320,7 +1320,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1340,7 +1340,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1360,7 +1360,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1379,7 +1379,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserXpStats", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1408,7 +1408,7 @@ namespace NadekoBot.Migrations b.ToTable("UserXpStats"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1428,7 +1428,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1455,7 +1455,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1477,7 +1477,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1503,7 +1503,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1527,7 +1527,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1549,7 +1549,7 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1571,7 +1571,7 @@ namespace NadekoBot.Migrations b.ToTable("XpRoleReward"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1594,389 +1594,389 @@ namespace NadekoBot.Migrations b.ToTable("XpSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Applicants") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Bans") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Owner") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.ClubInfo", "OwnerId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Users") .HasForeignKey("ClubId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("ExclusionList") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FeedSub", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithMany("FeedSubs") .HasForeignKey("GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("RoleRewards") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("XpSettings") - .HasForeignKey("NadekoBot.Services.Database.Models.XpSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); #pragma warning restore 612, 618 diff --git a/src/NadekoBot/Migrations/20170921185313_feeds.cs b/NadekoBot.Core/Migrations/20170921185313_feeds.cs similarity index 100% rename from src/NadekoBot/Migrations/20170921185313_feeds.cs rename to NadekoBot.Core/Migrations/20170921185313_feeds.cs diff --git a/src/NadekoBot/Migrations/20170923002439_xprr-fix.Designer.cs b/NadekoBot.Core/Migrations/20170923002439_xprr-fix.Designer.cs similarity index 74% rename from src/NadekoBot/Migrations/20170923002439_xprr-fix.Designer.cs rename to NadekoBot.Core/Migrations/20170923002439_xprr-fix.Designer.cs index 79e0e678..2941d0d6 100644 --- a/src/NadekoBot/Migrations/20170923002439_xprr-fix.Designer.cs +++ b/NadekoBot.Core/Migrations/20170923002439_xprr-fix.Designer.cs @@ -5,8 +5,8 @@ using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Storage.Internal; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; using System; namespace NadekoBot.Migrations @@ -21,7 +21,7 @@ namespace NadekoBot.Migrations modelBuilder .HasAnnotation("ProductVersion", "2.0.0-rtm-26452"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -44,7 +44,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -62,7 +62,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -85,7 +85,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -105,7 +105,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -127,7 +127,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -201,7 +201,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -227,7 +227,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashCallers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashWar", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -251,7 +251,7 @@ namespace NadekoBot.Migrations b.ToTable("ClashOfClans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -264,7 +264,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubApplicants"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { b.Property("ClubId"); @@ -277,7 +277,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubBans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -308,7 +308,7 @@ namespace NadekoBot.Migrations b.ToTable("Clubs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -328,7 +328,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -348,7 +348,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -371,7 +371,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -389,7 +389,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -408,7 +408,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -426,7 +426,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -454,7 +454,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -492,7 +492,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -513,7 +513,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -531,7 +531,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -551,7 +551,7 @@ namespace NadekoBot.Migrations b.ToTable("ExcludedItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FeedSub", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -572,7 +572,7 @@ namespace NadekoBot.Migrations b.ToTable("FeedSub"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -594,7 +594,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -612,7 +612,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -636,7 +636,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -654,7 +654,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -739,7 +739,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -765,7 +765,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -783,7 +783,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -801,7 +801,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -875,7 +875,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -895,7 +895,7 @@ namespace NadekoBot.Migrations b.ToTable("ModulePrefixes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -913,7 +913,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -931,7 +931,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -949,7 +949,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -976,7 +976,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1004,7 +1004,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1022,7 +1022,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1048,7 +1048,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1073,7 +1073,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1093,7 +1093,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1117,7 +1117,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1140,7 +1140,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1159,7 +1159,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1189,7 +1189,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1207,7 +1207,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1225,7 +1225,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1243,7 +1243,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1275,7 +1275,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1295,7 +1295,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1320,7 +1320,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1340,7 +1340,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1360,7 +1360,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1379,7 +1379,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserXpStats", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1408,7 +1408,7 @@ namespace NadekoBot.Migrations b.ToTable("UserXpStats"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1428,7 +1428,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1455,7 +1455,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1477,7 +1477,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1503,7 +1503,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1527,7 +1527,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1549,7 +1549,7 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1570,7 +1570,7 @@ namespace NadekoBot.Migrations b.ToTable("XpRoleReward"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1593,390 +1593,390 @@ namespace NadekoBot.Migrations b.ToTable("XpSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClashCaller", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClashWar", "ClashWar") .WithMany("Bases") .HasForeignKey("ClashWarId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Applicants") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Bans") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Owner") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.ClubInfo", "OwnerId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Users") .HasForeignKey("ClubId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("ExclusionList") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FeedSub", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithMany("FeedSubs") .HasForeignKey("GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ModulePrefix", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("ModulePrefixes") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings", "XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings", "XpSettings") .WithMany("RoleRewards") .HasForeignKey("XpSettingsId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("XpSettings") - .HasForeignKey("NadekoBot.Services.Database.Models.XpSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); #pragma warning restore 612, 618 diff --git a/src/NadekoBot/Migrations/20170923002439_xprr-fix.cs b/NadekoBot.Core/Migrations/20170923002439_xprr-fix.cs similarity index 100% rename from src/NadekoBot/Migrations/20170923002439_xprr-fix.cs rename to NadekoBot.Core/Migrations/20170923002439_xprr-fix.cs diff --git a/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs b/NadekoBot.Core/Migrations/20171013055008_clear-and-loadedpackage.Designer.cs similarity index 72% rename from src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs rename to NadekoBot.Core/Migrations/20171013055008_clear-and-loadedpackage.Designer.cs index dee868e0..94bdf200 100644 --- a/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs +++ b/NadekoBot.Core/Migrations/20171013055008_clear-and-loadedpackage.Designer.cs @@ -5,22 +5,23 @@ using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Storage.Internal; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; using System; namespace NadekoBot.Migrations { [DbContext(typeof(NadekoContext))] - partial class NadekoSqliteContextModelSnapshot : ModelSnapshot + [Migration("20171013055008_clear-and-loadedpackage")] + partial class clearandloadedpackage { - protected override void BuildModel(ModelBuilder modelBuilder) + protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "2.0.0-rtm-26452"); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -43,7 +44,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiRaidSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -61,7 +62,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamIgnore"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -84,7 +85,7 @@ namespace NadekoBot.Migrations b.ToTable("AntiSpamSetting"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -104,7 +105,7 @@ namespace NadekoBot.Migrations b.ToTable("BlacklistItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -126,7 +127,7 @@ namespace NadekoBot.Migrations b.ToTable("BlockedCmdOrMdl"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -200,57 +201,7 @@ namespace NadekoBot.Migrations b.ToTable("BotConfig"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("BaseDestroyed"); - - b.Property("CallUser"); - - b.Property("ClashWarId"); - - b.Property("DateAdded"); - - b.Property("SequenceNumber"); - - b.Property("Stars"); - - b.Property("TimeAdded"); - - b.HasKey("Id"); - - b.HasIndex("ClashWarId"); - - b.ToTable("ClashCallers"); - }); - - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ChannelId"); - - b.Property("DateAdded"); - - b.Property("EnemyClan"); - - b.Property("GuildId"); - - b.Property("Size"); - - b.Property("StartedAt"); - - b.Property("WarState"); - - b.HasKey("Id"); - - b.ToTable("ClashOfClans"); - }); - - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { b.Property("ClubId"); @@ -263,7 +214,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubApplicants"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { b.Property("ClubId"); @@ -276,7 +227,7 @@ namespace NadekoBot.Migrations b.ToTable("ClubBans"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -307,7 +258,7 @@ namespace NadekoBot.Migrations b.ToTable("Clubs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -327,7 +278,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandAlias"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -347,7 +298,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandCooldown"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -370,7 +321,7 @@ namespace NadekoBot.Migrations b.ToTable("CommandPrice"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ConvertUnit", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -388,7 +339,7 @@ namespace NadekoBot.Migrations b.ToTable("ConversionUnits"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -407,7 +358,7 @@ namespace NadekoBot.Migrations b.ToTable("Currency"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -425,7 +376,7 @@ namespace NadekoBot.Migrations b.ToTable("CurrencyTransactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -453,7 +404,7 @@ namespace NadekoBot.Migrations b.ToTable("CustomReactions"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -491,7 +442,7 @@ namespace NadekoBot.Migrations b.ToTable("DiscordUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -512,7 +463,7 @@ namespace NadekoBot.Migrations b.ToTable("Donators"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -530,7 +481,7 @@ namespace NadekoBot.Migrations b.ToTable("EightBallResponses"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -550,7 +501,7 @@ namespace NadekoBot.Migrations b.ToTable("ExcludedItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FeedSub", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -571,7 +522,7 @@ namespace NadekoBot.Migrations b.ToTable("FeedSub"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -593,7 +544,7 @@ namespace NadekoBot.Migrations b.ToTable("FilterChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -611,7 +562,7 @@ namespace NadekoBot.Migrations b.ToTable("FilteredWord"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -635,7 +586,7 @@ namespace NadekoBot.Migrations b.ToTable("FollowedStream"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -653,7 +604,7 @@ namespace NadekoBot.Migrations b.ToTable("GCChannelId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -738,7 +689,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildConfigs"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -764,7 +715,7 @@ namespace NadekoBot.Migrations b.ToTable("GuildRepeater"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -782,7 +733,7 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredLogChannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -800,7 +751,25 @@ namespace NadekoBot.Migrations b.ToTable("IgnoredVoicePresenceCHannels"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LoadedPackage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("LoadedPackages"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -874,27 +843,7 @@ namespace NadekoBot.Migrations b.ToTable("LogSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("BotConfigId"); - - b.Property("DateAdded"); - - b.Property("ModuleName"); - - b.Property("Prefix"); - - b.HasKey("Id"); - - b.HasIndex("BotConfigId"); - - b.ToTable("ModulePrefixes"); - }); - - modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -912,7 +861,7 @@ namespace NadekoBot.Migrations b.ToTable("MusicPlaylists"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -930,7 +879,7 @@ namespace NadekoBot.Migrations b.ToTable("MutedUserId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -948,7 +897,7 @@ namespace NadekoBot.Migrations b.ToTable("NsfwBlacklitedTag"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -975,7 +924,7 @@ namespace NadekoBot.Migrations b.ToTable("Permission"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1003,7 +952,7 @@ namespace NadekoBot.Migrations b.ToTable("Permissionv2"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1021,7 +970,7 @@ namespace NadekoBot.Migrations b.ToTable("PlayingStatus"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1047,7 +996,7 @@ namespace NadekoBot.Migrations b.ToTable("PlaylistSong"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1072,7 +1021,7 @@ namespace NadekoBot.Migrations b.ToTable("Quotes"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1092,7 +1041,7 @@ namespace NadekoBot.Migrations b.ToTable("RaceAnimals"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1116,7 +1065,7 @@ namespace NadekoBot.Migrations b.ToTable("Reminders"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RewardedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1139,7 +1088,7 @@ namespace NadekoBot.Migrations b.ToTable("RewardedUsers"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1158,7 +1107,7 @@ namespace NadekoBot.Migrations b.ToTable("SelfAssignableRoles"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1188,7 +1137,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntry"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1206,7 +1155,7 @@ namespace NadekoBot.Migrations b.ToTable("ShopEntryItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1224,7 +1173,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredRole"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1242,7 +1191,7 @@ namespace NadekoBot.Migrations b.ToTable("SlowmodeIgnoredUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1274,7 +1223,7 @@ namespace NadekoBot.Migrations b.ToTable("StartupCommand"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1294,7 +1243,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleBlacklistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1319,7 +1268,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1339,7 +1288,7 @@ namespace NadekoBot.Migrations b.ToTable("StreamRoleWhitelistedUser"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1359,7 +1308,7 @@ namespace NadekoBot.Migrations b.ToTable("UnmuteTimer"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserPokeTypes", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1378,7 +1327,7 @@ namespace NadekoBot.Migrations b.ToTable("PokeGame"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UserXpStats", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1407,7 +1356,7 @@ namespace NadekoBot.Migrations b.ToTable("UserXpStats"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1427,7 +1376,7 @@ namespace NadekoBot.Migrations b.ToTable("VcRoleInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1454,7 +1403,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuInfo"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1476,7 +1425,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuItem"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1502,7 +1451,7 @@ namespace NadekoBot.Migrations b.ToTable("WaifuUpdates"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Warning", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1526,7 +1475,7 @@ namespace NadekoBot.Migrations b.ToTable("Warnings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1548,7 +1497,7 @@ namespace NadekoBot.Migrations b.ToTable("WarningPunishment"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1569,7 +1518,7 @@ namespace NadekoBot.Migrations b.ToTable("XpRoleReward"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -1592,390 +1541,382 @@ namespace NadekoBot.Migrations b.ToTable("XpSettings"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiRaidSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiRaidSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamIgnore", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => { - b.HasOne("NadekoBot.Services.Database.Models.AntiSpamSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") .WithMany("IgnoredChannels") .HasForeignKey("AntiSpamSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.AntiSpamSetting", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("AntiSpamSetting") - .HasForeignKey("NadekoBot.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("Blacklist") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.BlockedCmdOrMdl", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedCommands") .HasForeignKey("BotConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("BlockedModules") .HasForeignKey("BotConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") - .WithMany("Bases") - .HasForeignKey("ClashWarId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubApplicants", b => - { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Applicants") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubBans", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Bans") .HasForeignKey("ClubId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ClubInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Owner") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.ClubInfo", "OwnerId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandAlias", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandAliases") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("CommandCooldowns") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandPrice", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("CommandPrices") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.DiscordUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.ClubInfo", "Club") + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") .WithMany("Users") .HasForeignKey("ClubId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("EightBallResponses") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ExcludedItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") .WithMany("ExclusionList") .HasForeignKey("XpSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FeedSub", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithMany("FeedSubs") .HasForeignKey("GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterInvitesChannelIds") .HasForeignKey("GuildConfigId"); - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilterWordsChannelIds") .HasForeignKey("GuildConfigId1"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FilteredWords") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("FollowedStreams") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GenerateCurrencyChannelIds") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany() .HasForeignKey("LogSettingId"); - b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") .WithMany() .HasForeignKey("RootPermissionId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildRepeater", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("GuildRepeaters") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredChannels") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => { - b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") .WithMany("IgnoredVoicePresenceChannelIds") .HasForeignKey("LogSettingId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LoadedPackage", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") - .WithMany("ModulePrefixes") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("LoadedPackages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.MutedUserId", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("MutedUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.NsfwBlacklitedTag", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("NsfwBlacklistedTags") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => { - b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") .WithOne("Previous") - .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.Permissionv2", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("Permissions") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RotatingStatusMessages") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => { - b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") .WithMany("Songs") .HasForeignKey("MusicPlaylistId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("RaceAnimals") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntry", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("ShopEntries") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.ShopEntryItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.ShopEntry") + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") .WithMany("Items") .HasForeignKey("ShopEntryId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredRole", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredRoles") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.SlowmodeIgnoredUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("SlowmodeIgnoredUsers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StartupCommand", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => { - b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") .WithMany("StartupCommands") .HasForeignKey("BotConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleBlacklistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Blacklist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("StreamRole") - .HasForeignKey("NadekoBot.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.StreamRoleWhitelistedUser", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => { - b.HasOne("NadekoBot.Services.Database.Models.StreamRoleSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") .WithMany("Whitelist") .HasForeignKey("StreamRoleSettingsId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.UnmuteTimer", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("UnmuteTimers") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.VcRoleInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("VcRoleInfos") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuInfo", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Affinity") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") .WithMany() .HasForeignKey("AffinityId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Claimer") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") .WithMany() .HasForeignKey("ClaimerId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Waifu") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") .WithOne() - .HasForeignKey("NadekoBot.Services.Database.Models.WaifuInfo", "WaifuId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuItem", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => { - b.HasOne("NadekoBot.Services.Database.Models.WaifuInfo") + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") .WithMany("Items") .HasForeignKey("WaifuInfoId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WaifuUpdate", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => { - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "New") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") .WithMany() .HasForeignKey("NewId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "Old") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") .WithMany() .HasForeignKey("OldId"); - b.HasOne("NadekoBot.Services.Database.Models.DiscordUser", "User") + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.WarningPunishment", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") .WithMany("WarnPunishments") .HasForeignKey("GuildConfigId"); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpRoleReward", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => { - b.HasOne("NadekoBot.Services.Database.Models.XpSettings", "XpSettings") + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings", "XpSettings") .WithMany("RoleRewards") .HasForeignKey("XpSettingsId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("NadekoBot.Services.Database.Models.XpSettings", b => + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => { - b.HasOne("NadekoBot.Services.Database.Models.GuildConfig", "GuildConfig") + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") .WithOne("XpSettings") - .HasForeignKey("NadekoBot.Services.Database.Models.XpSettings", "GuildConfigId") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") .OnDelete(DeleteBehavior.Cascade); }); #pragma warning restore 612, 618 diff --git a/NadekoBot.Core/Migrations/20171013055008_clear-and-loadedpackage.cs b/NadekoBot.Core/Migrations/20171013055008_clear-and-loadedpackage.cs new file mode 100644 index 00000000..a120354b --- /dev/null +++ b/NadekoBot.Core/Migrations/20171013055008_clear-and-loadedpackage.cs @@ -0,0 +1,129 @@ +using Microsoft.EntityFrameworkCore.Migrations; +using System; +using System.Collections.Generic; + +namespace NadekoBot.Migrations +{ + public partial class clearandloadedpackage : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "ClashCallers"); + + migrationBuilder.DropTable( + name: "ModulePrefixes"); + + migrationBuilder.DropTable( + name: "ClashOfClans"); + + migrationBuilder.CreateTable( + name: "LoadedPackages", + columns: table => new + { + Id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + BotConfigId = table.Column(type: "INTEGER", nullable: true), + DateAdded = table.Column(type: "TEXT", nullable: true), + Name = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_LoadedPackages", x => x.Id); + table.ForeignKey( + name: "FK_LoadedPackages_BotConfig_BotConfigId", + column: x => x.BotConfigId, + principalTable: "BotConfig", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateIndex( + name: "IX_LoadedPackages_BotConfigId", + table: "LoadedPackages", + column: "BotConfigId"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "LoadedPackages"); + + migrationBuilder.CreateTable( + name: "ClashOfClans", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + ChannelId = table.Column(nullable: false), + DateAdded = table.Column(nullable: true), + EnemyClan = table.Column(nullable: true), + GuildId = table.Column(nullable: false), + Size = table.Column(nullable: false), + StartedAt = table.Column(nullable: false), + WarState = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ClashOfClans", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "ModulePrefixes", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + BotConfigId = table.Column(nullable: true), + DateAdded = table.Column(nullable: true), + ModuleName = table.Column(nullable: true), + Prefix = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ModulePrefixes", x => x.Id); + table.ForeignKey( + name: "FK_ModulePrefixes_BotConfig_BotConfigId", + column: x => x.BotConfigId, + principalTable: "BotConfig", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateTable( + name: "ClashCallers", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + BaseDestroyed = table.Column(nullable: false), + CallUser = table.Column(nullable: true), + ClashWarId = table.Column(nullable: false), + DateAdded = table.Column(nullable: true), + SequenceNumber = table.Column(nullable: true), + Stars = table.Column(nullable: false), + TimeAdded = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ClashCallers", x => x.Id); + table.ForeignKey( + name: "FK_ClashCallers_ClashOfClans_ClashWarId", + column: x => x.ClashWarId, + principalTable: "ClashOfClans", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_ClashCallers_ClashWarId", + table: "ClashCallers", + column: "ClashWarId"); + + migrationBuilder.CreateIndex( + name: "IX_ModulePrefixes_BotConfigId", + table: "ModulePrefixes", + column: "BotConfigId"); + } + } +} diff --git a/NadekoBot.Core/Migrations/20171016091343_remove-convertunits.Designer.cs b/NadekoBot.Core/Migrations/20171016091343_remove-convertunits.Designer.cs new file mode 100644 index 00000000..5448c9b0 --- /dev/null +++ b/NadekoBot.Core/Migrations/20171016091343_remove-convertunits.Designer.cs @@ -0,0 +1,1907 @@ +// +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Internal; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; +using System; + +namespace NadekoBot.Migrations +{ + [DbContext(typeof(NadekoContext))] + [Migration("20171016091343_remove-convertunits")] + partial class removeconvertunits + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452"); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Action"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Seconds"); + + b.Property("UserThreshold"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiRaidSetting"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AntiSpamSettingId"); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.HasKey("Id"); + + b.HasIndex("AntiSpamSettingId"); + + b.ToTable("AntiSpamIgnore"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Action"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("MessageThreshold"); + + b.Property("MuteTime"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiSpamSetting"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("ItemId"); + + b.Property("Type"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("BlacklistItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("BotConfigId1"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.HasIndex("BotConfigId1"); + + b.ToTable("BlockedCmdOrMdl"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BetflipMultiplier"); + + b.Property("Betroll100Multiplier"); + + b.Property("Betroll67Multiplier"); + + b.Property("Betroll91Multiplier"); + + b.Property("BufferSize"); + + b.Property("CurrencyDropAmount"); + + b.Property("CurrencyDropAmountMax"); + + b.Property("CurrencyGenerationChance"); + + b.Property("CurrencyGenerationCooldown"); + + b.Property("CurrencyName"); + + b.Property("CurrencyPluralName"); + + b.Property("CurrencySign"); + + b.Property("CustomReactionsStartWith"); + + b.Property("DMHelpString"); + + b.Property("DateAdded"); + + b.Property("DefaultPrefix"); + + b.Property("ErrorColor"); + + b.Property("ForwardMessages"); + + b.Property("ForwardToAllOwners"); + + b.Property("HelpString"); + + b.Property("Locale"); + + b.Property("MigrationVersion"); + + b.Property("MinimumBetAmount"); + + b.Property("OkColor"); + + b.Property("PermissionVersion"); + + b.Property("RemindMessageFormat"); + + b.Property("RotatingStatuses"); + + b.Property("TriviaCurrencyReward"); + + b.Property("XpMinutesTimeout") + .ValueGeneratedOnAdd() + .HasDefaultValue(5); + + b.Property("XpPerMessage") + .ValueGeneratedOnAdd() + .HasDefaultValue(3); + + b.HasKey("Id"); + + b.ToTable("BotConfig"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => + { + b.Property("ClubId"); + + b.Property("UserId"); + + b.HasKey("ClubId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("ClubApplicants"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => + { + b.Property("ClubId"); + + b.Property("UserId"); + + b.HasKey("ClubId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("ClubBans"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Discrim"); + + b.Property("ImageUrl"); + + b.Property("MinimumLevelReq"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20); + + b.Property("OwnerId"); + + b.Property("Xp"); + + b.HasKey("Id"); + + b.HasAlternateKey("Name", "Discrim"); + + b.HasIndex("OwnerId") + .IsUnique(); + + b.ToTable("Clubs"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Mapping"); + + b.Property("Trigger"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("CommandAlias"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("CommandName"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Seconds"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("CommandCooldown"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("CommandName"); + + b.Property("DateAdded"); + + b.Property("Price"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.HasIndex("Price") + .IsUnique(); + + b.ToTable("CommandPrice"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("Currency"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("Reason"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.ToTable("CurrencyTransactions"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AutoDeleteTrigger"); + + b.Property("ContainsAnywhere"); + + b.Property("DateAdded"); + + b.Property("DmResponse"); + + b.Property("GuildId"); + + b.Property("IsRegex"); + + b.Property("OwnerOnly"); + + b.Property("Response"); + + b.Property("Trigger"); + + b.HasKey("Id"); + + b.ToTable("CustomReactions"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AvatarId"); + + b.Property("ClubId"); + + b.Property("DateAdded"); + + b.Property("Discriminator"); + + b.Property("IsClubAdmin"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 305, DateTimeKind.Local)); + + b.Property("LastXpGain"); + + b.Property("NotifyOnLevelUp"); + + b.Property("TotalXp"); + + b.Property("UserId"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasAlternateKey("UserId"); + + b.HasIndex("ClubId"); + + b.ToTable("DiscordUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("Donators"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Text"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("EightBallResponses"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("ItemId"); + + b.Property("ItemType"); + + b.Property("XpSettingsId"); + + b.HasKey("Id"); + + b.HasIndex("XpSettingsId"); + + b.ToTable("ExcludedItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Url") + .IsRequired(); + + b.HasKey("Id"); + + b.HasAlternateKey("GuildConfigId", "Url"); + + b.ToTable("FeedSub"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildConfigId1"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.HasIndex("GuildConfigId1"); + + b.ToTable("FilterChannelId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Word"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FilteredWord"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildId"); + + b.Property("Type"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FollowedStream"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("GCChannelId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AutoAssignRoleId"); + + b.Property("AutoDeleteByeMessages"); + + b.Property("AutoDeleteByeMessagesTimer"); + + b.Property("AutoDeleteGreetMessages"); + + b.Property("AutoDeleteGreetMessagesTimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages"); + + b.Property("ByeMessageChannelId"); + + b.Property("ChannelByeMessageText"); + + b.Property("ChannelGreetMessageText"); + + b.Property("CleverbotEnabled"); + + b.Property("DateAdded"); + + b.Property("DefaultMusicVolume"); + + b.Property("DeleteMessageOnCommand"); + + b.Property("DmGreetMessageText"); + + b.Property("ExclusiveSelfAssignedRoles"); + + b.Property("FilterInvites"); + + b.Property("FilterWords"); + + b.Property("GameVoiceChannel"); + + b.Property("GreetMessageChannelId"); + + b.Property("GuildId"); + + b.Property("Locale"); + + b.Property("LogSettingId"); + + b.Property("MuteRoleName"); + + b.Property("PermissionRole"); + + b.Property("Prefix"); + + b.Property("RootPermissionId"); + + b.Property("SendChannelByeMessage"); + + b.Property("SendChannelGreetMessage"); + + b.Property("SendDmGreetMessage"); + + b.Property("TimeZoneId"); + + b.Property("VerboseErrors"); + + b.Property("VerbosePermissions"); + + b.Property("VoicePlusTextEnabled"); + + b.Property("WarningsInitialized"); + + b.HasKey("Id"); + + b.HasIndex("GuildId") + .IsUnique(); + + b.HasIndex("LogSettingId"); + + b.HasIndex("RootPermissionId"); + + b.ToTable("GuildConfigs"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildId"); + + b.Property("Interval"); + + b.Property("Message"); + + b.Property("StartTimeOfDay"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("GuildRepeater"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("LogSettingId"); + + b.HasKey("Id"); + + b.HasIndex("LogSettingId"); + + b.ToTable("IgnoredLogChannels"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("LogSettingId"); + + b.HasKey("Id"); + + b.HasIndex("LogSettingId"); + + b.ToTable("IgnoredVoicePresenceCHannels"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LoadedPackage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("LoadedPackages"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelCreated"); + + b.Property("ChannelCreatedId"); + + b.Property("ChannelDestroyed"); + + b.Property("ChannelDestroyedId"); + + b.Property("ChannelId"); + + b.Property("ChannelUpdated"); + + b.Property("ChannelUpdatedId"); + + b.Property("DateAdded"); + + b.Property("IsLogging"); + + b.Property("LogOtherId"); + + b.Property("LogUserPresence"); + + b.Property("LogUserPresenceId"); + + b.Property("LogVoicePresence"); + + b.Property("LogVoicePresenceId"); + + b.Property("LogVoicePresenceTTSId"); + + b.Property("MessageDeleted"); + + b.Property("MessageDeletedId"); + + b.Property("MessageUpdated"); + + b.Property("MessageUpdatedId"); + + b.Property("UserBanned"); + + b.Property("UserBannedId"); + + b.Property("UserJoined"); + + b.Property("UserJoinedId"); + + b.Property("UserLeft"); + + b.Property("UserLeftId"); + + b.Property("UserMutedId"); + + b.Property("UserPresenceChannelId"); + + b.Property("UserUnbanned"); + + b.Property("UserUnbannedId"); + + b.Property("UserUpdated"); + + b.Property("UserUpdatedId"); + + b.Property("VoicePresenceChannelId"); + + b.HasKey("Id"); + + b.ToTable("LogSettings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Author"); + + b.Property("AuthorId"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.ToTable("MusicPlaylists"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("MutedUserId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Tag"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("NsfwBlacklitedTag"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("NextId"); + + b.Property("PrimaryTarget"); + + b.Property("PrimaryTargetId"); + + b.Property("SecondaryTarget"); + + b.Property("SecondaryTargetName"); + + b.Property("State"); + + b.HasKey("Id"); + + b.HasIndex("NextId") + .IsUnique(); + + b.ToTable("Permission"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Index"); + + b.Property("PrimaryTarget"); + + b.Property("PrimaryTargetId"); + + b.Property("SecondaryTarget"); + + b.Property("SecondaryTargetName"); + + b.Property("State"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("Permissionv2"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Status"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("PlayingStatus"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("MusicPlaylistId"); + + b.Property("Provider"); + + b.Property("ProviderType"); + + b.Property("Query"); + + b.Property("Title"); + + b.Property("Uri"); + + b.HasKey("Id"); + + b.HasIndex("MusicPlaylistId"); + + b.ToTable("PlaylistSong"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("AuthorName") + .IsRequired(); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("Keyword") + .IsRequired(); + + b.Property("Text") + .IsRequired(); + + b.HasKey("Id"); + + b.ToTable("Quotes"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Icon"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("RaceAnimals"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("IsPrivate"); + + b.Property("Message"); + + b.Property("ServerId"); + + b.Property("UserId"); + + b.Property("When"); + + b.HasKey("Id"); + + b.ToTable("Reminders"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AmountRewardedThisMonth"); + + b.Property("DateAdded"); + + b.Property("LastReward"); + + b.Property("PatreonUserId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("RewardedUsers"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("RoleId"); + + b.HasKey("Id"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique(); + + b.ToTable("SelfAssignableRoles"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Index"); + + b.Property("Name"); + + b.Property("Price"); + + b.Property("RoleId"); + + b.Property("RoleName"); + + b.Property("Type"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("ShopEntry"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("ShopEntryId"); + + b.Property("Text"); + + b.HasKey("Id"); + + b.HasIndex("ShopEntryId"); + + b.ToTable("ShopEntryItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("RoleId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("SlowmodeIgnoredRole"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("SlowmodeIgnoredUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("ChannelId"); + + b.Property("ChannelName"); + + b.Property("CommandText"); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("GuildName"); + + b.Property("Index"); + + b.Property("VoiceChannelId"); + + b.Property("VoiceChannelName"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("StartupCommand"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("StreamRoleSettingsId"); + + b.Property("UserId"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasIndex("StreamRoleSettingsId"); + + b.ToTable("StreamRoleBlacklistedUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AddRoleId"); + + b.Property("DateAdded"); + + b.Property("Enabled"); + + b.Property("FromRoleId"); + + b.Property("GuildConfigId"); + + b.Property("Keyword"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("StreamRoleSettings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("StreamRoleSettingsId"); + + b.Property("UserId"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasIndex("StreamRoleSettingsId"); + + b.ToTable("StreamRoleWhitelistedUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UnmuteAt"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("UnmuteTimer"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("UserId"); + + b.Property("type"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("PokeGame"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AwardedXp"); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); + + b.Property("NotifyOnLevelUp"); + + b.Property("UserId"); + + b.Property("Xp"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "GuildId") + .IsUnique(); + + b.ToTable("UserXpStats"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("RoleId"); + + b.Property("VoiceChannelId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("VcRoleInfo"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AffinityId"); + + b.Property("ClaimerId"); + + b.Property("DateAdded"); + + b.Property("Price"); + + b.Property("WaifuId"); + + b.HasKey("Id"); + + b.HasIndex("AffinityId"); + + b.HasIndex("ClaimerId"); + + b.HasIndex("WaifuId") + .IsUnique(); + + b.ToTable("WaifuInfo"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Item"); + + b.Property("ItemEmoji"); + + b.Property("Price"); + + b.Property("WaifuInfoId"); + + b.HasKey("Id"); + + b.HasIndex("WaifuInfoId"); + + b.ToTable("WaifuItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("NewId"); + + b.Property("OldId"); + + b.Property("UpdateType"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("NewId"); + + b.HasIndex("OldId"); + + b.HasIndex("UserId"); + + b.ToTable("WaifuUpdates"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Forgiven"); + + b.Property("ForgivenBy"); + + b.Property("GuildId"); + + b.Property("Moderator"); + + b.Property("Reason"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.ToTable("Warnings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Count"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Punishment"); + + b.Property("Time"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("WarningPunishment"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Level"); + + b.Property("RoleId"); + + b.Property("XpSettingsId"); + + b.HasKey("Id"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique(); + + b.ToTable("XpRoleReward"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("NotifyMessage"); + + b.Property("ServerExcluded"); + + b.Property("XpRoleRewardExclusive"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("XpSettings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("Blacklist") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("BlockedCommands") + .HasForeignKey("BotConfigId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("BlockedModules") + .HasForeignKey("BotConfigId1"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("CommandPrices") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") + .WithMany("Users") + .HasForeignKey("ClubId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("EightBallResponses") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId1"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") + .WithMany() + .HasForeignKey("RootPermissionId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("GuildRepeaters") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("IgnoredChannels") + .HasForeignKey("LogSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("IgnoredVoicePresenceChannelIds") + .HasForeignKey("LogSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LoadedPackage", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("LoadedPackages") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("NsfwBlacklistedTags") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") + .WithOne("Previous") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("Permissions") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("RotatingStatusMessages") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("RaceAnimals") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") + .WithMany("Items") + .HasForeignKey("ShopEntryId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("StartupCommands") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/NadekoBot.Core/Migrations/20171016091343_remove-convertunits.cs b/NadekoBot.Core/Migrations/20171016091343_remove-convertunits.cs new file mode 100644 index 00000000..e7c85be2 --- /dev/null +++ b/NadekoBot.Core/Migrations/20171016091343_remove-convertunits.cs @@ -0,0 +1,34 @@ +using Microsoft.EntityFrameworkCore.Migrations; +using System; +using System.Collections.Generic; + +namespace NadekoBot.Migrations +{ + public partial class removeconvertunits : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "ConversionUnits"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "ConversionUnits", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + DateAdded = table.Column(nullable: true), + InternalTrigger = table.Column(nullable: true), + Modifier = table.Column(nullable: false), + UnitType = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ConversionUnits", x => x.Id); + }); + } + } +} diff --git a/NadekoBot.Core/Migrations/20171021092614_tesar-grouping.Designer.cs b/NadekoBot.Core/Migrations/20171021092614_tesar-grouping.Designer.cs new file mode 100644 index 00000000..39ec6ae2 --- /dev/null +++ b/NadekoBot.Core/Migrations/20171021092614_tesar-grouping.Designer.cs @@ -0,0 +1,1911 @@ +// +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Internal; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; +using System; + +namespace NadekoBot.Migrations +{ + [DbContext(typeof(NadekoContext))] + [Migration("20171021092614_tesar-grouping")] + partial class tesargrouping + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452"); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Action"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Seconds"); + + b.Property("UserThreshold"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiRaidSetting"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AntiSpamSettingId"); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.HasKey("Id"); + + b.HasIndex("AntiSpamSettingId"); + + b.ToTable("AntiSpamIgnore"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Action"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("MessageThreshold"); + + b.Property("MuteTime"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiSpamSetting"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("ItemId"); + + b.Property("Type"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("BlacklistItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("BotConfigId1"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.HasIndex("BotConfigId1"); + + b.ToTable("BlockedCmdOrMdl"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BetflipMultiplier"); + + b.Property("Betroll100Multiplier"); + + b.Property("Betroll67Multiplier"); + + b.Property("Betroll91Multiplier"); + + b.Property("BufferSize"); + + b.Property("CurrencyDropAmount"); + + b.Property("CurrencyDropAmountMax"); + + b.Property("CurrencyGenerationChance"); + + b.Property("CurrencyGenerationCooldown"); + + b.Property("CurrencyName"); + + b.Property("CurrencyPluralName"); + + b.Property("CurrencySign"); + + b.Property("CustomReactionsStartWith"); + + b.Property("DMHelpString"); + + b.Property("DateAdded"); + + b.Property("DefaultPrefix"); + + b.Property("ErrorColor"); + + b.Property("ForwardMessages"); + + b.Property("ForwardToAllOwners"); + + b.Property("HelpString"); + + b.Property("Locale"); + + b.Property("MigrationVersion"); + + b.Property("MinimumBetAmount"); + + b.Property("OkColor"); + + b.Property("PermissionVersion"); + + b.Property("RemindMessageFormat"); + + b.Property("RotatingStatuses"); + + b.Property("TriviaCurrencyReward"); + + b.Property("XpMinutesTimeout") + .ValueGeneratedOnAdd() + .HasDefaultValue(5); + + b.Property("XpPerMessage") + .ValueGeneratedOnAdd() + .HasDefaultValue(3); + + b.HasKey("Id"); + + b.ToTable("BotConfig"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => + { + b.Property("ClubId"); + + b.Property("UserId"); + + b.HasKey("ClubId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("ClubApplicants"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => + { + b.Property("ClubId"); + + b.Property("UserId"); + + b.HasKey("ClubId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("ClubBans"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Discrim"); + + b.Property("ImageUrl"); + + b.Property("MinimumLevelReq"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20); + + b.Property("OwnerId"); + + b.Property("Xp"); + + b.HasKey("Id"); + + b.HasAlternateKey("Name", "Discrim"); + + b.HasIndex("OwnerId") + .IsUnique(); + + b.ToTable("Clubs"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Mapping"); + + b.Property("Trigger"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("CommandAlias"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("CommandName"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Seconds"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("CommandCooldown"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("CommandName"); + + b.Property("DateAdded"); + + b.Property("Price"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.HasIndex("Price") + .IsUnique(); + + b.ToTable("CommandPrice"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("Currency"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("Reason"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.ToTable("CurrencyTransactions"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AutoDeleteTrigger"); + + b.Property("ContainsAnywhere"); + + b.Property("DateAdded"); + + b.Property("DmResponse"); + + b.Property("GuildId"); + + b.Property("IsRegex"); + + b.Property("OwnerOnly"); + + b.Property("Response"); + + b.Property("Trigger"); + + b.HasKey("Id"); + + b.ToTable("CustomReactions"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AvatarId"); + + b.Property("ClubId"); + + b.Property("DateAdded"); + + b.Property("Discriminator"); + + b.Property("IsClubAdmin"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 305, DateTimeKind.Local)); + + b.Property("LastXpGain"); + + b.Property("NotifyOnLevelUp"); + + b.Property("TotalXp"); + + b.Property("UserId"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasAlternateKey("UserId"); + + b.HasIndex("ClubId"); + + b.ToTable("DiscordUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("Donators"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Text"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("EightBallResponses"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("ItemId"); + + b.Property("ItemType"); + + b.Property("XpSettingsId"); + + b.HasKey("Id"); + + b.HasIndex("XpSettingsId"); + + b.ToTable("ExcludedItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Url") + .IsRequired(); + + b.HasKey("Id"); + + b.HasAlternateKey("GuildConfigId", "Url"); + + b.ToTable("FeedSub"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildConfigId1"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.HasIndex("GuildConfigId1"); + + b.ToTable("FilterChannelId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Word"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FilteredWord"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildId"); + + b.Property("Type"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FollowedStream"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("GCChannelId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AutoAssignRoleId"); + + b.Property("AutoDeleteByeMessages"); + + b.Property("AutoDeleteByeMessagesTimer"); + + b.Property("AutoDeleteGreetMessages"); + + b.Property("AutoDeleteGreetMessagesTimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages"); + + b.Property("ByeMessageChannelId"); + + b.Property("ChannelByeMessageText"); + + b.Property("ChannelGreetMessageText"); + + b.Property("CleverbotEnabled"); + + b.Property("DateAdded"); + + b.Property("DefaultMusicVolume"); + + b.Property("DeleteMessageOnCommand"); + + b.Property("DmGreetMessageText"); + + b.Property("ExclusiveSelfAssignedRoles"); + + b.Property("FilterInvites"); + + b.Property("FilterWords"); + + b.Property("GameVoiceChannel"); + + b.Property("GreetMessageChannelId"); + + b.Property("GuildId"); + + b.Property("Locale"); + + b.Property("LogSettingId"); + + b.Property("MuteRoleName"); + + b.Property("PermissionRole"); + + b.Property("Prefix"); + + b.Property("RootPermissionId"); + + b.Property("SendChannelByeMessage"); + + b.Property("SendChannelGreetMessage"); + + b.Property("SendDmGreetMessage"); + + b.Property("TimeZoneId"); + + b.Property("VerboseErrors"); + + b.Property("VerbosePermissions"); + + b.Property("VoicePlusTextEnabled"); + + b.Property("WarningsInitialized"); + + b.HasKey("Id"); + + b.HasIndex("GuildId") + .IsUnique(); + + b.HasIndex("LogSettingId"); + + b.HasIndex("RootPermissionId"); + + b.ToTable("GuildConfigs"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildId"); + + b.Property("Interval"); + + b.Property("Message"); + + b.Property("StartTimeOfDay"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("GuildRepeater"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("LogSettingId"); + + b.HasKey("Id"); + + b.HasIndex("LogSettingId"); + + b.ToTable("IgnoredLogChannels"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("LogSettingId"); + + b.HasKey("Id"); + + b.HasIndex("LogSettingId"); + + b.ToTable("IgnoredVoicePresenceCHannels"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LoadedPackage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("LoadedPackages"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelCreated"); + + b.Property("ChannelCreatedId"); + + b.Property("ChannelDestroyed"); + + b.Property("ChannelDestroyedId"); + + b.Property("ChannelId"); + + b.Property("ChannelUpdated"); + + b.Property("ChannelUpdatedId"); + + b.Property("DateAdded"); + + b.Property("IsLogging"); + + b.Property("LogOtherId"); + + b.Property("LogUserPresence"); + + b.Property("LogUserPresenceId"); + + b.Property("LogVoicePresence"); + + b.Property("LogVoicePresenceId"); + + b.Property("LogVoicePresenceTTSId"); + + b.Property("MessageDeleted"); + + b.Property("MessageDeletedId"); + + b.Property("MessageUpdated"); + + b.Property("MessageUpdatedId"); + + b.Property("UserBanned"); + + b.Property("UserBannedId"); + + b.Property("UserJoined"); + + b.Property("UserJoinedId"); + + b.Property("UserLeft"); + + b.Property("UserLeftId"); + + b.Property("UserMutedId"); + + b.Property("UserPresenceChannelId"); + + b.Property("UserUnbanned"); + + b.Property("UserUnbannedId"); + + b.Property("UserUpdated"); + + b.Property("UserUpdatedId"); + + b.Property("VoicePresenceChannelId"); + + b.HasKey("Id"); + + b.ToTable("LogSettings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Author"); + + b.Property("AuthorId"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.ToTable("MusicPlaylists"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("MutedUserId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Tag"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("NsfwBlacklitedTag"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("NextId"); + + b.Property("PrimaryTarget"); + + b.Property("PrimaryTargetId"); + + b.Property("SecondaryTarget"); + + b.Property("SecondaryTargetName"); + + b.Property("State"); + + b.HasKey("Id"); + + b.HasIndex("NextId") + .IsUnique(); + + b.ToTable("Permission"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Index"); + + b.Property("PrimaryTarget"); + + b.Property("PrimaryTargetId"); + + b.Property("SecondaryTarget"); + + b.Property("SecondaryTargetName"); + + b.Property("State"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("Permissionv2"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Status"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("PlayingStatus"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("MusicPlaylistId"); + + b.Property("Provider"); + + b.Property("ProviderType"); + + b.Property("Query"); + + b.Property("Title"); + + b.Property("Uri"); + + b.HasKey("Id"); + + b.HasIndex("MusicPlaylistId"); + + b.ToTable("PlaylistSong"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("AuthorName") + .IsRequired(); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("Keyword") + .IsRequired(); + + b.Property("Text") + .IsRequired(); + + b.HasKey("Id"); + + b.ToTable("Quotes"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Icon"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("RaceAnimals"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("IsPrivate"); + + b.Property("Message"); + + b.Property("ServerId"); + + b.Property("UserId"); + + b.Property("When"); + + b.HasKey("Id"); + + b.ToTable("Reminders"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AmountRewardedThisMonth"); + + b.Property("DateAdded"); + + b.Property("LastReward"); + + b.Property("PatreonUserId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("RewardedUsers"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasDefaultValue(0); + + b.Property("GuildId"); + + b.Property("RoleId"); + + b.HasKey("Id"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique(); + + b.ToTable("SelfAssignableRoles"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Index"); + + b.Property("Name"); + + b.Property("Price"); + + b.Property("RoleId"); + + b.Property("RoleName"); + + b.Property("Type"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("ShopEntry"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("ShopEntryId"); + + b.Property("Text"); + + b.HasKey("Id"); + + b.HasIndex("ShopEntryId"); + + b.ToTable("ShopEntryItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("RoleId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("SlowmodeIgnoredRole"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("SlowmodeIgnoredUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("ChannelId"); + + b.Property("ChannelName"); + + b.Property("CommandText"); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("GuildName"); + + b.Property("Index"); + + b.Property("VoiceChannelId"); + + b.Property("VoiceChannelName"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("StartupCommand"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("StreamRoleSettingsId"); + + b.Property("UserId"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasIndex("StreamRoleSettingsId"); + + b.ToTable("StreamRoleBlacklistedUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AddRoleId"); + + b.Property("DateAdded"); + + b.Property("Enabled"); + + b.Property("FromRoleId"); + + b.Property("GuildConfigId"); + + b.Property("Keyword"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("StreamRoleSettings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("StreamRoleSettingsId"); + + b.Property("UserId"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasIndex("StreamRoleSettingsId"); + + b.ToTable("StreamRoleWhitelistedUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UnmuteAt"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("UnmuteTimer"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("UserId"); + + b.Property("type"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("PokeGame"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AwardedXp"); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); + + b.Property("NotifyOnLevelUp"); + + b.Property("UserId"); + + b.Property("Xp"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "GuildId") + .IsUnique(); + + b.ToTable("UserXpStats"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("RoleId"); + + b.Property("VoiceChannelId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("VcRoleInfo"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AffinityId"); + + b.Property("ClaimerId"); + + b.Property("DateAdded"); + + b.Property("Price"); + + b.Property("WaifuId"); + + b.HasKey("Id"); + + b.HasIndex("AffinityId"); + + b.HasIndex("ClaimerId"); + + b.HasIndex("WaifuId") + .IsUnique(); + + b.ToTable("WaifuInfo"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Item"); + + b.Property("ItemEmoji"); + + b.Property("Price"); + + b.Property("WaifuInfoId"); + + b.HasKey("Id"); + + b.HasIndex("WaifuInfoId"); + + b.ToTable("WaifuItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("NewId"); + + b.Property("OldId"); + + b.Property("UpdateType"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("NewId"); + + b.HasIndex("OldId"); + + b.HasIndex("UserId"); + + b.ToTable("WaifuUpdates"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Forgiven"); + + b.Property("ForgivenBy"); + + b.Property("GuildId"); + + b.Property("Moderator"); + + b.Property("Reason"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.ToTable("Warnings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Count"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Punishment"); + + b.Property("Time"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("WarningPunishment"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Level"); + + b.Property("RoleId"); + + b.Property("XpSettingsId"); + + b.HasKey("Id"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique(); + + b.ToTable("XpRoleReward"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("NotifyMessage"); + + b.Property("ServerExcluded"); + + b.Property("XpRoleRewardExclusive"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("XpSettings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("Blacklist") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("BlockedCommands") + .HasForeignKey("BotConfigId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("BlockedModules") + .HasForeignKey("BotConfigId1"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("CommandPrices") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") + .WithMany("Users") + .HasForeignKey("ClubId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("EightBallResponses") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId1"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") + .WithMany() + .HasForeignKey("RootPermissionId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("GuildRepeaters") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("IgnoredChannels") + .HasForeignKey("LogSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("IgnoredVoicePresenceChannelIds") + .HasForeignKey("LogSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LoadedPackage", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("LoadedPackages") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("NsfwBlacklistedTags") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") + .WithOne("Previous") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("Permissions") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("RotatingStatusMessages") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("RaceAnimals") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") + .WithMany("Items") + .HasForeignKey("ShopEntryId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("StartupCommands") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/NadekoBot.Core/Migrations/20171021092614_tesar-grouping.cs b/NadekoBot.Core/Migrations/20171021092614_tesar-grouping.cs new file mode 100644 index 00000000..03990456 --- /dev/null +++ b/NadekoBot.Core/Migrations/20171021092614_tesar-grouping.cs @@ -0,0 +1,27 @@ +using Microsoft.EntityFrameworkCore.Migrations; +using System; +using System.Collections.Generic; + +namespace NadekoBot.Migrations +{ + public partial class tesargrouping : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Group", + table: "SelfAssignableRoles", + type: "INTEGER", + nullable: false, + defaultValue: 0) + .Annotation("Sqlite:Autoincrement", true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Group", + table: "SelfAssignableRoles"); + } + } +} diff --git a/src/NadekoBot/Migrations/MigrationQueries.cs b/NadekoBot.Core/Migrations/MigrationQueries.cs similarity index 100% rename from src/NadekoBot/Migrations/MigrationQueries.cs rename to NadekoBot.Core/Migrations/MigrationQueries.cs diff --git a/NadekoBot.Core/Migrations/NadekoSqliteContextModelSnapshot.cs b/NadekoBot.Core/Migrations/NadekoSqliteContextModelSnapshot.cs new file mode 100644 index 00000000..5eed0c48 --- /dev/null +++ b/NadekoBot.Core/Migrations/NadekoSqliteContextModelSnapshot.cs @@ -0,0 +1,1910 @@ +// +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Internal; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services.Database.Models; +using System; + +namespace NadekoBot.Migrations +{ + [DbContext(typeof(NadekoContext))] + partial class NadekoSqliteContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452"); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Action"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Seconds"); + + b.Property("UserThreshold"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiRaidSetting"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AntiSpamSettingId"); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.HasKey("Id"); + + b.HasIndex("AntiSpamSettingId"); + + b.ToTable("AntiSpamIgnore"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Action"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("MessageThreshold"); + + b.Property("MuteTime"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("AntiSpamSetting"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("ItemId"); + + b.Property("Type"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("BlacklistItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("BotConfigId1"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.HasIndex("BotConfigId1"); + + b.ToTable("BlockedCmdOrMdl"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BotConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BetflipMultiplier"); + + b.Property("Betroll100Multiplier"); + + b.Property("Betroll67Multiplier"); + + b.Property("Betroll91Multiplier"); + + b.Property("BufferSize"); + + b.Property("CurrencyDropAmount"); + + b.Property("CurrencyDropAmountMax"); + + b.Property("CurrencyGenerationChance"); + + b.Property("CurrencyGenerationCooldown"); + + b.Property("CurrencyName"); + + b.Property("CurrencyPluralName"); + + b.Property("CurrencySign"); + + b.Property("CustomReactionsStartWith"); + + b.Property("DMHelpString"); + + b.Property("DateAdded"); + + b.Property("DefaultPrefix"); + + b.Property("ErrorColor"); + + b.Property("ForwardMessages"); + + b.Property("ForwardToAllOwners"); + + b.Property("HelpString"); + + b.Property("Locale"); + + b.Property("MigrationVersion"); + + b.Property("MinimumBetAmount"); + + b.Property("OkColor"); + + b.Property("PermissionVersion"); + + b.Property("RemindMessageFormat"); + + b.Property("RotatingStatuses"); + + b.Property("TriviaCurrencyReward"); + + b.Property("XpMinutesTimeout") + .ValueGeneratedOnAdd() + .HasDefaultValue(5); + + b.Property("XpPerMessage") + .ValueGeneratedOnAdd() + .HasDefaultValue(3); + + b.HasKey("Id"); + + b.ToTable("BotConfig"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => + { + b.Property("ClubId"); + + b.Property("UserId"); + + b.HasKey("ClubId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("ClubApplicants"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => + { + b.Property("ClubId"); + + b.Property("UserId"); + + b.HasKey("ClubId", "UserId"); + + b.HasIndex("UserId"); + + b.ToTable("ClubBans"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Discrim"); + + b.Property("ImageUrl"); + + b.Property("MinimumLevelReq"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(20); + + b.Property("OwnerId"); + + b.Property("Xp"); + + b.HasKey("Id"); + + b.HasAlternateKey("Name", "Discrim"); + + b.HasIndex("OwnerId") + .IsUnique(); + + b.ToTable("Clubs"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Mapping"); + + b.Property("Trigger"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("CommandAlias"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("CommandName"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Seconds"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("CommandCooldown"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("CommandName"); + + b.Property("DateAdded"); + + b.Property("Price"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.HasIndex("Price") + .IsUnique(); + + b.ToTable("CommandPrice"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Currency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("Currency"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("Reason"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.ToTable("CurrencyTransactions"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CustomReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AutoDeleteTrigger"); + + b.Property("ContainsAnywhere"); + + b.Property("DateAdded"); + + b.Property("DmResponse"); + + b.Property("GuildId"); + + b.Property("IsRegex"); + + b.Property("OwnerOnly"); + + b.Property("Response"); + + b.Property("Trigger"); + + b.HasKey("Id"); + + b.ToTable("CustomReactions"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AvatarId"); + + b.Property("ClubId"); + + b.Property("DateAdded"); + + b.Property("Discriminator"); + + b.Property("IsClubAdmin"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 305, DateTimeKind.Local)); + + b.Property("LastXpGain"); + + b.Property("NotifyOnLevelUp"); + + b.Property("TotalXp"); + + b.Property("UserId"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasAlternateKey("UserId"); + + b.HasIndex("ClubId"); + + b.ToTable("DiscordUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Donator", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("Donators"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Text"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("EightBallResponses"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("ItemId"); + + b.Property("ItemType"); + + b.Property("XpSettingsId"); + + b.HasKey("Id"); + + b.HasIndex("XpSettingsId"); + + b.ToTable("ExcludedItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Url") + .IsRequired(); + + b.HasKey("Id"); + + b.HasAlternateKey("GuildConfigId", "Url"); + + b.ToTable("FeedSub"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildConfigId1"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.HasIndex("GuildConfigId1"); + + b.ToTable("FilterChannelId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Word"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FilteredWord"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildId"); + + b.Property("Type"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FollowedStream"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("GCChannelId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AutoAssignRoleId"); + + b.Property("AutoDeleteByeMessages"); + + b.Property("AutoDeleteByeMessagesTimer"); + + b.Property("AutoDeleteGreetMessages"); + + b.Property("AutoDeleteGreetMessagesTimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages"); + + b.Property("ByeMessageChannelId"); + + b.Property("ChannelByeMessageText"); + + b.Property("ChannelGreetMessageText"); + + b.Property("CleverbotEnabled"); + + b.Property("DateAdded"); + + b.Property("DefaultMusicVolume"); + + b.Property("DeleteMessageOnCommand"); + + b.Property("DmGreetMessageText"); + + b.Property("ExclusiveSelfAssignedRoles"); + + b.Property("FilterInvites"); + + b.Property("FilterWords"); + + b.Property("GameVoiceChannel"); + + b.Property("GreetMessageChannelId"); + + b.Property("GuildId"); + + b.Property("Locale"); + + b.Property("LogSettingId"); + + b.Property("MuteRoleName"); + + b.Property("PermissionRole"); + + b.Property("Prefix"); + + b.Property("RootPermissionId"); + + b.Property("SendChannelByeMessage"); + + b.Property("SendChannelGreetMessage"); + + b.Property("SendDmGreetMessage"); + + b.Property("TimeZoneId"); + + b.Property("VerboseErrors"); + + b.Property("VerbosePermissions"); + + b.Property("VoicePlusTextEnabled"); + + b.Property("WarningsInitialized"); + + b.HasKey("Id"); + + b.HasIndex("GuildId") + .IsUnique(); + + b.HasIndex("LogSettingId"); + + b.HasIndex("RootPermissionId"); + + b.ToTable("GuildConfigs"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("GuildId"); + + b.Property("Interval"); + + b.Property("Message"); + + b.Property("StartTimeOfDay"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("GuildRepeater"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("LogSettingId"); + + b.HasKey("Id"); + + b.HasIndex("LogSettingId"); + + b.ToTable("IgnoredLogChannels"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("LogSettingId"); + + b.HasKey("Id"); + + b.HasIndex("LogSettingId"); + + b.ToTable("IgnoredVoicePresenceCHannels"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LoadedPackage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("LoadedPackages"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelCreated"); + + b.Property("ChannelCreatedId"); + + b.Property("ChannelDestroyed"); + + b.Property("ChannelDestroyedId"); + + b.Property("ChannelId"); + + b.Property("ChannelUpdated"); + + b.Property("ChannelUpdatedId"); + + b.Property("DateAdded"); + + b.Property("IsLogging"); + + b.Property("LogOtherId"); + + b.Property("LogUserPresence"); + + b.Property("LogUserPresenceId"); + + b.Property("LogVoicePresence"); + + b.Property("LogVoicePresenceId"); + + b.Property("LogVoicePresenceTTSId"); + + b.Property("MessageDeleted"); + + b.Property("MessageDeletedId"); + + b.Property("MessageUpdated"); + + b.Property("MessageUpdatedId"); + + b.Property("UserBanned"); + + b.Property("UserBannedId"); + + b.Property("UserJoined"); + + b.Property("UserJoinedId"); + + b.Property("UserLeft"); + + b.Property("UserLeftId"); + + b.Property("UserMutedId"); + + b.Property("UserPresenceChannelId"); + + b.Property("UserUnbanned"); + + b.Property("UserUnbannedId"); + + b.Property("UserUpdated"); + + b.Property("UserUpdatedId"); + + b.Property("VoicePresenceChannelId"); + + b.HasKey("Id"); + + b.ToTable("LogSettings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Author"); + + b.Property("AuthorId"); + + b.Property("DateAdded"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.ToTable("MusicPlaylists"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("MutedUserId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Tag"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("NsfwBlacklitedTag"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("NextId"); + + b.Property("PrimaryTarget"); + + b.Property("PrimaryTargetId"); + + b.Property("SecondaryTarget"); + + b.Property("SecondaryTargetName"); + + b.Property("State"); + + b.HasKey("Id"); + + b.HasIndex("NextId") + .IsUnique(); + + b.ToTable("Permission"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Index"); + + b.Property("PrimaryTarget"); + + b.Property("PrimaryTargetId"); + + b.Property("SecondaryTarget"); + + b.Property("SecondaryTargetName"); + + b.Property("State"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("Permissionv2"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Status"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("PlayingStatus"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("MusicPlaylistId"); + + b.Property("Provider"); + + b.Property("ProviderType"); + + b.Property("Query"); + + b.Property("Title"); + + b.Property("Uri"); + + b.HasKey("Id"); + + b.HasIndex("MusicPlaylistId"); + + b.ToTable("PlaylistSong"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("AuthorName") + .IsRequired(); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("Keyword") + .IsRequired(); + + b.Property("Text") + .IsRequired(); + + b.HasKey("Id"); + + b.ToTable("Quotes"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("DateAdded"); + + b.Property("Icon"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("RaceAnimals"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("DateAdded"); + + b.Property("IsPrivate"); + + b.Property("Message"); + + b.Property("ServerId"); + + b.Property("UserId"); + + b.Property("When"); + + b.HasKey("Id"); + + b.ToTable("Reminders"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RewardedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AmountRewardedThisMonth"); + + b.Property("DateAdded"); + + b.Property("LastReward"); + + b.Property("PatreonUserId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("RewardedUsers"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Group") + .ValueGeneratedOnAdd() + .HasDefaultValue(0); + + b.Property("GuildId"); + + b.Property("RoleId"); + + b.HasKey("Id"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique(); + + b.ToTable("SelfAssignableRoles"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Index"); + + b.Property("Name"); + + b.Property("Price"); + + b.Property("RoleId"); + + b.Property("RoleName"); + + b.Property("Type"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("ShopEntry"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("ShopEntryId"); + + b.Property("Text"); + + b.HasKey("Id"); + + b.HasIndex("ShopEntryId"); + + b.ToTable("ShopEntryItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("RoleId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("SlowmodeIgnoredRole"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("SlowmodeIgnoredUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("ChannelId"); + + b.Property("ChannelName"); + + b.Property("CommandText"); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("GuildName"); + + b.Property("Index"); + + b.Property("VoiceChannelId"); + + b.Property("VoiceChannelName"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("StartupCommand"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("StreamRoleSettingsId"); + + b.Property("UserId"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasIndex("StreamRoleSettingsId"); + + b.ToTable("StreamRoleBlacklistedUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AddRoleId"); + + b.Property("DateAdded"); + + b.Property("Enabled"); + + b.Property("FromRoleId"); + + b.Property("GuildConfigId"); + + b.Property("Keyword"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("StreamRoleSettings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("StreamRoleSettingsId"); + + b.Property("UserId"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasIndex("StreamRoleSettingsId"); + + b.ToTable("StreamRoleWhitelistedUser"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("UnmuteAt"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("UnmuteTimer"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserPokeTypes", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("UserId"); + + b.Property("type"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("PokeGame"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UserXpStats", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AwardedXp"); + + b.Property("DateAdded"); + + b.Property("GuildId"); + + b.Property("LastLevelUp") + .ValueGeneratedOnAdd() + .HasDefaultValue(new DateTime(2017, 9, 21, 20, 53, 13, 307, DateTimeKind.Local)); + + b.Property("NotifyOnLevelUp"); + + b.Property("UserId"); + + b.Property("Xp"); + + b.HasKey("Id"); + + b.HasIndex("UserId", "GuildId") + .IsUnique(); + + b.ToTable("UserXpStats"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("RoleId"); + + b.Property("VoiceChannelId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("VcRoleInfo"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AffinityId"); + + b.Property("ClaimerId"); + + b.Property("DateAdded"); + + b.Property("Price"); + + b.Property("WaifuId"); + + b.HasKey("Id"); + + b.HasIndex("AffinityId"); + + b.HasIndex("ClaimerId"); + + b.HasIndex("WaifuId") + .IsUnique(); + + b.ToTable("WaifuInfo"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Item"); + + b.Property("ItemEmoji"); + + b.Property("Price"); + + b.Property("WaifuInfoId"); + + b.HasKey("Id"); + + b.HasIndex("WaifuInfoId"); + + b.ToTable("WaifuItem"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("NewId"); + + b.Property("OldId"); + + b.Property("UpdateType"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("NewId"); + + b.HasIndex("OldId"); + + b.HasIndex("UserId"); + + b.ToTable("WaifuUpdates"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Warning", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Forgiven"); + + b.Property("ForgivenBy"); + + b.Property("GuildId"); + + b.Property("Moderator"); + + b.Property("Reason"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.ToTable("Warnings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Count"); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("Punishment"); + + b.Property("Time"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("WarningPunishment"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("Level"); + + b.Property("RoleId"); + + b.Property("XpSettingsId"); + + b.HasKey("Id"); + + b.HasIndex("XpSettingsId", "Level") + .IsUnique(); + + b.ToTable("XpRoleReward"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateAdded"); + + b.Property("GuildConfigId"); + + b.Property("NotifyMessage"); + + b.Property("ServerExcluded"); + + b.Property("XpRoleRewardExclusive"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId") + .IsUnique(); + + b.ToTable("XpSettings"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiRaidSetting") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiRaidSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamIgnore", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.AntiSpamSetting") + .WithMany("IgnoredChannels") + .HasForeignKey("AntiSpamSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("AntiSpamSetting") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.AntiSpamSetting", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlacklistItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("Blacklist") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.BlockedCmdOrMdl", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("BlockedCommands") + .HasForeignKey("BotConfigId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("BlockedModules") + .HasForeignKey("BotConfigId1"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubApplicants", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") + .WithMany("Applicants") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubBans", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") + .WithMany("Bans") + .HasForeignKey("ClubId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ClubInfo", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Owner") + .WithOne() + .HasForeignKey("NadekoBot.Core.Services.Database.Models.ClubInfo", "OwnerId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandAlias", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("CommandAliases") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.CommandPrice", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("CommandPrices") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.DiscordUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ClubInfo", "Club") + .WithMany("Users") + .HasForeignKey("ClubId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.EightBallResponse", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("EightBallResponses") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ExcludedItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings") + .WithMany("ExclusionList") + .HasForeignKey("XpSettingsId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FeedSub", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithMany("FeedSubs") + .HasForeignKey("GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId1"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FilteredWord", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.FollowedStream", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GCChannelId", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildConfig", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "RootPermission") + .WithMany() + .HasForeignKey("RootPermissionId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.GuildRepeater", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("GuildRepeaters") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredLogChannel", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("IgnoredChannels") + .HasForeignKey("LogSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("IgnoredVoicePresenceChannelIds") + .HasForeignKey("LogSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.LoadedPackage", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("LoadedPackages") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.MutedUserId", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("MutedUsers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.NsfwBlacklitedTag", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("NsfwBlacklistedTags") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permission", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.Permission", "Next") + .WithOne("Previous") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.Permission", "NextId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.Permissionv2", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("Permissions") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlayingStatus", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("RotatingStatusMessages") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.MusicPlaylist") + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.RaceAnimal", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("RaceAnimals") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntry", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("ShopEntries") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.ShopEntryItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.ShopEntry") + .WithMany("Items") + .HasForeignKey("ShopEntryId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredRole", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("SlowmodeIgnoredRoles") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.SlowmodeIgnoredUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("SlowmodeIgnoredUsers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StartupCommand", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.BotConfig") + .WithMany("StartupCommands") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleBlacklistedUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") + .WithMany("Blacklist") + .HasForeignKey("StreamRoleSettingsId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("StreamRole") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.StreamRoleSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.StreamRoleWhitelistedUser", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.StreamRoleSettings") + .WithMany("Whitelist") + .HasForeignKey("StreamRoleSettingsId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.UnmuteTimer", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("UnmuteTimers") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.VcRoleInfo", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("VcRoleInfos") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuInfo", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Affinity") + .WithMany() + .HasForeignKey("AffinityId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Claimer") + .WithMany() + .HasForeignKey("ClaimerId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Waifu") + .WithOne() + .HasForeignKey("NadekoBot.Core.Services.Database.Models.WaifuInfo", "WaifuId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuItem", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.WaifuInfo") + .WithMany("Items") + .HasForeignKey("WaifuInfoId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WaifuUpdate", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "New") + .WithMany() + .HasForeignKey("NewId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "Old") + .WithMany() + .HasForeignKey("OldId"); + + b.HasOne("NadekoBot.Core.Services.Database.Models.DiscordUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.WarningPunishment", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig") + .WithMany("WarnPunishments") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpRoleReward", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.XpSettings", "XpSettings") + .WithMany("RoleRewards") + .HasForeignKey("XpSettingsId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Core.Services.Database.Models.XpSettings", b => + { + b.HasOne("NadekoBot.Core.Services.Database.Models.GuildConfig", "GuildConfig") + .WithOne("XpSettings") + .HasForeignKey("NadekoBot.Core.Services.Database.Models.XpSettings", "GuildConfigId") + .OnDelete(DeleteBehavior.Cascade); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/NadekoBot.Core/Modules/Administration/Administration.cs similarity index 99% rename from src/NadekoBot/Modules/Administration/Administration.cs rename to NadekoBot.Core/Modules/Administration/Administration.cs index 5c943b27..9f3c92c9 100644 --- a/src/NadekoBot/Modules/Administration/Administration.cs +++ b/NadekoBot.Core/Modules/Administration/Administration.cs @@ -6,9 +6,9 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; -using NadekoBot.Services; +using NadekoBot.Core.Services; using NadekoBot.Modules.Administration.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Administration { diff --git a/src/NadekoBot/Modules/Administration/AutoAssignRoleCommands.cs b/NadekoBot.Core/Modules/Administration/AutoAssignRoleCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Administration/AutoAssignRoleCommands.cs rename to NadekoBot.Core/Modules/Administration/AutoAssignRoleCommands.cs index 54d2e244..81e1a8d7 100644 --- a/src/NadekoBot/Modules/Administration/AutoAssignRoleCommands.cs +++ b/NadekoBot.Core/Modules/Administration/AutoAssignRoleCommands.cs @@ -1,7 +1,7 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; diff --git a/src/NadekoBot/Modules/Administration/Common/ProtectionStats.cs b/NadekoBot.Core/Modules/Administration/Common/ProtectionStats.cs similarity index 93% rename from src/NadekoBot/Modules/Administration/Common/ProtectionStats.cs rename to NadekoBot.Core/Modules/Administration/Common/ProtectionStats.cs index 6c1a5dea..18ca4d47 100644 --- a/src/NadekoBot/Modules/Administration/Common/ProtectionStats.cs +++ b/NadekoBot.Core/Modules/Administration/Common/ProtectionStats.cs @@ -1,7 +1,7 @@ using System.Collections.Concurrent; using Discord; using NadekoBot.Common.Collections; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Administration.Common { diff --git a/src/NadekoBot/Modules/Administration/Common/Ratelimiter.cs b/NadekoBot.Core/Modules/Administration/Common/Ratelimiter.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Common/Ratelimiter.cs rename to NadekoBot.Core/Modules/Administration/Common/Ratelimiter.cs diff --git a/src/NadekoBot/Modules/Administration/Common/UserSpamStats.cs b/NadekoBot.Core/Modules/Administration/Common/UserSpamStats.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/Common/UserSpamStats.cs rename to NadekoBot.Core/Modules/Administration/Common/UserSpamStats.cs diff --git a/NadekoBot.Core/Modules/Administration/DangerousCommands.cs b/NadekoBot.Core/Modules/Administration/DangerousCommands.cs new file mode 100644 index 00000000..f61a3525 --- /dev/null +++ b/NadekoBot.Core/Modules/Administration/DangerousCommands.cs @@ -0,0 +1,74 @@ +using Discord.Commands; +using Microsoft.EntityFrameworkCore; +using NadekoBot.Common.Attributes; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using System; +using System.Threading.Tasks; + +#if !GLOBAL_NADEKO +namespace NadekoBot.Modules.Administration +{ + public partial class Administration + { + [Group] + [OwnerOnly] + public class DangerousCommands : NadekoSubmodule + { + private readonly DbService _db; + + public DangerousCommands(DbService db) + { + _db = db; + } + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public async Task ExecSql([Remainder]string sql) + { + try + { + int res; + using (var uow = _db.UnitOfWork) + { + res = uow._context.Database.ExecuteSqlCommand(sql); + } + + await Context.Channel.SendConfirmAsync(res.ToString()); + } + catch (Exception ex) + { + await Context.Channel.SendErrorAsync(ex.ToString()); + } + } + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public Task DeleteWaifus() => + ExecSql("DELETE FROM WaifuUpdates; DELETE FROM WaifuInfo;"); + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public Task DeleteCurrency() => + ExecSql("DELETE FROM Currency; DELETE FROM CurrencyTransactions;"); + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public Task DeletePlaylists() => + ExecSql("DELETE FROM MusicPlaylists;"); + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public Task DeleteExp() => + ExecSql(@"DELETE FROM UserXpStats; +UPDATE DiscordUser +SET ClubId=NULL, + IsClubAdmin=0, + TotalXp=0; +DELETE FROM ClubApplicants; +DELETE FROM ClubBans; +DELETE FROM Clubs;"); + } + } +} +#endif \ No newline at end of file diff --git a/src/NadekoBot/Modules/Administration/GameChannelCommands.cs b/NadekoBot.Core/Modules/Administration/GameChannelCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Administration/GameChannelCommands.cs rename to NadekoBot.Core/Modules/Administration/GameChannelCommands.cs index 647874a6..81ad7396 100644 --- a/src/NadekoBot/Modules/Administration/GameChannelCommands.cs +++ b/NadekoBot.Core/Modules/Administration/GameChannelCommands.cs @@ -1,6 +1,6 @@ using Discord; using Discord.Commands; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Administration.Services; diff --git a/src/NadekoBot/Modules/Administration/LocalizationCommands.cs b/NadekoBot.Core/Modules/Administration/LocalizationCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/LocalizationCommands.cs rename to NadekoBot.Core/Modules/Administration/LocalizationCommands.cs diff --git a/src/NadekoBot/Modules/Administration/LogCommands.cs b/NadekoBot.Core/Modules/Administration/LogCommands.cs similarity index 87% rename from src/NadekoBot/Modules/Administration/LogCommands.cs rename to NadekoBot.Core/Modules/Administration/LogCommands.cs index c3415246..2738a5de 100644 --- a/src/NadekoBot/Modules/Administration/LogCommands.cs +++ b/NadekoBot.Core/Modules/Administration/LogCommands.cs @@ -1,8 +1,8 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Linq; using System.Threading.Tasks; @@ -124,49 +124,49 @@ namespace NadekoBot.Modules.Administration switch (type) { case LogType.Other: - channelId = logSetting.LogOtherId = (logSetting.LogOtherId == null ? channel.Id : default); + channelId = logSetting.LogOtherId = (logSetting.LogOtherId == null ? (ulong?)channel.Id : default); break; case LogType.MessageUpdated: - channelId = logSetting.MessageUpdatedId = (logSetting.MessageUpdatedId == null ? channel.Id : default); + channelId = logSetting.MessageUpdatedId = (logSetting.MessageUpdatedId == null ? (ulong?)channel.Id : default); break; case LogType.MessageDeleted: - channelId = logSetting.MessageDeletedId = (logSetting.MessageDeletedId == null ? channel.Id : default); + channelId = logSetting.MessageDeletedId = (logSetting.MessageDeletedId == null ? (ulong?)channel.Id : default); break; case LogType.UserJoined: - channelId = logSetting.UserJoinedId = (logSetting.UserJoinedId == null ? channel.Id : default); + channelId = logSetting.UserJoinedId = (logSetting.UserJoinedId == null ? (ulong?)channel.Id : default); break; case LogType.UserLeft: - channelId = logSetting.UserLeftId = (logSetting.UserLeftId == null ? channel.Id : default); + channelId = logSetting.UserLeftId = (logSetting.UserLeftId == null ? (ulong?)channel.Id : default); break; case LogType.UserBanned: - channelId = logSetting.UserBannedId = (logSetting.UserBannedId == null ? channel.Id : default); + channelId = logSetting.UserBannedId = (logSetting.UserBannedId == null ? (ulong?)channel.Id : default); break; case LogType.UserUnbanned: - channelId = logSetting.UserUnbannedId = (logSetting.UserUnbannedId == null ? channel.Id : default); + channelId = logSetting.UserUnbannedId = (logSetting.UserUnbannedId == null ? (ulong?)channel.Id : default); break; case LogType.UserUpdated: - channelId = logSetting.UserUpdatedId = (logSetting.UserUpdatedId == null ? channel.Id : default); + channelId = logSetting.UserUpdatedId = (logSetting.UserUpdatedId == null ? (ulong?)channel.Id : default); break; case LogType.UserMuted: - channelId = logSetting.UserMutedId = (logSetting.UserMutedId == null ? channel.Id : default); + channelId = logSetting.UserMutedId = (logSetting.UserMutedId == null ? (ulong?)channel.Id : default); break; case LogType.ChannelCreated: - channelId = logSetting.ChannelCreatedId = (logSetting.ChannelCreatedId == null ? channel.Id : default); + channelId = logSetting.ChannelCreatedId = (logSetting.ChannelCreatedId == null ? (ulong?)channel.Id : default); break; case LogType.ChannelDestroyed: - channelId = logSetting.ChannelDestroyedId = (logSetting.ChannelDestroyedId == null ? channel.Id : default); + channelId = logSetting.ChannelDestroyedId = (logSetting.ChannelDestroyedId == null ? (ulong?)channel.Id : default); break; case LogType.ChannelUpdated: - channelId = logSetting.ChannelUpdatedId = (logSetting.ChannelUpdatedId == null ? channel.Id : default); + channelId = logSetting.ChannelUpdatedId = (logSetting.ChannelUpdatedId == null ? (ulong?)channel.Id : default); break; case LogType.UserPresence: - channelId = logSetting.LogUserPresenceId = (logSetting.LogUserPresenceId == null ? channel.Id : default); + channelId = logSetting.LogUserPresenceId = (logSetting.LogUserPresenceId == null ? (ulong?)channel.Id : default); break; case LogType.VoicePresence: - channelId = logSetting.LogVoicePresenceId = (logSetting.LogVoicePresenceId == null ? channel.Id : default); + channelId = logSetting.LogVoicePresenceId = (logSetting.LogVoicePresenceId == null ? (ulong?)channel.Id : default); break; case LogType.VoicePresenceTTS: - channelId = logSetting.LogVoicePresenceTTSId = (logSetting.LogVoicePresenceTTSId == null ? channel.Id : default); + channelId = logSetting.LogVoicePresenceTTSId = (logSetting.LogVoicePresenceTTSId == null ? (ulong?)channel.Id : default); break; } diff --git a/NadekoBot.Core/Modules/Administration/ModuleCommands.cs b/NadekoBot.Core/Modules/Administration/ModuleCommands.cs new file mode 100644 index 00000000..251d218c --- /dev/null +++ b/NadekoBot.Core/Modules/Administration/ModuleCommands.cs @@ -0,0 +1,91 @@ +//using Discord.Commands; +//using NadekoBot.Common.Attributes; +//using NadekoBot.Modules.Administration.Services; +//using NadekoBot.Extensions; +//using System; +//using System.IO; +//using System.Reflection; +//using System.Text.RegularExpressions; +//using System.Threading.Tasks; +//using System.Linq; + +//namespace NadekoBot.Modules.Administration +//{ +// public partial class Administration +// { +// [Group] +// public class PackagesCommands : NadekoSubmodule +// { +// private readonly NadekoBot _bot; + +// public PackagesCommands(NadekoBot bot) +// { +// _bot = bot; +// } + +// [NadekoCommand, Usage, Description, Aliases] +// [RequireContext(ContextType.Guild)] +// public async Task PackageList() +// { +// _service.ReloadAvailablePackages(); +// await Context.Channel.SendConfirmAsync( +// string.Join( +// "\n", +// _service.Packages +// .Select(x => _bot.LoadedPackages.Contains(x) +// ? "【✘】" + x +// : "【 】" + x))); +// } + +// [NadekoCommand, Usage, Description, Aliases] +// [RequireContext(ContextType.Guild)] +// [OwnerOnly] +// public async Task PackageUnload(string name) +// { +// if (name.Contains(":") || name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~")) +// return; +// name = name.ToTitleCase(); +// var package = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, +// "modules", +// $"NadekoBot.Modules.{name}", +// $"NadekoBot.Modules.{name}.dll")); + +// await _bot.UnloadPackage(name).ConfigureAwait(false); +// await ReplyAsync(":ok:"); +// } + +// [NadekoCommand, Usage, Description, Aliases] +// [RequireContext(ContextType.Guild)] +// [OwnerOnly] +// public async Task PackageLoad(string name) +// { +// if (name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~")) +// return; +// name = name.ToTitleCase(); + +// if (await _bot.LoadPackage(name)) +// await ReplyAsync(":ok:"); +// else +// await ReplyAsync(":x:"); +// } + +// [NadekoCommand, Usage, Description, Aliases] +// [RequireContext(ContextType.Guild)] +// [OwnerOnly] +// public async Task PackageReload(string name) +// { +// if (name.Contains(".") || name.Contains("\\") || name.Contains("/") || name.Contains("~")) +// return; +// name = name.ToTitleCase(); + +// if (await _bot.UnloadPackage(name)) +// { +// await _bot.LoadPackage(name); +// await ReplyAsync(":ok:"); +// } +// else +// await ReplyAsync(":x:"); +// } +// } +// } +//} diff --git a/src/NadekoBot/Modules/Administration/MuteCommands.cs b/NadekoBot.Core/Modules/Administration/MuteCommands.cs similarity index 99% rename from src/NadekoBot/Modules/Administration/MuteCommands.cs rename to NadekoBot.Core/Modules/Administration/MuteCommands.cs index a8322de4..076bc920 100644 --- a/src/NadekoBot/Modules/Administration/MuteCommands.cs +++ b/NadekoBot.Core/Modules/Administration/MuteCommands.cs @@ -1,6 +1,6 @@ using Discord; using Discord.Commands; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Threading.Tasks; using NadekoBot.Common.Attributes; diff --git a/src/NadekoBot/Modules/Administration/PlayingRotateCommands.cs b/NadekoBot.Core/Modules/Administration/PlayingRotateCommands.cs similarity index 97% rename from src/NadekoBot/Modules/Administration/PlayingRotateCommands.cs rename to NadekoBot.Core/Modules/Administration/PlayingRotateCommands.cs index 4cccf226..7f852fce 100644 --- a/src/NadekoBot/Modules/Administration/PlayingRotateCommands.cs +++ b/NadekoBot.Core/Modules/Administration/PlayingRotateCommands.cs @@ -1,6 +1,6 @@ using Discord.Commands; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; diff --git a/src/NadekoBot/Modules/Administration/PrefixCommands.cs b/NadekoBot.Core/Modules/Administration/PrefixCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/PrefixCommands.cs rename to NadekoBot.Core/Modules/Administration/PrefixCommands.cs diff --git a/src/NadekoBot/Modules/Administration/ProtectionCommands.cs b/NadekoBot.Core/Modules/Administration/ProtectionCommands.cs similarity index 99% rename from src/NadekoBot/Modules/Administration/ProtectionCommands.cs rename to NadekoBot.Core/Modules/Administration/ProtectionCommands.cs index 6a09692a..d1bc0406 100644 --- a/src/NadekoBot/Modules/Administration/ProtectionCommands.cs +++ b/NadekoBot.Core/Modules/Administration/ProtectionCommands.cs @@ -2,8 +2,8 @@ using Discord.Commands; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Linq; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Administration/PruneCommands.cs b/NadekoBot.Core/Modules/Administration/PruneCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Administration/PruneCommands.cs rename to NadekoBot.Core/Modules/Administration/PruneCommands.cs diff --git a/src/NadekoBot/Modules/Administration/RatelimitCommands.cs b/NadekoBot.Core/Modules/Administration/RatelimitCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Administration/RatelimitCommands.cs rename to NadekoBot.Core/Modules/Administration/RatelimitCommands.cs index 40b37884..d2069e8b 100644 --- a/src/NadekoBot/Modules/Administration/RatelimitCommands.cs +++ b/NadekoBot.Core/Modules/Administration/RatelimitCommands.cs @@ -2,8 +2,8 @@ using Discord; using Discord.Commands; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Administration/SelfAssignedRolesCommands.cs b/NadekoBot.Core/Modules/Administration/SelfAssignedRolesCommands.cs similarity index 76% rename from src/NadekoBot/Modules/Administration/SelfAssignedRolesCommands.cs rename to NadekoBot.Core/Modules/Administration/SelfAssignedRolesCommands.cs index 79e76a1d..d867c236 100644 --- a/src/NadekoBot/Modules/Administration/SelfAssignedRolesCommands.cs +++ b/NadekoBot.Core/Modules/Administration/SelfAssignedRolesCommands.cs @@ -2,8 +2,8 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; @@ -11,6 +11,7 @@ using System.Text; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Common.Collections; +using Microsoft.EntityFrameworkCore; namespace NadekoBot.Modules.Administration { @@ -46,7 +47,15 @@ namespace NadekoBot.Modules.Administration [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] [RequireUserPermission(GuildPermission.ManageRoles)] - public async Task Asar([Remainder] IRole role) + [Priority(1)] + public Task Asar([Remainder] IRole role) => + Asar(0, role); + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [RequireUserPermission(GuildPermission.ManageRoles)] + [Priority(0)] + public async Task Asar(int group, [Remainder] IRole role) { IEnumerable roles; @@ -58,7 +67,8 @@ namespace NadekoBot.Modules.Administration var error = false; using (var uow = _db.UnitOfWork) { - roles = uow.SelfAssignedRoles.GetFromGuild(Context.Guild.Id); + roles = uow.SelfAssignedRoles.GetFromGuild(Context.Guild.Id) + .SelectMany(x => x); if (roles.Any(s => s.RoleId == role.Id && s.GuildId == role.Guild.Id)) { msg = GetText("role_in_list", Format.Bold(role.Name)); @@ -68,11 +78,12 @@ namespace NadekoBot.Modules.Administration { uow.SelfAssignedRoles.Add(new SelfAssignedRole { + Group = group, RoleId = role.Id, GuildId = role.Guild.Id }); await uow.CompleteAsync(); - msg = GetText("role_added", Format.Bold(role.Name)); + msg = GetText("role_added", Format.Bold(role.Name), Format.Bold(group.ToString())); } } if (error) @@ -113,40 +124,49 @@ namespace NadekoBot.Modules.Administration var toRemove = new ConcurrentHashSet(); var removeMsg = new StringBuilder(); - var roles = new List(); + var rolesStr = new StringBuilder(); var roleCnt = 0; + var exclusive = false; using (var uow = _db.UnitOfWork) { - var roleModels = uow.SelfAssignedRoles.GetFromGuild(Context.Guild.Id).ToList(); - - foreach (var roleModel in roleModels) + exclusive = uow.GuildConfigs.For(Context.Guild.Id, set => set) + .ExclusiveSelfAssignedRoles; + var roleModels = uow.SelfAssignedRoles.GetFromGuild(Context.Guild.Id) + .ToDictionary(x => x.Key, x => x.AsEnumerable().ToArray()) + .OrderBy(x => x.Key); + foreach (var kvp in roleModels) { - var role = Context.Guild.Roles.FirstOrDefault(r => r.Id == roleModel.RoleId); - if (role == null) + rolesStr.AppendLine("\t\t\t\t『" + Format.Bold(GetText("self_assign_group", kvp.Key)) + "』"); + foreach (var roleModel in kvp.Value) { - toRemove.Add(roleModel); - uow.SelfAssignedRoles.Remove(roleModel); - } - else - { - roles.Add(Format.Bold(role.Name)); - roleCnt++; + var role = Context.Guild.Roles.FirstOrDefault(r => r.Id == roleModel.RoleId); + if (role == null) + { + toRemove.Add(roleModel); + uow.SelfAssignedRoles.Remove(roleModel); + } + else + { + rolesStr.AppendLine(Format.Bold(role.Name)); + roleCnt++; + } } } + if(toRemove.Any()) + rolesStr.AppendLine("\t\t\t\t『』"); foreach (var role in toRemove) { - roles.Add(GetText("role_clean", role.RoleId)); + rolesStr.AppendLine(GetText("role_clean", role.RoleId)); } await uow.CompleteAsync(); } - await Context.Channel.SendPaginatedConfirmAsync((DiscordSocketClient)Context.Client, page, (curPage) => - { - return new EmbedBuilder() - .WithTitle(GetText("self_assign_list", roleCnt)) - .WithDescription(string.Join("\n", roles.Skip(curPage * 10).Take(10))) - .WithOkColor(); - }, roles.Count / 10); + await Context.Channel.SendConfirmAsync("", + Format.Bold(GetText("self_assign_list", roleCnt)) + + "\n\n" + rolesStr.ToString(), + footer: exclusive + ? GetText("self_assign_are_exclusive") + : GetText("self_assign_are_not_exclusive")).ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -162,7 +182,7 @@ namespace NadekoBot.Modules.Administration areExclusive = config.ExclusiveSelfAssignedRoles = !config.ExclusiveSelfAssignedRoles; await uow.CompleteAsync(); } - if(areExclusive) + if (areExclusive) await ReplyConfirmLocalized("self_assign_excl").ConfigureAwait(false); else await ReplyConfirmLocalized("self_assign_no_excl").ConfigureAwait(false); @@ -179,9 +199,12 @@ namespace NadekoBot.Modules.Administration using (var uow = _db.UnitOfWork) { conf = uow.GuildConfigs.For(Context.Guild.Id, set => set); - roles = uow.SelfAssignedRoles.GetFromGuild(Context.Guild.Id).ToArray(); + roles = uow.SelfAssignedRoles.GetFromGuild(Context.Guild.Id) + .SelectMany(x => x) + .ToArray(); } - if (roles.FirstOrDefault(r=>r.RoleId == role.Id) == null) + var theRoleYouWant = roles.FirstOrDefault(r => r.RoleId == role.Id); + if (theRoleYouWant == null) { await ReplyErrorLocalized("self_assign_not").ConfigureAwait(false); return; @@ -192,11 +215,14 @@ namespace NadekoBot.Modules.Administration return; } - var roleIds = roles.Select(x => x.RoleId).ToArray(); + var roleIds = roles + .Where(x => x.Group == theRoleYouWant.Group) + .Select(x => x.RoleId).ToArray(); if (conf.ExclusiveSelfAssignedRoles) { - var sameRoles = guildUser.RoleIds.Where(r => roleIds.Contains(r)); - + var sameRoles = guildUser.RoleIds + .Where(r => roleIds.Contains(r)); + foreach (var roleId in sameRoles) { var sameRole = Context.Guild.GetRole(roleId); @@ -224,7 +250,7 @@ namespace NadekoBot.Modules.Administration _log.Info(ex); return; } - var msg = await ReplyConfirmLocalized("self_assign_success",Format.Bold(role.Name)).ConfigureAwait(false); + var msg = await ReplyConfirmLocalized("self_assign_success", Format.Bold(role.Name)).ConfigureAwait(false); if (conf.AutoDeleteSelfAssignedRoleMessages) { @@ -244,7 +270,8 @@ namespace NadekoBot.Modules.Administration using (var uow = _db.UnitOfWork) { autoDeleteSelfAssignedRoleMessages = uow.GuildConfigs.For(Context.Guild.Id, set => set).AutoDeleteSelfAssignedRoleMessages; - roles = uow.SelfAssignedRoles.GetFromGuild(Context.Guild.Id); + roles = uow.SelfAssignedRoles.GetFromGuild(Context.Guild.Id) + .SelectMany(x => x); } if (roles.FirstOrDefault(r => r.RoleId == role.Id) == null) { @@ -253,7 +280,7 @@ namespace NadekoBot.Modules.Administration } if (!guildUser.RoleIds.Contains(role.Id)) { - await ReplyErrorLocalized("self_assign_not_have",Format.Bold(role.Name)).ConfigureAwait(false); + await ReplyErrorLocalized("self_assign_not_have", Format.Bold(role.Name)).ConfigureAwait(false); return; } try @@ -275,4 +302,4 @@ namespace NadekoBot.Modules.Administration } } } -} +} \ No newline at end of file diff --git a/src/NadekoBot/Modules/Administration/SelfCommands.cs b/NadekoBot.Core/Modules/Administration/SelfCommands.cs similarity index 84% rename from src/NadekoBot/Modules/Administration/SelfCommands.cs rename to NadekoBot.Core/Modules/Administration/SelfCommands.cs index 344b8379..a672ba2d 100644 --- a/src/NadekoBot/Modules/Administration/SelfCommands.cs +++ b/NadekoBot.Core/Modules/Administration/SelfCommands.cs @@ -8,13 +8,14 @@ using System.Linq; using System.Net.Http; using System.Threading.Tasks; using Discord.WebSocket; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; using System.Diagnostics; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Administration.Services; -using NadekoBot.Modules.Music.Services; +using Newtonsoft.Json; +using NadekoBot.Common.ShardCom; namespace NadekoBot.Modules.Administration { @@ -28,22 +29,22 @@ namespace NadekoBot.Modules.Administration private static readonly object _locker = new object(); private readonly DiscordSocketClient _client; private readonly IImagesService _images; - private readonly MusicService _music; private readonly IBotConfigProvider _bc; private readonly NadekoBot _bot; private readonly IBotCredentials _creds; + private readonly IDataCache _cache; public SelfCommands(DbService db, NadekoBot bot, DiscordSocketClient client, - MusicService music, IImagesService images, IBotConfigProvider bc, - IBotCredentials creds) + IImagesService images, IBotConfigProvider bc, + IBotCredentials creds, IDataCache cache) { _db = db; _client = client; _images = images; - _music = music; _bc = bc; _bot = bot; _creds = creds; + _cache = cache; } [NadekoCommand, Usage, Description, Aliases] @@ -51,6 +52,9 @@ namespace NadekoBot.Modules.Administration [OwnerOnly] public async Task StartupCommandAdd([Remainder] string cmdText) { + if (cmdText.StartsWith(Prefix + "die")) + return; + var guser = ((IGuildUser)Context.User); var cmd = new StartupCommand() { @@ -217,28 +221,62 @@ namespace NadekoBot.Modules.Administration } - //todo 2 shard commands - //[NadekoCommand, Usage, Description, Aliases] - //[Shard0Precondition] - //[OwnerOnly] - //public async Task RestartShard(int shardid) - //{ - // if (shardid == 0 || shardid > b) - // { - // await ReplyErrorLocalized("no_shard_id").ConfigureAwait(false); - // return; - // } - // try - // { - // await ReplyConfirmLocalized("shard_reconnecting", Format.Bold("#" + shardid)).ConfigureAwait(false); - // await shard.StartAsync().ConfigureAwait(false); - // await ReplyConfirmLocalized("shard_reconnected", Format.Bold("#" + shardid)).ConfigureAwait(false); - // } - // catch (Exception ex) - // { - // _log.Warn(ex); - // } - //} + [NadekoCommand, Usage, Description, Aliases] + public async Task ShardStats(int page = 1) + { + if (--page < 0) + return; + var db = _cache.Redis.GetDatabase(); + var statuses = db.ListRange(_creds.RedisKey() + "_shardstats") + .Select(x => JsonConvert.DeserializeObject(x)); + + var status = string.Join(", ", statuses + .GroupBy(x => x.ConnectionState) + .Select(x => $"{x.Count()} {x.Key}") + .ToArray()); + + var allShardStrings = statuses + .Select(x => + { + var timeDiff = DateTime.UtcNow - x.Time; + if (timeDiff > TimeSpan.FromSeconds(20)) + return $"Shard #{Format.Bold(x.ShardId.ToString())} **UNRESPONSIVE** for {timeDiff.ToString(@"hh\:mm\:ss")}"; + return GetText("shard_stats_txt", x.ShardId.ToString(), + Format.Bold(x.ConnectionState.ToString()), Format.Bold(x.Guilds.ToString()), timeDiff.ToString(@"hh\:mm\:ss")); + }) + .ToArray(); + + await Context.Channel.SendPaginatedConfirmAsync(_client, page, (curPage) => + { + + var str = string.Join("\n", allShardStrings.Skip(25 * curPage).Take(25)); + + if (string.IsNullOrWhiteSpace(str)) + str = GetText("no_shards_on_page"); + + return new EmbedBuilder() + .WithAuthor(a => a.WithName(GetText("shard_stats"))) + .WithTitle(status) + .WithOkColor() + .WithDescription(str); + }, allShardStrings.Length, 25); + } + + [NadekoCommand, Usage, Description, Aliases] + [OwnerOnly] + public async Task RestartShard(int shardid) + { + if (shardid < 0 || shardid >= _creds.TotalShards) + { + await ReplyErrorLocalized("no_shard_id").ConfigureAwait(false); + return; + } + var pub = _cache.Redis.GetSubscriber(); + pub.Publish(_creds.RedisKey() + "_shard_restart", + JsonConvert.SerializeObject(_client.ShardId), + StackExchange.Redis.CommandFlags.FireAndForget); + await ReplyConfirmLocalized("shard_reconnecting", Format.Bold("#" + shardid)).ConfigureAwait(false); + } [NadekoCommand, Usage, Description, Aliases] [OwnerOnly] @@ -279,7 +317,6 @@ namespace NadekoBot.Modules.Administration // ignored } await Task.Delay(2000).ConfigureAwait(false); - try { await _music.DestroyAllPlayers().ConfigureAwait(false); } catch { } Environment.Exit(0); } diff --git a/src/NadekoBot/Modules/Administration/ServerGreetCommands.cs b/NadekoBot.Core/Modules/Administration/ServerGreetCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Administration/ServerGreetCommands.cs rename to NadekoBot.Core/Modules/Administration/ServerGreetCommands.cs index 0f94e002..d8bac136 100644 --- a/src/NadekoBot/Modules/Administration/ServerGreetCommands.cs +++ b/NadekoBot.Core/Modules/Administration/ServerGreetCommands.cs @@ -1,8 +1,8 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Threading.Tasks; using NadekoBot.Common.Attributes; diff --git a/src/NadekoBot/Modules/Administration/Services/AdministrationService.cs b/NadekoBot.Core/Modules/Administration/Services/AdministrationService.cs similarity index 83% rename from src/NadekoBot/Modules/Administration/Services/AdministrationService.cs rename to NadekoBot.Core/Modules/Administration/Services/AdministrationService.cs index 57ec29a8..54142fe3 100644 --- a/src/NadekoBot/Modules/Administration/Services/AdministrationService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/AdministrationService.cs @@ -1,13 +1,11 @@ using System; -using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Discord; using Discord.Commands; using Discord.WebSocket; using NadekoBot.Common.Collections; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; using NLog; namespace NadekoBot.Modules.Administration.Services @@ -16,12 +14,14 @@ namespace NadekoBot.Modules.Administration.Services { public readonly ConcurrentHashSet DeleteMessagesOnCommand; private readonly Logger _log; + private readonly NadekoBot _bot; - public AdministrationService(IEnumerable gcs, CommandHandler cmdHandler) + public AdministrationService(NadekoBot bot, CommandHandler cmdHandler) { _log = LogManager.GetCurrentClassLogger(); + _bot = bot; - DeleteMessagesOnCommand = new ConcurrentHashSet(gcs.Where(g => g.DeleteMessageOnCommand).Select(g => g.GuildId)); + DeleteMessagesOnCommand = new ConcurrentHashSet(bot.AllGuildConfigs.Where(g => g.DeleteMessageOnCommand).Select(g => g.GuildId)); cmdHandler.CommandExecuted += DelMsgOnCmd_Handler; } diff --git a/src/NadekoBot/Modules/Administration/Services/AutoAssignRoleService.cs b/NadekoBot.Core/Modules/Administration/Services/AutoAssignRoleService.cs similarity index 88% rename from src/NadekoBot/Modules/Administration/Services/AutoAssignRoleService.cs rename to NadekoBot.Core/Modules/Administration/Services/AutoAssignRoleService.cs index 040986cb..2c87d793 100644 --- a/src/NadekoBot/Modules/Administration/Services/AutoAssignRoleService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/AutoAssignRoleService.cs @@ -1,11 +1,9 @@ using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Discord.WebSocket; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; using NLog; namespace NadekoBot.Modules.Administration.Services @@ -18,13 +16,13 @@ namespace NadekoBot.Modules.Administration.Services //guildid/roleid public ConcurrentDictionary AutoAssignedRoles { get; } - public AutoAssignRoleService(DiscordSocketClient client, IEnumerable gcs) + public AutoAssignRoleService(DiscordSocketClient client, NadekoBot bot) { _log = LogManager.GetCurrentClassLogger(); _client = client; AutoAssignedRoles = new ConcurrentDictionary( - gcs.Where(x => x.AutoAssignRoleId != 0) + bot.AllGuildConfigs.Where(x => x.AutoAssignRoleId != 0) .ToDictionary(k => k.GuildId, v => v.AutoAssignRoleId)); _client.UserJoined += (user) => diff --git a/src/NadekoBot/Modules/Administration/Services/GameVoiceChannelService.cs b/NadekoBot.Core/Modules/Administration/Services/GameVoiceChannelService.cs similarity index 92% rename from src/NadekoBot/Modules/Administration/Services/GameVoiceChannelService.cs rename to NadekoBot.Core/Modules/Administration/Services/GameVoiceChannelService.cs index e97e0eb7..12bb7dcb 100644 --- a/src/NadekoBot/Modules/Administration/Services/GameVoiceChannelService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/GameVoiceChannelService.cs @@ -5,8 +5,8 @@ using System.Threading.Tasks; using Discord.WebSocket; using NadekoBot.Common.Collections; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Administration.Services @@ -19,14 +19,14 @@ namespace NadekoBot.Modules.Administration.Services private readonly DbService _db; private readonly DiscordSocketClient _client; - public GameVoiceChannelService(DiscordSocketClient client, DbService db, IEnumerable gcs) + public GameVoiceChannelService(DiscordSocketClient client, DbService db, NadekoBot bot) { _log = LogManager.GetCurrentClassLogger(); _db = db; _client = client; GameVoiceChannels = new ConcurrentHashSet( - gcs.Where(gc => gc.GameVoiceChannel != null) + bot.AllGuildConfigs.Where(gc => gc.GameVoiceChannel != null) .Select(gc => gc.GameVoiceChannel.Value)); _client.UserVoiceStateUpdated += Client_UserVoiceStateUpdated; diff --git a/src/NadekoBot/Modules/Administration/Services/GuildTimezoneService.cs b/NadekoBot.Core/Modules/Administration/Services/GuildTimezoneService.cs similarity index 87% rename from src/NadekoBot/Modules/Administration/Services/GuildTimezoneService.cs rename to NadekoBot.Core/Modules/Administration/Services/GuildTimezoneService.cs index fdef20c5..fd542baf 100644 --- a/src/NadekoBot/Modules/Administration/Services/GuildTimezoneService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/GuildTimezoneService.cs @@ -4,8 +4,8 @@ using System.Collections.Generic; using System.Linq; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Administration.Services { @@ -16,9 +16,9 @@ namespace NadekoBot.Modules.Administration.Services private ConcurrentDictionary _timezones; private readonly DbService _db; - public GuildTimezoneService(DiscordSocketClient client, IEnumerable gcs, DbService db) + public GuildTimezoneService(DiscordSocketClient client, NadekoBot bot, DbService db) { - _timezones = gcs + _timezones = bot.AllGuildConfigs .Select(x => { TimeZoneInfo tz; @@ -33,10 +33,10 @@ namespace NadekoBot.Modules.Administration.Services { tz = null; } - return (x.GuildId, tz); + return (x.GuildId, Timezone: tz); }) - .Where(x => x.Item2 != null) - .ToDictionary(x => x.Item1, x => x.Item2) + .Where(x => x.Timezone != null) + .ToDictionary(x => x.GuildId, x => x.Timezone) .ToConcurrent(); var curUser = client.CurrentUser; diff --git a/src/NadekoBot/Modules/Administration/Services/LogCommandService.cs b/NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs similarity index 98% rename from src/NadekoBot/Modules/Administration/Services/LogCommandService.cs rename to NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs index 37b2781e..f1d6c2ad 100644 --- a/src/NadekoBot/Modules/Administration/Services/LogCommandService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/LogCommandService.cs @@ -8,9 +8,9 @@ using Discord; using Discord.WebSocket; using NadekoBot.Extensions; using NadekoBot.Modules.Administration.Common; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NLog; using NadekoBot.Common; @@ -50,7 +50,7 @@ namespace NadekoBot.Modules.Administration.Services private readonly GuildTimezoneService _tz; public LogCommandService(DiscordSocketClient client, NadekoStrings strings, - IEnumerable gcs, DbService db, MuteService mute, ProtectionService prot, GuildTimezoneService tz) + NadekoBot bot, DbService db, MuteService mute, ProtectionService prot, GuildTimezoneService tz) { _client = client; _log = LogManager.GetCurrentClassLogger(); @@ -60,7 +60,7 @@ namespace NadekoBot.Modules.Administration.Services _prot = prot; _tz = tz; - GuildLogSettings = gcs + GuildLogSettings = bot.AllGuildConfigs .ToDictionary(g => g.GuildId, g => g.LogSetting) .ToConcurrent(); @@ -154,10 +154,10 @@ namespace NadekoBot.Modules.Administration.Services .WithFooter(fb => fb.WithText(CurrentTime(g))) .WithOkColor(); - if (Uri.IsWellFormedUriString(before.GetAvatarUrl(), UriKind.Absolute)) - embed.WithThumbnailUrl(before.GetAvatarUrl()); - if (Uri.IsWellFormedUriString(after.GetAvatarUrl(), UriKind.Absolute)) - embed.WithImageUrl(after.GetAvatarUrl()); + if (Uri.IsWellFormedUriString(before.RealAvatarUrl(), UriKind.Absolute)) + embed.WithThumbnailUrl(before.RealAvatarUrl()); + if (Uri.IsWellFormedUriString(after.RealAvatarUrl(), UriKind.Absolute)) + embed.WithImageUrl(after.RealAvatarUrl()); } else { @@ -950,7 +950,7 @@ namespace NadekoBot.Modules.Administration.Services break; } - if (!id.HasValue) + if (!id.HasValue || id == 0) { UnsetLogSetting(guild.Id, logChannelType); return null; diff --git a/src/NadekoBot/Modules/Administration/Services/MuteService.cs b/NadekoBot.Core/Modules/Administration/Services/MuteService.cs similarity index 94% rename from src/NadekoBot/Modules/Administration/Services/MuteService.cs rename to NadekoBot.Core/Modules/Administration/Services/MuteService.cs index 77b4136c..d28ad5be 100644 --- a/src/NadekoBot/Modules/Administration/Services/MuteService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/MuteService.cs @@ -9,8 +9,8 @@ using Discord.WebSocket; using Microsoft.EntityFrameworkCore; using NadekoBot.Common.Collections; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Administration.Services @@ -38,22 +38,25 @@ namespace NadekoBot.Modules.Administration.Services private readonly DiscordSocketClient _client; private readonly DbService _db; - public MuteService(DiscordSocketClient client, IEnumerable gcs, DbService db) + public MuteService(DiscordSocketClient client, NadekoBot bot, DbService db) { _client = client; _db = db; - GuildMuteRoles = gcs - .Where(c => !string.IsNullOrWhiteSpace(c.MuteRoleName)) - .ToDictionary(c => c.GuildId, c => c.MuteRoleName) - .ToConcurrent(); + GuildMuteRoles = bot + .AllGuildConfigs + .Where(c => !string.IsNullOrWhiteSpace(c.MuteRoleName)) + .ToDictionary(c => c.GuildId, c => c.MuteRoleName) + .ToConcurrent(); - MutedUsers = new ConcurrentDictionary>(gcs.ToDictionary( - k => k.GuildId, - v => new ConcurrentHashSet(v.MutedUsers.Select(m => m.UserId)) + MutedUsers = new ConcurrentDictionary>(bot + .AllGuildConfigs + .ToDictionary( + k => k.GuildId, + v => new ConcurrentHashSet(v.MutedUsers.Select(m => m.UserId)) )); - foreach (var conf in gcs) + foreach (var conf in bot.AllGuildConfigs) { foreach (var x in conf.UnmuteTimers) { diff --git a/NadekoBot.Core/Modules/Administration/Services/PackagesService.cs b/NadekoBot.Core/Modules/Administration/Services/PackagesService.cs new file mode 100644 index 00000000..2cfdf377 --- /dev/null +++ b/NadekoBot.Core/Modules/Administration/Services/PackagesService.cs @@ -0,0 +1,31 @@ +//using NadekoBot.Core.Services; +//using System; +//using System.Collections.Generic; +//using System.IO; +//using System.Linq; +//using System.Text.RegularExpressions; + +//namespace NadekoBot.Modules.Administration.Services +//{ +// public class PackagesService : INService +// { +// public IEnumerable Packages { get; private set; } + +// public PackagesService() +// { +// ReloadAvailablePackages(); +// } + +// public void ReloadAvailablePackages() +// { +// Packages = Directory.GetDirectories(Path.Combine(AppContext.BaseDirectory, "modules\\"), "NadekoBot.Modules.*", SearchOption.AllDirectories) +// .SelectMany(x => Directory.GetFiles(x, "NadekoBot.Modules.*.dll")) +// .Select(x => Path.GetFileNameWithoutExtension(x)) +// .Select(x => +// { +// var m = Regex.Match(x, @"NadekoBot\.Modules\.(?.*)"); +// return m.Groups["name"].Value; +// }); +// } +// } +//} diff --git a/src/NadekoBot/Modules/Administration/Services/PlayingRotateService.cs b/NadekoBot.Core/Modules/Administration/Services/PlayingRotateService.cs similarity index 90% rename from src/NadekoBot/Modules/Administration/Services/PlayingRotateService.cs rename to NadekoBot.Core/Modules/Administration/Services/PlayingRotateService.cs index d0cd5eef..50d222c2 100644 --- a/src/NadekoBot/Modules/Administration/Services/PlayingRotateService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/PlayingRotateService.cs @@ -3,11 +3,10 @@ using System.Linq; using System.Threading; using Discord.WebSocket; using NadekoBot.Common.Replacements; -using NadekoBot.Modules.Music.Services; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; -using System.Threading.Tasks; +using NadekoBot.Modules.Music.Services; namespace NadekoBot.Modules.Administration.Services { @@ -15,7 +14,6 @@ namespace NadekoBot.Modules.Administration.Services { private readonly Timer _t; private readonly DiscordSocketClient _client; - private readonly MusicService _music; private readonly Logger _log; private readonly IDataCache _cache; private readonly Replacer _rep; @@ -29,12 +27,11 @@ namespace NadekoBot.Modules.Administration.Services public int Index { get; set; } } - public PlayingRotateService(DiscordSocketClient client, IBotConfigProvider bcp, - MusicService music, DbService db, IDataCache cache, NadekoBot bot) + public PlayingRotateService(DiscordSocketClient client, IBotConfigProvider bcp, + DbService db, IDataCache cache, NadekoBot bot, MusicService music) { _client = client; _bcp = bcp; - _music = music; _db = db; _log = LogManager.GetCurrentClassLogger(); _cache = cache; diff --git a/src/NadekoBot/Modules/Administration/Services/ProtectionService.cs b/NadekoBot.Core/Modules/Administration/Services/ProtectionService.cs similarity index 96% rename from src/NadekoBot/Modules/Administration/Services/ProtectionService.cs rename to NadekoBot.Core/Modules/Administration/Services/ProtectionService.cs index ea65fd3f..22362a45 100644 --- a/src/NadekoBot/Modules/Administration/Services/ProtectionService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/ProtectionService.cs @@ -1,13 +1,12 @@ using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Discord; using Discord.WebSocket; using NadekoBot.Modules.Administration.Common; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Administration.Services @@ -26,13 +25,13 @@ namespace NadekoBot.Modules.Administration.Services private readonly DiscordSocketClient _client; private readonly MuteService _mute; - public ProtectionService(DiscordSocketClient client, IEnumerable gcs, MuteService mute) + public ProtectionService(DiscordSocketClient client, NadekoBot bot, MuteService mute) { _log = LogManager.GetCurrentClassLogger(); _client = client; _mute = mute; - foreach (var gc in gcs) + foreach (var gc in bot.AllGuildConfigs) { var raid = gc.AntiRaidSetting; var spam = gc.AntiSpamSetting; diff --git a/src/NadekoBot/Modules/Administration/Services/PruneService.cs b/NadekoBot.Core/Modules/Administration/Services/PruneService.cs similarity index 98% rename from src/NadekoBot/Modules/Administration/Services/PruneService.cs rename to NadekoBot.Core/Modules/Administration/Services/PruneService.cs index 4f25e3c3..b1da3348 100644 --- a/src/NadekoBot/Modules/Administration/Services/PruneService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/PruneService.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using Discord; using NadekoBot.Common.Collections; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; namespace NadekoBot.Modules.Administration.Services { diff --git a/src/NadekoBot/Modules/Administration/Services/RatelimitService.cs b/NadekoBot.Core/Modules/Administration/Services/RatelimitService.cs similarity index 88% rename from src/NadekoBot/Modules/Administration/Services/RatelimitService.cs rename to NadekoBot.Core/Modules/Administration/Services/RatelimitService.cs index 9667d193..68393b01 100644 --- a/src/NadekoBot/Modules/Administration/Services/RatelimitService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/RatelimitService.cs @@ -8,8 +8,8 @@ using Discord.WebSocket; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Extensions; using NadekoBot.Modules.Administration.Common; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Administration.Services @@ -23,17 +23,17 @@ namespace NadekoBot.Modules.Administration.Services private readonly Logger _log; private readonly DiscordSocketClient _client; - public SlowmodeService(DiscordSocketClient client, IEnumerable gcs) + public SlowmodeService(DiscordSocketClient client, NadekoBot bot) { _log = LogManager.GetCurrentClassLogger(); _client = client; IgnoredRoles = new ConcurrentDictionary>( - gcs.ToDictionary(x => x.GuildId, + bot.AllGuildConfigs.ToDictionary(x => x.GuildId, x => new HashSet(x.SlowmodeIgnoredRoles.Select(y => y.RoleId)))); IgnoredUsers = new ConcurrentDictionary>( - gcs.ToDictionary(x => x.GuildId, + bot.AllGuildConfigs.ToDictionary(x => x.GuildId, x => new HashSet(x.SlowmodeIgnoredUsers.Select(y => y.UserId)))); } diff --git a/src/NadekoBot/Modules/Administration/Services/SelfService.cs b/NadekoBot.Core/Modules/Administration/Services/SelfService.cs similarity index 93% rename from src/NadekoBot/Modules/Administration/Services/SelfService.cs rename to NadekoBot.Core/Modules/Administration/Services/SelfService.cs index 93699858..11aeb7fa 100644 --- a/src/NadekoBot/Modules/Administration/Services/SelfService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/SelfService.cs @@ -7,8 +7,8 @@ using Discord.WebSocket; using NadekoBot.Common; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Impl; using NLog; namespace NadekoBot.Modules.Administration.Services @@ -42,25 +42,27 @@ namespace NadekoBot.Modules.Administration.Services _creds = creds; _bc = bc; - var _ = Task.Run(async () => + Task.Run(async () => { await bot.Ready.Task.ConfigureAwait(false); foreach (var cmd in bc.BotConfig.StartupCommands) { + var prefix = _cmdHandler.GetPrefix(cmd.GuildId); + //if someone already has .die as their startup command, ignore it + if (cmd.CommandText.StartsWith(prefix + "die")) + continue; await cmdHandler.ExecuteExternal(cmd.GuildId, cmd.ChannelId, cmd.CommandText); await Task.Delay(400).ConfigureAwait(false); } }); - var ___ = Task.Run(async () => + Task.Run(async () => { await bot.Ready.Task.ConfigureAwait(false); await Task.Delay(5000); - _client.Guilds.SelectMany(g => g.Users); - if(client.ShardId == 0) LoadOwnerChannels(); }); diff --git a/src/NadekoBot/Modules/Administration/Services/UserPunishService.cs b/NadekoBot.Core/Modules/Administration/Services/UserPunishService.cs similarity index 97% rename from src/NadekoBot/Modules/Administration/Services/UserPunishService.cs rename to NadekoBot.Core/Modules/Administration/Services/UserPunishService.cs index 55b886f3..532e3ca3 100644 --- a/src/NadekoBot/Modules/Administration/Services/UserPunishService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/UserPunishService.cs @@ -4,8 +4,8 @@ using System.Linq; using System.Threading.Tasks; using Discord; using Microsoft.EntityFrameworkCore; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Administration.Services { diff --git a/src/NadekoBot/Modules/Administration/Services/VcRoleService.cs b/NadekoBot.Core/Modules/Administration/Services/VcRoleService.cs similarity index 95% rename from src/NadekoBot/Modules/Administration/Services/VcRoleService.cs rename to NadekoBot.Core/Modules/Administration/Services/VcRoleService.cs index 9f4f1b53..01872a9f 100644 --- a/src/NadekoBot/Modules/Administration/Services/VcRoleService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/VcRoleService.cs @@ -5,8 +5,8 @@ using System.Linq; using System.Threading.Tasks; using Discord; using Discord.WebSocket; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Administration.Services @@ -19,7 +19,7 @@ namespace NadekoBot.Modules.Administration.Services public ConcurrentDictionary> VcRoles { get; } - public VcRoleService(DiscordSocketClient client, IEnumerable gcs, DbService db) + public VcRoleService(DiscordSocketClient client, NadekoBot bot, DbService db) { _log = LogManager.GetCurrentClassLogger(); _db = db; @@ -28,7 +28,7 @@ namespace NadekoBot.Modules.Administration.Services _client.UserVoiceStateUpdated += ClientOnUserVoiceStateUpdated; VcRoles = new ConcurrentDictionary>(); var missingRoles = new List(); - foreach (var gconf in gcs) + foreach (var gconf in bot.AllGuildConfigs) { var g = _client.GetGuild(gconf.GuildId); if (g == null) diff --git a/src/NadekoBot/Modules/Administration/Services/VplusTService.cs b/NadekoBot.Core/Modules/Administration/Services/VplusTService.cs similarity index 94% rename from src/NadekoBot/Modules/Administration/Services/VplusTService.cs rename to NadekoBot.Core/Modules/Administration/Services/VplusTService.cs index 9ffd8dcb..36d4ba79 100644 --- a/src/NadekoBot/Modules/Administration/Services/VplusTService.cs +++ b/NadekoBot.Core/Modules/Administration/Services/VplusTService.cs @@ -9,9 +9,9 @@ using Discord; using Discord.WebSocket; using NadekoBot.Common.Collections; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NLog; namespace NadekoBot.Modules.Administration.Services @@ -28,7 +28,7 @@ namespace NadekoBot.Modules.Administration.Services private readonly DbService _db; private readonly Logger _log; - public VplusTService(DiscordSocketClient client, IEnumerable gcs, NadekoStrings strings, + public VplusTService(DiscordSocketClient client, NadekoBot bot, NadekoStrings strings, DbService db) { _client = client; @@ -36,7 +36,7 @@ namespace NadekoBot.Modules.Administration.Services _db = db; _log = LogManager.GetCurrentClassLogger(); - VoicePlusTextCache = new ConcurrentHashSet(gcs.Where(g => g.VoicePlusTextEnabled).Select(g => g.GuildId)); + VoicePlusTextCache = new ConcurrentHashSet(bot.AllGuildConfigs.Where(g => g.VoicePlusTextEnabled).Select(g => g.GuildId)); _client.UserVoiceStateUpdated += UserUpdatedEventHandler; } diff --git a/src/NadekoBot/Modules/Administration/TimeZoneCommands.cs b/NadekoBot.Core/Modules/Administration/TimeZoneCommands.cs similarity index 97% rename from src/NadekoBot/Modules/Administration/TimeZoneCommands.cs rename to NadekoBot.Core/Modules/Administration/TimeZoneCommands.cs index 25d55dd2..3c433973 100644 --- a/src/NadekoBot/Modules/Administration/TimeZoneCommands.cs +++ b/NadekoBot.Core/Modules/Administration/TimeZoneCommands.cs @@ -34,7 +34,7 @@ namespace NadekoBot.Modules.Administration .WithOkColor() .WithTitle(GetText("timezones_available")) .WithDescription(string.Join("\n", timezones.Skip(curPage * timezonesPerPage).Take(timezonesPerPage).Select(x => $"`{x.Id,-25}` {(x.BaseUtcOffset < TimeSpan.Zero? "-" : "+")}{x.BaseUtcOffset:hhmm}"))), - timezones.Length / timezonesPerPage); + timezones.Length, timezonesPerPage); } [NadekoCommand, Usage, Description, Aliases] diff --git a/src/NadekoBot/Modules/Administration/UserPunishCommands.cs b/NadekoBot.Core/Modules/Administration/UserPunishCommands.cs similarity index 97% rename from src/NadekoBot/Modules/Administration/UserPunishCommands.cs rename to NadekoBot.Core/Modules/Administration/UserPunishCommands.cs index fbfd813b..1303e4e2 100644 --- a/src/NadekoBot/Modules/Administration/UserPunishCommands.cs +++ b/NadekoBot.Core/Modules/Administration/UserPunishCommands.cs @@ -3,8 +3,8 @@ using Discord.Commands; using Discord.WebSocket; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; @@ -29,6 +29,11 @@ namespace NadekoBot.Modules.Administration [RequireUserPermission(GuildPermission.BanMembers)] public async Task Warn(IGuildUser user, [Remainder] string reason = null) { + if (Context.User.Id != user.Guild.OwnerId && (user.GetRoles().Select(r => r.Position).Max() >= ((IGuildUser)Context.User).GetRoles().Select(r => r.Position).Max())) + { + await ReplyErrorLocalized("hierarchy").ConfigureAwait(false); + return; + } try { await (await user.GetOrCreateDMChannelAsync()).EmbedAsync(new EmbedBuilder().WithErrorColor() @@ -149,7 +154,7 @@ namespace NadekoBot.Modules.Administration .WithTitle(GetText("warnings_list")) .WithDescription(string.Join("\n", ws)); - }, warnings.Length / 15); + }, warnings.Length, 15); } [NadekoCommand, Usage, Description, Aliases] diff --git a/src/NadekoBot/Modules/Administration/VcRoleCommands.cs b/NadekoBot.Core/Modules/Administration/VcRoleCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Administration/VcRoleCommands.cs rename to NadekoBot.Core/Modules/Administration/VcRoleCommands.cs index ad0c7feb..0f8940fd 100644 --- a/src/NadekoBot/Modules/Administration/VcRoleCommands.cs +++ b/NadekoBot.Core/Modules/Administration/VcRoleCommands.cs @@ -8,8 +8,8 @@ using Microsoft.EntityFrameworkCore; using NadekoBot.Common.Attributes; using NadekoBot.Extensions; using NadekoBot.Modules.Administration.Services; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Administration { diff --git a/src/NadekoBot/Modules/Administration/VoicePlusTextCommands.cs b/NadekoBot.Core/Modules/Administration/VoicePlusTextCommands.cs similarity index 99% rename from src/NadekoBot/Modules/Administration/VoicePlusTextCommands.cs rename to NadekoBot.Core/Modules/Administration/VoicePlusTextCommands.cs index ee063f8b..26af5560 100644 --- a/src/NadekoBot/Modules/Administration/VoicePlusTextCommands.cs +++ b/NadekoBot.Core/Modules/Administration/VoicePlusTextCommands.cs @@ -1,7 +1,7 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Collections.Generic; using System.Linq; diff --git a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs b/NadekoBot.Core/Modules/CustomReactions/CustomReactions.cs similarity index 98% rename from src/NadekoBot/Modules/CustomReactions/CustomReactions.cs rename to NadekoBot.Core/Modules/CustomReactions/CustomReactions.cs index 4902293f..ca380d72 100644 --- a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs +++ b/NadekoBot.Core/Modules/CustomReactions/CustomReactions.cs @@ -1,8 +1,8 @@ using System.Linq; using System.Threading.Tasks; using Discord.Commands; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using Discord; using NadekoBot.Extensions; using Discord.WebSocket; @@ -152,7 +152,6 @@ namespace NadekoBot.Modules.CustomReactions return; } - var lastPage = customReactions.Length / 20; await Context.Channel.SendPaginatedConfirmAsync(_client, page, curPage => new EmbedBuilder().WithOkColor() .WithTitle(GetText("name")) @@ -171,7 +170,7 @@ namespace NadekoBot.Modules.CustomReactions str = "📪" + str; } return str; - }))), lastPage) + }))), customReactions.Length, 20) .ConfigureAwait(false); } @@ -230,16 +229,15 @@ namespace NadekoBot.Modules.CustomReactions .GroupBy(cr => cr.Trigger) .OrderBy(cr => cr.Key) .ToList(); - - var lastPage = ordered.Count / 20; + await Context.Channel.SendPaginatedConfirmAsync(_client, page, (curPage) => new EmbedBuilder().WithOkColor() .WithTitle(GetText("name")) .WithDescription(string.Join("\r\n", ordered .Skip(curPage * 20) .Take(20) - .Select(cr => $"**{cr.Key.Trim().ToLowerInvariant()}** `x{cr.Count()}`"))), lastPage) - .ConfigureAwait(false); + .Select(cr => $"**{cr.Key.Trim().ToLowerInvariant()}** `x{cr.Count()}`"))), + ordered.Count, 20).ConfigureAwait(false); } } @@ -492,12 +490,12 @@ namespace NadekoBot.Modules.CustomReactions var ordered = _service.ReactionStats.OrderByDescending(x => x.Value).ToArray(); if (!ordered.Any()) return; - var lastPage = ordered.Length / 9; await Context.Channel.SendPaginatedConfirmAsync(_client, page, (curPage) => ordered.Skip(curPage * 9) .Take(9) .Aggregate(new EmbedBuilder().WithOkColor().WithTitle(GetText("stats")), - (agg, cur) => agg.AddField(efb => efb.WithName(cur.Key).WithValue(cur.Value.ToString()).WithIsInline(true))), lastPage) + (agg, cur) => agg.AddField(efb => efb.WithName(cur.Key).WithValue(cur.Value.ToString()).WithIsInline(true))), + ordered.Length, 9) .ConfigureAwait(false); } } diff --git a/src/NadekoBot/Modules/CustomReactions/Extensions/Extensions.cs b/NadekoBot.Core/Modules/CustomReactions/Extensions/Extensions.cs similarity index 99% rename from src/NadekoBot/Modules/CustomReactions/Extensions/Extensions.cs rename to NadekoBot.Core/Modules/CustomReactions/Extensions/Extensions.cs index f24effb1..9d6f6f6c 100644 --- a/src/NadekoBot/Modules/CustomReactions/Extensions/Extensions.cs +++ b/NadekoBot.Core/Modules/CustomReactions/Extensions/Extensions.cs @@ -4,7 +4,7 @@ using Discord; using Discord.WebSocket; using NadekoBot.Extensions; using NadekoBot.Modules.CustomReactions.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; diff --git a/src/NadekoBot/Modules/CustomReactions/Services/CustomReactionsService.cs b/NadekoBot.Core/Modules/CustomReactions/Services/CustomReactionsService.cs similarity index 98% rename from src/NadekoBot/Modules/CustomReactions/Services/CustomReactionsService.cs rename to NadekoBot.Core/Modules/CustomReactions/Services/CustomReactionsService.cs index f45bcb53..08cd3a25 100644 --- a/src/NadekoBot/Modules/CustomReactions/Services/CustomReactionsService.cs +++ b/NadekoBot.Core/Modules/CustomReactions/Services/CustomReactionsService.cs @@ -1,6 +1,6 @@ using Discord; using Discord.WebSocket; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NLog; using System.Collections.Concurrent; using System.Linq; @@ -9,12 +9,12 @@ using System.Threading.Tasks; using NadekoBot.Common; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Extensions; -using NadekoBot.Services.Database; -using NadekoBot.Services; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services; using NadekoBot.Modules.CustomReactions.Extensions; using NadekoBot.Modules.Permissions.Common; using NadekoBot.Modules.Permissions.Services; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; using Newtonsoft.Json; namespace NadekoBot.Modules.CustomReactions.Services diff --git a/src/NadekoBot/Modules/Gambling/AnimalRacingCommands.cs b/NadekoBot.Core/Modules/Gambling/AnimalRacingCommands.cs similarity index 92% rename from src/NadekoBot/Modules/Gambling/AnimalRacingCommands.cs rename to NadekoBot.Core/Modules/Gambling/AnimalRacingCommands.cs index 2802e6e1..b5c130bf 100644 --- a/src/NadekoBot/Modules/Gambling/AnimalRacingCommands.cs +++ b/NadekoBot.Core/Modules/Gambling/AnimalRacingCommands.cs @@ -2,29 +2,26 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; -using System.Collections.Concurrent; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions; using NadekoBot.Modules.Gambling.Common.AnimalRacing; +using NadekoBot.Modules.Gambling.Services; namespace NadekoBot.Modules.Gambling { public partial class Gambling { [Group] - public class AnimalRacingCommands : NadekoSubmodule + public class AnimalRacingCommands : NadekoSubmodule { private readonly IBotConfigProvider _bc; private readonly CurrencyService _cs; private readonly DiscordSocketClient _client; - - public static ConcurrentDictionary AnimalRaces { get; } = new ConcurrentDictionary(); - public AnimalRacingCommands(IBotConfigProvider bc, CurrencyService cs, DiscordSocketClient client) { _bc = bc; @@ -39,7 +36,7 @@ namespace NadekoBot.Modules.Gambling public Task Race() { var ar = new AnimalRace(_cs, _bc.BotConfig.RaceAnimals.Shuffle().ToArray()); - if (!AnimalRaces.TryAdd(Context.Guild.Id, ar)) + if (!_service.AnimalRaces.TryAdd(Context.Guild.Id, ar)) return Context.Channel.SendErrorAsync(GetText("animal_race"), GetText("animal_race_already_started")); ar.Initialize(); @@ -66,7 +63,7 @@ namespace NadekoBot.Modules.Gambling Task Ar_OnEnded(AnimalRace race) { _client.MessageReceived -= _client_MessageReceived; - AnimalRaces.TryRemove(Context.Guild.Id, out _); + _service.AnimalRaces.TryRemove(Context.Guild.Id, out _); var winner = race.FinishedUsers[0]; if (race.FinishedUsers[0].Bet > 0) { @@ -126,7 +123,7 @@ namespace NadekoBot.Modules.Gambling private Task Ar_OnStartingFailed(AnimalRace race) { - AnimalRaces.TryRemove(Context.Guild.Id, out _); + _service.AnimalRaces.TryRemove(Context.Guild.Id, out _); return ReplyErrorLocalized("animal_race_failed"); } @@ -134,7 +131,7 @@ namespace NadekoBot.Modules.Gambling [RequireContext(ContextType.Guild)] public async Task JoinRace(int amount = 0) { - if (!AnimalRaces.TryGetValue(Context.Guild.Id, out var ar)) + if (!_service.AnimalRaces.TryGetValue(Context.Guild.Id, out var ar)) { await ReplyErrorLocalized("race_not_exist").ConfigureAwait(false); return; diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/AnimalRace.cs b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/AnimalRace.cs similarity index 98% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/AnimalRace.cs rename to NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/AnimalRace.cs index bf1c51ac..0edbb918 100644 --- a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/AnimalRace.cs +++ b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/AnimalRace.cs @@ -1,8 +1,8 @@ using NadekoBot.Common; using NadekoBot.Extensions; using NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Collections.Immutable; diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/AnimalRacingUser.cs b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/AnimalRacingUser.cs similarity index 94% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/AnimalRacingUser.cs rename to NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/AnimalRacingUser.cs index ea9bc453..38d45ba5 100644 --- a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/AnimalRacingUser.cs +++ b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/AnimalRacingUser.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Gambling.Common.AnimalRacing { diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs rename to NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyJoinedException.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs rename to NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AlreadyStartedException.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs rename to NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/AnimalRaceFullException.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs b/NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs rename to NadekoBot.Core/Modules/Gambling/Common/AnimalRacing/Exceptions/NotEnoughFundsException.cs diff --git a/src/NadekoBot/Modules/Gambling/Common/Cards.cs b/NadekoBot.Core/Modules/Gambling/Common/Cards.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/Cards.cs rename to NadekoBot.Core/Modules/Gambling/Common/Cards.cs diff --git a/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/CurrencyEvent.cs b/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/CurrencyEvent.cs new file mode 100644 index 00000000..92dc6e7a --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/CurrencyEvent.cs @@ -0,0 +1,12 @@ +using Discord; +using Discord.Commands; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Gambling.Common +{ + public abstract class CurrencyEvent + { + public abstract Task Stop(); + public abstract Task Start(IUserMessage msg, ICommandContext channel); + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/ReactionEvent.cs b/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/ReactionEvent.cs new file mode 100644 index 00000000..1c13dd9b --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/ReactionEvent.cs @@ -0,0 +1,144 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Common.Collections; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NLog; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Gambling.Common +{ + public class ReactionEvent : CurrencyEvent + { + private readonly ConcurrentHashSet _reactionAwardedUsers = new ConcurrentHashSet(); + private readonly BotConfig _bc; + private readonly Logger _log; + private readonly DiscordSocketClient _client; + private readonly CurrencyService _cs; + private readonly SocketSelfUser _botUser; + + private IUserMessage StartingMessage { get; set; } + + private CancellationTokenSource Source { get; } + private CancellationToken CancelToken { get; } + + private readonly ConcurrentQueue _toGiveTo = new ConcurrentQueue(); + private readonly int _amount; + + public ReactionEvent(BotConfig bc, DiscordSocketClient client, CurrencyService cs, int amount) + { + _bc = bc; + _log = LogManager.GetCurrentClassLogger(); + _client = client; + _cs = cs; + _botUser = client.CurrentUser; + _amount = amount; + Source = new CancellationTokenSource(); + CancelToken = Source.Token; + + var _ = Task.Run(async () => + { + var users = new List(); + while (!CancelToken.IsCancellationRequested) + { + await Task.Delay(1000).ConfigureAwait(false); + while (_toGiveTo.TryDequeue(out var usrId)) + { + users.Add(usrId); + } + + if (users.Count > 0) + { + await _cs.AddToManyAsync("Reaction Event", _amount, users.ToArray()).ConfigureAwait(false); + } + + users.Clear(); + } + }, CancelToken); + } + + public override async Task Stop() + { + if (StartingMessage != null) + await StartingMessage.DeleteAsync().ConfigureAwait(false); + + if (!Source.IsCancellationRequested) + Source.Cancel(); + + _client.MessageDeleted -= MessageDeletedEventHandler; + } + + private Task MessageDeletedEventHandler(Cacheable msg, ISocketMessageChannel channel) + { + if (StartingMessage?.Id == msg.Id) + { + _log.Warn("Stopping flower reaction event because message is deleted."); + var __ = Task.Run(Stop); + } + + return Task.CompletedTask; + } + + public override async Task Start(IUserMessage umsg, ICommandContext context) + { + StartingMessage = umsg; + _client.MessageDeleted += MessageDeletedEventHandler; + + IEmote iemote; + if (Emote.TryParse(_bc.CurrencySign, out var emote)) + { + iemote = emote; + } + else + iemote = new Emoji(_bc.CurrencySign); + try { await StartingMessage.AddReactionAsync(iemote).ConfigureAwait(false); } + catch + { + try { await StartingMessage.AddReactionAsync(iemote).ConfigureAwait(false); } + catch + { + try { await StartingMessage.DeleteAsync().ConfigureAwait(false); } + catch { return; } + } + } + using (StartingMessage.OnReaction(_client, (r) => + { + try + { + if (r.UserId == _botUser.Id) + return; + + if (r.Emote.Name == iemote.Name && r.User.IsSpecified && ((DateTime.UtcNow - r.User.Value.CreatedAt).TotalDays > 5) && _reactionAwardedUsers.Add(r.User.Value.Id)) + { + _toGiveTo.Enqueue(r.UserId); + } + } + catch + { + // ignored + } + })) + { + try + { + await Task.Delay(TimeSpan.FromHours(24), CancelToken).ConfigureAwait(false); + } + catch (OperationCanceledException) + { + + } + if (CancelToken.IsCancellationRequested) + return; + + _log.Warn("Stopping flower reaction event because it expired."); + await Stop(); + } + } + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/SneakyEvent.cs b/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/SneakyEvent.cs new file mode 100644 index 00000000..07ec808e --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/CurrencyEvents/SneakyEvent.cs @@ -0,0 +1,99 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Common; +using NadekoBot.Common.Collections; +using NadekoBot.Core.Services; +using System; +using System.Linq; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Gambling.Common.CurrencyEvents +{ + public class SneakyEvent : CurrencyEvent + { + public event Action OnEnded; + public string Code { get; private set; } = string.Empty; + private readonly ConcurrentHashSet _sneakyGameAwardedUsers = new ConcurrentHashSet(); + + 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 CurrencyService _cs; + private readonly DiscordSocketClient _client; + private readonly IBotConfigProvider _bc; + private readonly int _length; + + public SneakyEvent(CurrencyService cs, DiscordSocketClient client, + IBotConfigProvider bc, int len) + { + _cs = cs; + _client = client; + _bc = bc; + _length = len; + } + + public override async Task Start(IUserMessage msg, ICommandContext channel) + { + GenerateCode(); + + //start the event + _client.MessageReceived += SneakyGameMessageReceivedEventHandler; + await _client.SetGameAsync($"type {Code} for " + _bc.BotConfig.CurrencyPluralName) + .ConfigureAwait(false); + await Task.Delay(_length * 1000).ConfigureAwait(false); + await Stop().ConfigureAwait(false); + } + + private void GenerateCode() + { + var rng = new NadekoRandom(); + + for (var i = 0; i < 5; i++) + { + Code += _sneakyGameStatusChars[rng.Next(0, _sneakyGameStatusChars.Length)]; + } + } + + public override async Task Stop() + { + try + { + _client.MessageReceived -= SneakyGameMessageReceivedEventHandler; + Code = string.Empty; + _sneakyGameAwardedUsers.Clear(); + await _client.SetGameAsync(null).ConfigureAwait(false); + } + catch { } + finally + { + + OnEnded?.Invoke(); + } + } + + private Task SneakyGameMessageReceivedEventHandler(SocketMessage arg) + { + if (arg.Content == Code && + _sneakyGameAwardedUsers.Add(arg.Author.Id)) + { + var _ = Task.Run(async () => + { + await _cs.AddAsync(arg.Author, "Sneaky Game Event", 100, false) + .ConfigureAwait(false); + + try { await arg.DeleteAsync(new RequestOptions() { RetryMode = RetryMode.AlwaysFail }).ConfigureAwait(false); } + catch + { + // ignored + } + }); + } + + return Task.CompletedTask; + } + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Common/CurrencyRaffleGame.cs b/NadekoBot.Core/Modules/Gambling/Common/CurrencyRaffleGame.cs new file mode 100644 index 00000000..7e13b9f8 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Common/CurrencyRaffleGame.cs @@ -0,0 +1,85 @@ +using Discord; +using NadekoBot.Common; +using NLog; +using System.Collections.Generic; +using System.Linq; + +namespace NadekoBot.Core.Modules.Gambling.Common +{ + public class CurrencyRaffleGame + { + public enum Type { + Mixed, + Normal + } + + public class User + { + public IUser DiscordUser { get; set; } + public int Amount { get; set; } + + public override int GetHashCode() + { + return DiscordUser.GetHashCode(); + } + + public override bool Equals(object obj) + { + return obj is User u + ? u.DiscordUser == DiscordUser + : false; + } + } + + private readonly HashSet _users = new HashSet(); + public IEnumerable Users => _users; + public Type GameType { get; } + private readonly Logger _log; + + public CurrencyRaffleGame(Type type) + { + GameType = type; + _log = LogManager.GetCurrentClassLogger(); + } + + public bool AddUser(IUser usr, int 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 User + { + DiscordUser = usr, + Amount = amount, + })) + { + return false; + } + + return true; + } + + public User GetWinner() + { + var rng = new NadekoRandom(); + if (GameType == Type.Mixed) + { + var num = rng.Next(0, Users.Sum(x => x.Amount)); + var sum = 0; + foreach (var u in Users) + { + sum += u.Amount; + if (sum > num) + return u; + } + _log.Error("Woah. Report this.\nRoll: {0}\nAmounts: {1}", num, string.Join(",", Users.Select(x => x.Amount))); + } + + var usrs = _users.ToArray(); + return usrs[rng.Next(0, usrs.Length)]; + } + } +} diff --git a/src/NadekoBot/Modules/Gambling/Common/WheelOfFortune/WheelOfFortune.cs b/NadekoBot.Core/Modules/Gambling/Common/WheelOfFortune/WheelOfFortune.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/Common/WheelOfFortune/WheelOfFortune.cs rename to NadekoBot.Core/Modules/Gambling/Common/WheelOfFortune/WheelOfFortune.cs diff --git a/NadekoBot.Core/Modules/Gambling/CurrencyEventsCommands.cs b/NadekoBot.Core/Modules/Gambling/CurrencyEventsCommands.cs new file mode 100644 index 00000000..0c54165d --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/CurrencyEventsCommands.cs @@ -0,0 +1,91 @@ +using Discord; +using Discord.Commands; +using NadekoBot.Extensions; +using NadekoBot.Core.Services; +using System.Threading.Tasks; +using Discord.WebSocket; +using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Gambling.Common; +using NadekoBot.Modules.Gambling.Services; +using NadekoBot.Modules.Gambling.Common.CurrencyEvents; + +namespace NadekoBot.Modules.Gambling +{ + public partial class Gambling + { + [Group] + public class CurrencyEventsCommands : NadekoSubmodule + { + public enum CurrencyEvent + { + Reaction, + SneakyGameStatus + } + + private readonly DiscordSocketClient _client; + private readonly IBotConfigProvider _bc; + private readonly CurrencyService _cs; + + public CurrencyEventsCommands(DiscordSocketClient client, IBotConfigProvider bc, CurrencyService cs) + { + _client = client; + _bc = bc; + _cs = cs; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [OwnerOnly] + public async Task StartEvent(CurrencyEvent e, int arg = -1) + { + switch (e) + { + case CurrencyEvent.Reaction: + await ReactionEvent(Context, arg).ConfigureAwait(false); + break; + case CurrencyEvent.SneakyGameStatus: + await SneakyGameStatusEvent(Context, arg).ConfigureAwait(false); + break; + } + } + + private async Task SneakyGameStatusEvent(ICommandContext context, int num) + { + if (num < 10 || num > 600) + num = 60; + + var ev = new SneakyEvent(_cs, _client, _bc, num); + if (!await _service.StartSneakyEvent(ev, context.Message, context)) + return; + try + { + var title = GetText("sneakygamestatus_title"); + var desc = GetText("sneakygamestatus_desc", + Format.Bold(100.ToString()) + _bc.BotConfig.CurrencySign, + Format.Bold(num.ToString())); + await context.Channel.SendConfirmAsync(title, desc) + .ConfigureAwait(false); + } + catch + { + // ignored + } + } + + public async Task ReactionEvent(ICommandContext context, int amount) + { + if (amount <= 0) + amount = 100; + + var title = GetText("reaction_title"); + var desc = GetText("reaction_desc", _bc.BotConfig.CurrencySign, Format.Bold(amount.ToString()) + _bc.BotConfig.CurrencySign); + var footer = GetText("reaction_footer", 24); + var re = new ReactionEvent(_bc.BotConfig, _client, _cs, amount); + var msg = await context.Channel.SendConfirmAsync(title, + desc, footer: footer) + .ConfigureAwait(false); + await re.Start(msg, context); + } + } + } +} diff --git a/NadekoBot.Core/Modules/Gambling/CurrencyRaffleCommands.cs b/NadekoBot.Core/Modules/Gambling/CurrencyRaffleCommands.cs new file mode 100644 index 00000000..31043fda --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/CurrencyRaffleCommands.cs @@ -0,0 +1,62 @@ +using NadekoBot.Common.Attributes; +using NadekoBot.Core.Modules.Gambling.Services; +using System.Threading.Tasks; +using Discord; +using NadekoBot.Core.Services; +using NadekoBot.Extensions; +using System.Linq; +using Discord.Commands; + +namespace NadekoBot.Modules.Gambling +{ + public partial class Gambling + { + public class CurrencyRaffleCommands : NadekoSubmodule + { + private readonly IBotConfigProvider _bc; + + public CurrencyRaffleCommands(IBotConfigProvider bc) + { + _bc = bc; + } + + public enum Mixed { Mixed } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [Priority(0)] + public Task RaffleCur(Mixed _, int amount) => + RaffleCur(amount, true); + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + [Priority(1)] + public async Task RaffleCur(int amount, bool mixed = false) + { + if (amount < 1) + return; + async Task OnEnded(IUser arg, int won) + { + await Context.Channel.SendConfirmAsync(GetText("rafflecur_ended", _bc.BotConfig.CurrencyName, Format.Bold(arg.ToString()), won + _bc.BotConfig.CurrencySign)); + } + var res = await _service.JoinOrCreateGame(Context.Channel.Id, + Context.User, amount, mixed, OnEnded) + .ConfigureAwait(false); + + if (res.Item1 != null) + { + await Context.Channel.SendConfirmAsync(GetText("rafflecur", res.Item1.GameType.ToString()), + string.Join("\n", res.Item1.Users.Select(x => $"{x.DiscordUser} ({x.Amount})")), + footer: GetText("rafflecur_joined", Context.User.ToString())).ConfigureAwait(false); + } + else + { + if (res.Item2 == CurrencyRaffleService.JoinErrorType.AlreadyJoinedOrInvalidAmount) + await ReplyErrorLocalized("rafflecur_already_joined").ConfigureAwait(false); + else if (res.Item2 == CurrencyRaffleService.JoinErrorType.NotEnoughCurrency) + await ReplyErrorLocalized("not_enough", _bc.BotConfig.CurrencySign).ConfigureAwait(false); + } + } + } + } +} diff --git a/src/NadekoBot/Modules/Gambling/DiceRollCommands.cs b/NadekoBot.Core/Modules/Gambling/DiceRollCommands.cs similarity index 99% rename from src/NadekoBot/Modules/Gambling/DiceRollCommands.cs rename to NadekoBot.Core/Modules/Gambling/DiceRollCommands.cs index cb2c3b3c..0374ce95 100644 --- a/src/NadekoBot/Modules/Gambling/DiceRollCommands.cs +++ b/NadekoBot.Core/Modules/Gambling/DiceRollCommands.cs @@ -1,7 +1,7 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Collections.Generic; using System.IO; diff --git a/src/NadekoBot/Modules/Gambling/DrawCommands.cs b/NadekoBot.Core/Modules/Gambling/DrawCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Gambling/DrawCommands.cs rename to NadekoBot.Core/Modules/Gambling/DrawCommands.cs diff --git a/src/NadekoBot/Modules/Gambling/FlipCoinCommands.cs b/NadekoBot.Core/Modules/Gambling/FlipCoinCommands.cs similarity index 99% rename from src/NadekoBot/Modules/Gambling/FlipCoinCommands.cs rename to NadekoBot.Core/Modules/Gambling/FlipCoinCommands.cs index 96e69acf..d43bea7e 100644 --- a/src/NadekoBot/Modules/Gambling/FlipCoinCommands.cs +++ b/NadekoBot.Core/Modules/Gambling/FlipCoinCommands.cs @@ -1,7 +1,7 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Collections.Generic; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Gambling/FlowerShopCommands.cs b/NadekoBot.Core/Modules/Gambling/FlowerShopCommands.cs similarity index 99% rename from src/NadekoBot/Modules/Gambling/FlowerShopCommands.cs rename to NadekoBot.Core/Modules/Gambling/FlowerShopCommands.cs index 6f50b7c3..27faf749 100644 --- a/src/NadekoBot/Modules/Gambling/FlowerShopCommands.cs +++ b/NadekoBot.Core/Modules/Gambling/FlowerShopCommands.cs @@ -3,8 +3,8 @@ using Discord.Commands; using Discord.WebSocket; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; @@ -73,7 +73,7 @@ namespace NadekoBot.Modules.Gambling embed.AddField(efb => efb.WithName($"#{curPage * 9 + i + 1} - {entry.Price}{_bc.BotConfig.CurrencySign}").WithValue(EntryToString(entry)).WithIsInline(true)); } return embed; - }, entries.Count / 9, true); + }, entries.Count, 9, true); } [NadekoCommand, Usage, Description, Aliases] diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/NadekoBot.Core/Modules/Gambling/Gambling.cs similarity index 99% rename from src/NadekoBot/Modules/Gambling/Gambling.cs rename to NadekoBot.Core/Modules/Gambling/Gambling.cs index 2ecda7d7..f4cab4c0 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/NadekoBot.Core/Modules/Gambling/Gambling.cs @@ -3,8 +3,8 @@ using Discord.Commands; using NadekoBot.Extensions; using System.Linq; using System.Threading.Tasks; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using NadekoBot.Common; using NadekoBot.Common.Attributes; diff --git a/NadekoBot.Core/Modules/Gambling/Services/AnimalRaceService.cs b/NadekoBot.Core/Modules/Gambling/Services/AnimalRaceService.cs new file mode 100644 index 00000000..6ad6b6b4 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Services/AnimalRaceService.cs @@ -0,0 +1,21 @@ +using System.Threading.Tasks; +using NadekoBot.Core.Services; +using System.Collections.Concurrent; +using NadekoBot.Modules.Gambling.Common.AnimalRacing; + +namespace NadekoBot.Modules.Gambling.Services +{ + public class AnimalRaceService : INService, IUnloadableService + { + public ConcurrentDictionary AnimalRaces { get; } = new ConcurrentDictionary(); + + public Task Unload() + { + foreach (var kvp in AnimalRaces) + { + try { kvp.Value.Dispose(); } catch { } + } + return Task.CompletedTask; + } + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Services/CurrencyEventsService.cs b/NadekoBot.Core/Modules/Gambling/Services/CurrencyEventsService.cs new file mode 100644 index 00000000..3dcd34e9 --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Services/CurrencyEventsService.cs @@ -0,0 +1,66 @@ +using Discord; +using Discord.Commands; +using NadekoBot.Modules.Gambling.Common; +using NadekoBot.Modules.Gambling.Common.CurrencyEvents; +using NadekoBot.Core.Services; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Gambling.Services +{ + public class CurrencyEventsService : INService, IUnloadableService + { + public ConcurrentDictionary> ReactionEvents { get; } + + public SneakyEvent SneakyEvent { get; private set; } = null; + private SemaphoreSlim _sneakyLock = new SemaphoreSlim(1, 1); + + public CurrencyEventsService() + { + ReactionEvents = new ConcurrentDictionary>(); + } + + public async Task StartSneakyEvent(SneakyEvent ev, IUserMessage msg, ICommandContext ctx) + { + await _sneakyLock.WaitAsync().ConfigureAwait(false); + try + { + if (SneakyEvent != null) + return false; + + SneakyEvent = ev; + ev.OnEnded += () => SneakyEvent = null; + var _ = SneakyEvent.Start(msg, ctx).ConfigureAwait(false); + } + finally + { + _sneakyLock.Release(); + } + return true; + } + + public async Task Unload() + { + foreach (var kvp in ReactionEvents) + { + foreach (var ev in kvp.Value) + { + try { await ev.Stop().ConfigureAwait(false); } catch { } + } + } + ReactionEvents.Clear(); + + await _sneakyLock.WaitAsync().ConfigureAwait(false); + try + { + await SneakyEvent.Stop().ConfigureAwait(false); + } + finally + { + _sneakyLock.Release(); + } + } + } +} diff --git a/NadekoBot.Core/Modules/Gambling/Services/CurrencyRaffleService.cs b/NadekoBot.Core/Modules/Gambling/Services/CurrencyRaffleService.cs new file mode 100644 index 00000000..e47909ec --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Services/CurrencyRaffleService.cs @@ -0,0 +1,97 @@ +using System.Threading.Tasks; +using NadekoBot.Core.Services; +using NadekoBot.Core.Modules.Gambling.Common; +using System.Threading; +using System.Linq; +using System.Collections.Generic; +using Discord; +using System; + +namespace NadekoBot.Core.Modules.Gambling.Services +{ + public class CurrencyRaffleService : INService + { + public enum JoinErrorType + { + NotEnoughCurrency, + AlreadyJoinedOrInvalidAmount + } + private readonly SemaphoreSlim _locker = new SemaphoreSlim(1, 1); + private readonly DbService _db; + private readonly CurrencyService _cs; + + public Dictionary Games { get; } = new Dictionary(); + + public CurrencyRaffleService(DbService db, CurrencyService cs) + { + _db = db; + _cs = cs; + } + + public async Task<(CurrencyRaffleGame, JoinErrorType?)> JoinOrCreateGame(ulong channelId, IUser user, int amount, bool mixed, Func onEnded) + { + await _locker.WaitAsync().ConfigureAwait(false); + try + { + var newGame = false; + if (!Games.TryGetValue(channelId, out var crg)) + { + newGame = true; + crg = new CurrencyRaffleGame(mixed + ? CurrencyRaffleGame.Type.Mixed + : CurrencyRaffleGame.Type.Normal); + Games.Add(channelId, crg); + } + using (var uow = _db.UnitOfWork) + { + //remove money, and stop the game if this + // user created it and doesn't have the money + if (!await _cs.RemoveAsync(user.Id, "Currency Raffle Join", amount, uow).ConfigureAwait(false)) + { + if (newGame) + Games.Remove(channelId); + return (null, JoinErrorType.NotEnoughCurrency); + } + + if (!crg.AddUser(user, amount)) + { + await _cs.AddAsync(user.Id, "Curency Raffle Refund", amount, uow).ConfigureAwait(false); + return (null, JoinErrorType.AlreadyJoinedOrInvalidAmount); + } + + uow.Complete(); + } + if (newGame) + { + var _t = Task.Run(async () => + { + await Task.Delay(60000).ConfigureAwait(false); + await _locker.WaitAsync().ConfigureAwait(false); + try + { + var winner = crg.GetWinner(); + var won = crg.Users.Sum(x => x.Amount); + + using (var uow = _db.UnitOfWork) + { + await _cs.AddAsync(winner.DiscordUser.Id, "Currency Raffle Win", + won, uow); + + uow.Complete(); + } + Games.Remove(channelId, out _); + var oe = onEnded(winner.DiscordUser, won); + } + catch { } + finally { _locker.Release(); } + }); + } + return (crg, null); + } + finally + { + _locker.Release(); + } + } + } +} \ No newline at end of file diff --git a/NadekoBot.Core/Modules/Gambling/Services/WaifuService.cs b/NadekoBot.Core/Modules/Gambling/Services/WaifuService.cs new file mode 100644 index 00000000..17ccb4eb --- /dev/null +++ b/NadekoBot.Core/Modules/Gambling/Services/WaifuService.cs @@ -0,0 +1,14 @@ +using NadekoBot.Core.Services; +using System; +using System.Collections.Concurrent; + +namespace NadekoBot.Modules.Gambling.Services +{ + public class WaifuService : INService + { + public ConcurrentDictionary DivorceCooldowns { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary AffinityCooldowns { get; } = new ConcurrentDictionary(); + + + } +} diff --git a/src/NadekoBot/Modules/Gambling/SlotCommands.cs b/NadekoBot.Core/Modules/Gambling/SlotCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Gambling/SlotCommands.cs rename to NadekoBot.Core/Modules/Gambling/SlotCommands.cs index 43cfb8d4..39f3cf9e 100644 --- a/src/NadekoBot/Modules/Gambling/SlotCommands.cs +++ b/NadekoBot.Core/Modules/Gambling/SlotCommands.cs @@ -2,7 +2,7 @@ using Discord.Commands; using ImageSharp; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Collections.Generic; using System.Linq; @@ -176,7 +176,7 @@ namespace NadekoBot.Modules.Gambling using (var file = _images.SlotEmojis[numbers[i]].ToStream()) using (var randomImage = ImageSharp.Image.Load(file)) { - bgImage.DrawImage(randomImage, 100, default(Size), new Point(95 + 142 * i, 330)); + bgImage.DrawImage(randomImage, 100, default, new Point(95 + 142 * i, 330)); } } @@ -189,7 +189,7 @@ namespace NadekoBot.Modules.Gambling using (var fs = _images.SlotNumbers[digit].ToStream()) using (var img = ImageSharp.Image.Load(fs)) { - bgImage.DrawImage(img, 100, default(Size), new Point(230 - n * 16, 462)); + bgImage.DrawImage(img, 100, default, new Point(230 - n * 16, 462)); } n++; } while ((printWon /= 10) != 0); @@ -202,7 +202,7 @@ namespace NadekoBot.Modules.Gambling using (var fs = _images.SlotNumbers[digit].ToStream()) using (var img = ImageSharp.Image.Load(fs)) { - bgImage.DrawImage(img, 100, default(Size), new Point(395 - n * 16, 462)); + bgImage.DrawImage(img, 100, default, new Point(395 - n * 16, 462)); } n++; } while ((printAmount /= 10) != 0); diff --git a/src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs b/NadekoBot.Core/Modules/Gambling/WaifuClaimCommands.cs similarity index 97% rename from src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs rename to NadekoBot.Core/Modules/Gambling/WaifuClaimCommands.cs index 5d46f976..630a1652 100644 --- a/src/NadekoBot/Modules/Gambling/WaifuClaimCommands.cs +++ b/NadekoBot.Core/Modules/Gambling/WaifuClaimCommands.cs @@ -1,15 +1,15 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; -using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common; using NadekoBot.Common.Attributes; +using NadekoBot.Modules.Gambling.Services; namespace NadekoBot.Modules.Gambling { @@ -46,11 +46,8 @@ namespace NadekoBot.Modules.Gambling } [Group] - public class WaifuClaimCommands : NadekoSubmodule + public class WaifuClaimCommands : NadekoSubmodule { - private static ConcurrentDictionary _divorceCooldowns { get; } = new ConcurrentDictionary(); - private static ConcurrentDictionary _affinityCooldowns { get; } = new ConcurrentDictionary(); - enum WaifuClaimResult { Success, @@ -219,7 +216,7 @@ namespace NadekoBot.Modules.Gambling var now = DateTime.UtcNow; if (w?.Claimer == null || w.Claimer.UserId != Context.User.Id) result = DivorceResult.NotYourWife; - else if (_divorceCooldowns.AddOrUpdate(Context.User.Id, + else if (_service.DivorceCooldowns.AddOrUpdate(Context.User.Id, now, (key, old) => ((difference = now.Subtract(old)) > _divorceLimit) ? now : old) != now) { @@ -303,7 +300,7 @@ namespace NadekoBot.Modules.Gambling if (w?.Affinity?.UserId == u?.Id) { } - else if (_affinityCooldowns.AddOrUpdate(Context.User.Id, + else if (_service.AffinityCooldowns.AddOrUpdate(Context.User.Id, now, (key, old) => ((difference = now.Subtract(old)) > _affinityLimit) ? now : old) != now) { diff --git a/src/NadekoBot/Modules/Gambling/WheelOfFortuneCommands.cs b/NadekoBot.Core/Modules/Gambling/WheelOfFortuneCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Gambling/WheelOfFortuneCommands.cs rename to NadekoBot.Core/Modules/Gambling/WheelOfFortuneCommands.cs index cd3de369..ecbf4489 100644 --- a/src/NadekoBot/Modules/Gambling/WheelOfFortuneCommands.cs +++ b/NadekoBot.Core/Modules/Gambling/WheelOfFortuneCommands.cs @@ -3,7 +3,7 @@ using Discord.Commands; using NadekoBot.Common.Attributes; using NadekoBot.Extensions; using NadekoBot.Modules.Gambling.Common.WheelOfFortune; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Threading.Tasks; using Wof = NadekoBot.Modules.Gambling.Common.WheelOfFortune.WheelOfFortune; diff --git a/src/NadekoBot/Modules/Games/AcropobiaCommands.cs b/NadekoBot.Core/Modules/Games/AcropobiaCommands.cs similarity index 93% rename from src/NadekoBot/Modules/Games/AcropobiaCommands.cs rename to NadekoBot.Core/Modules/Games/AcropobiaCommands.cs index f933d3bf..7b98c638 100644 --- a/src/NadekoBot/Modules/Games/AcropobiaCommands.cs +++ b/NadekoBot.Core/Modules/Games/AcropobiaCommands.cs @@ -2,26 +2,23 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; -using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Games.Common.Acrophobia; +using NadekoBot.Modules.Games.Services; namespace NadekoBot.Modules.Games { public partial class Games { [Group] - public class AcropobiaCommands : NadekoSubmodule + public class AcropobiaCommands : NadekoSubmodule { private readonly DiscordSocketClient _client; - //channelId, game - public static ConcurrentDictionary AcrophobiaGames { get; } = new ConcurrentDictionary(); - public AcropobiaCommands(DiscordSocketClient client) { _client = client; @@ -36,7 +33,7 @@ namespace NadekoBot.Modules.Games var channel = (ITextChannel)Context.Channel; var game = new Acrophobia(submissionTime); - if (AcrophobiaGames.TryAdd(channel.Id, game)) + if (_service.AcrophobiaGames.TryAdd(channel.Id, game)) { try { @@ -50,7 +47,7 @@ namespace NadekoBot.Modules.Games finally { _client.MessageReceived -= _client_MessageReceived; - AcrophobiaGames.TryRemove(channel.Id, out game); + _service.AcrophobiaGames.TryRemove(channel.Id, out game); game.Dispose(); } } diff --git a/src/NadekoBot/Modules/Games/CleverBotCommands.cs b/NadekoBot.Core/Modules/Games/CleverBotCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Games/CleverBotCommands.cs rename to NadekoBot.Core/Modules/Games/CleverBotCommands.cs index 3373a98a..093b7530 100644 --- a/src/NadekoBot/Modules/Games/CleverBotCommands.cs +++ b/NadekoBot.Core/Modules/Games/CleverBotCommands.cs @@ -1,6 +1,6 @@ using Discord; using Discord.Commands; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Threading.Tasks; using NadekoBot.Common.Attributes; diff --git a/src/NadekoBot/Modules/Games/Common/Acrophobia/Acrophobia.cs b/NadekoBot.Core/Modules/Games/Common/Acrophobia/Acrophobia.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Acrophobia/Acrophobia.cs rename to NadekoBot.Core/Modules/Games/Common/Acrophobia/Acrophobia.cs diff --git a/src/NadekoBot/Modules/Games/Common/Acrophobia/AcrophobiaUser.cs b/NadekoBot.Core/Modules/Games/Common/Acrophobia/AcrophobiaUser.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Acrophobia/AcrophobiaUser.cs rename to NadekoBot.Core/Modules/Games/Common/Acrophobia/AcrophobiaUser.cs diff --git a/src/NadekoBot/Modules/Games/Common/ChatterBot/ChatterBotResponse.cs b/NadekoBot.Core/Modules/Games/Common/ChatterBot/ChatterBotResponse.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/ChatterBot/ChatterBotResponse.cs rename to NadekoBot.Core/Modules/Games/Common/ChatterBot/ChatterBotResponse.cs diff --git a/src/NadekoBot/Modules/Games/Common/ChatterBot/ChatterBotSession.cs b/NadekoBot.Core/Modules/Games/Common/ChatterBot/ChatterBotSession.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/ChatterBot/ChatterBotSession.cs rename to NadekoBot.Core/Modules/Games/Common/ChatterBot/ChatterBotSession.cs diff --git a/src/NadekoBot/Modules/Games/Common/ChatterBot/CleverbotResponse.cs b/NadekoBot.Core/Modules/Games/Common/ChatterBot/CleverbotResponse.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/ChatterBot/CleverbotResponse.cs rename to NadekoBot.Core/Modules/Games/Common/ChatterBot/CleverbotResponse.cs diff --git a/src/NadekoBot/Modules/Games/Common/ChatterBot/IChatterBotSession.cs b/NadekoBot.Core/Modules/Games/Common/ChatterBot/IChatterBotSession.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/ChatterBot/IChatterBotSession.cs rename to NadekoBot.Core/Modules/Games/Common/ChatterBot/IChatterBotSession.cs diff --git a/src/NadekoBot/Modules/Games/Common/ChatterBot/OfficialCleverbotSession.cs b/NadekoBot.Core/Modules/Games/Common/ChatterBot/OfficialCleverbotSession.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/ChatterBot/OfficialCleverbotSession.cs rename to NadekoBot.Core/Modules/Games/Common/ChatterBot/OfficialCleverbotSession.cs diff --git a/src/NadekoBot/Modules/Games/Common/Connect4/Connect4.cs b/NadekoBot.Core/Modules/Games/Common/Connect4/Connect4.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Connect4/Connect4.cs rename to NadekoBot.Core/Modules/Games/Common/Connect4/Connect4.cs diff --git a/src/NadekoBot/Modules/Games/Common/GirlRating.cs b/NadekoBot.Core/Modules/Games/Common/GirlRating.cs similarity index 98% rename from src/NadekoBot/Modules/Games/Common/GirlRating.cs rename to NadekoBot.Core/Modules/Games/Common/GirlRating.cs index d605be0d..6b7354f3 100644 --- a/src/NadekoBot/Modules/Games/Common/GirlRating.cs +++ b/NadekoBot.Core/Modules/Games/Common/GirlRating.cs @@ -5,7 +5,7 @@ using System.Net.Http; using ImageSharp; using NadekoBot.Common; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using NLog; using SixLabors.Primitives; diff --git a/src/NadekoBot/Modules/Games/Common/Hangman/Exceptions/TermNotFoundException.cs b/NadekoBot.Core/Modules/Games/Common/Hangman/Exceptions/TermNotFoundException.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Hangman/Exceptions/TermNotFoundException.cs rename to NadekoBot.Core/Modules/Games/Common/Hangman/Exceptions/TermNotFoundException.cs diff --git a/src/NadekoBot/Modules/Games/Common/Hangman/Hangman.cs b/NadekoBot.Core/Modules/Games/Common/Hangman/Hangman.cs similarity index 96% rename from src/NadekoBot/Modules/Games/Common/Hangman/Hangman.cs rename to NadekoBot.Core/Modules/Games/Common/Hangman/Hangman.cs index c3c7f9e9..3e7be20f 100644 --- a/src/NadekoBot/Modules/Games/Common/Hangman/Hangman.cs +++ b/NadekoBot.Core/Modules/Games/Common/Hangman/Hangman.cs @@ -11,6 +11,7 @@ namespace NadekoBot.Modules.Games.Common.Hangman public class Hangman : IDisposable { public string TermType { get; } + public TermPool TermPool { get; } public HangmanObject Term { get; } public string ScrambledWord => "`" + String.Concat(Term.Word.Select(c => @@ -56,10 +57,11 @@ namespace NadekoBot.Modules.Games.Common.Hangman public Task EndedTask => _endingCompletionSource.Task; - public Hangman(string type) + public Hangman(string type, TermPool tp = null) { this.TermType = type.Trim().ToLowerInvariant().ToTitleCase(); - this.Term = TermPool.GetTerm(type); + this.TermPool = tp ?? new TermPool(); + this.Term = this.TermPool.GetTerm(type); } private void AddError() diff --git a/src/NadekoBot/Modules/Games/Common/Hangman/HangmanObject.cs b/NadekoBot.Core/Modules/Games/Common/Hangman/HangmanObject.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Hangman/HangmanObject.cs rename to NadekoBot.Core/Modules/Games/Common/Hangman/HangmanObject.cs diff --git a/src/NadekoBot/Modules/Games/Common/Hangman/Phase.cs b/NadekoBot.Core/Modules/Games/Common/Hangman/Phase.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Hangman/Phase.cs rename to NadekoBot.Core/Modules/Games/Common/Hangman/Phase.cs diff --git a/src/NadekoBot/Modules/Games/Common/Hangman/TermPool.cs b/NadekoBot.Core/Modules/Games/Common/Hangman/TermPool.cs similarity index 66% rename from src/NadekoBot/Modules/Games/Common/Hangman/TermPool.cs rename to NadekoBot.Core/Modules/Games/Common/Hangman/TermPool.cs index 58ba56c4..2cc98d15 100644 --- a/src/NadekoBot/Modules/Games/Common/Hangman/TermPool.cs +++ b/NadekoBot.Core/Modules/Games/Common/Hangman/TermPool.cs @@ -5,27 +5,35 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using NLog; namespace NadekoBot.Modules.Games.Common.Hangman { public class TermPool { const string termsPath = "data/hangman3.json"; - public static IReadOnlyDictionary Data { get; } = new Dictionary(); - static TermPool() + private readonly Logger _log; + + public IReadOnlyDictionary Data { get; } = new Dictionary(); + public TermPool() { + _log = LogManager.GetCurrentClassLogger(); try { Data = JsonConvert.DeserializeObject>(File.ReadAllText(termsPath)); + Data = Data.ToDictionary( + x => x.Key.ToLowerInvariant(), + x => x.Value); } - catch (Exception) + catch (Exception ex) { - //ignored + _log.Warn(ex); } } - public static HangmanObject GetTerm(string type) + public HangmanObject GetTerm(string type) { + type = type?.Trim().ToLowerInvariant(); var rng = new NadekoRandom(); if (type == "random") diff --git a/src/NadekoBot/Modules/Games/Common/Hangman/TermType.cs b/NadekoBot.Core/Modules/Games/Common/Hangman/TermType.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Hangman/TermType.cs rename to NadekoBot.Core/Modules/Games/Common/Hangman/TermType.cs diff --git a/src/NadekoBot/Modules/Games/Common/Nunchi/Nunchi.cs b/NadekoBot.Core/Modules/Games/Common/Nunchi/Nunchi.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Nunchi/Nunchi.cs rename to NadekoBot.Core/Modules/Games/Common/Nunchi/Nunchi.cs diff --git a/src/NadekoBot/Modules/Games/Common/Poll.cs b/NadekoBot.Core/Modules/Games/Common/Poll.cs similarity index 99% rename from src/NadekoBot/Modules/Games/Common/Poll.cs rename to NadekoBot.Core/Modules/Games/Common/Poll.cs index cf051a07..e1e3ee01 100644 --- a/src/NadekoBot/Modules/Games/Common/Poll.cs +++ b/NadekoBot.Core/Modules/Games/Common/Poll.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using Discord; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Modules.Games.Common { diff --git a/NadekoBot.Core/Modules/Games/Common/TicTacToe.cs b/NadekoBot.Core/Modules/Games/Common/TicTacToe.cs new file mode 100644 index 00000000..32a3d993 --- /dev/null +++ b/NadekoBot.Core/Modules/Games/Common/TicTacToe.cs @@ -0,0 +1,277 @@ +using Discord; +using Discord.WebSocket; +using NadekoBot.Extensions; +using NadekoBot.Core.Services.Impl; +using System; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace NadekoBot.Modules.Games.Common +{ + public class TicTacToe + { + enum Phase + { + Starting, + Started, + Ended + } + + private readonly ITextChannel _channel; + private readonly IGuildUser[] _users; + private readonly int?[,] _state; + private Phase _phase; + private int _curUserIndex; + private readonly SemaphoreSlim _moveLock; + + private IGuildUser _winner; + + private readonly string[] _numbers = { ":one:", ":two:", ":three:", ":four:", ":five:", ":six:", ":seven:", ":eight:", ":nine:" }; + + public Action OnEnded; + + private IUserMessage _previousMessage; + private Timer _timeoutTimer; + private readonly NadekoStrings _strings; + private readonly DiscordSocketClient _client; + + public TicTacToe(NadekoStrings strings, DiscordSocketClient client, ITextChannel channel, IGuildUser firstUser) + { + _channel = channel; + _strings = strings; + _client = client; + + _users = new[] { firstUser, null }; + _state = new int?[,] { + { null, null, null }, + { null, null, null }, + { null, null, null }, + }; + + _phase = Phase.Starting; + _moveLock = new SemaphoreSlim(1, 1); + } + + private string GetText(string key, params object[] replacements) => + _strings.GetText(key, + _channel.GuildId, + typeof(Games).Name.ToLowerInvariant(), + replacements); + + public string GetState() + { + var sb = new StringBuilder(); + for (var i = 0; i < _state.GetLength(0); i++) + { + for (var j = 0; j < _state.GetLength(1); j++) + { + sb.Append(_state[i, j] == null ? _numbers[i * 3 + j] : GetIcon(_state[i, j])); + if (j < _state.GetLength(1) - 1) + sb.Append("┃"); + } + if (i < _state.GetLength(0) - 1) + sb.AppendLine("\n──────────"); + } + + return sb.ToString(); + } + + public EmbedBuilder GetEmbed(string title = null) + { + var embed = new EmbedBuilder() + .WithOkColor() + .WithDescription(Environment.NewLine + GetState()) + .WithAuthor(eab => eab.WithName(GetText("vs", _users[0], _users[1]))); + + if (!string.IsNullOrWhiteSpace(title)) + embed.WithTitle(title); + + if (_winner == null) + { + if (_phase == Phase.Ended) + embed.WithFooter(efb => efb.WithText(GetText("ttt_no_moves"))); + else + embed.WithFooter(efb => efb.WithText(GetText("ttt_users_move", _users[_curUserIndex]))); + } + else + embed.WithFooter(efb => efb.WithText(GetText("ttt_has_won", _winner))); + + return embed; + } + + private static string GetIcon(int? val) + { + switch (val) + { + case 0: + return "❌"; + case 1: + return "⭕"; + case 2: + return "❎"; + case 3: + return "🅾"; + default: + return "⬛"; + } + } + + public async Task Start(IGuildUser user) + { + if (_phase == Phase.Started || _phase == Phase.Ended) + { + await _channel.SendErrorAsync(user.Mention + GetText("ttt_already_running")).ConfigureAwait(false); + return; + } + else if (_users[0] == user) + { + await _channel.SendErrorAsync(user.Mention + GetText("ttt_against_yourself")).ConfigureAwait(false); + return; + } + + _users[1] = user; + + _phase = Phase.Started; + + _timeoutTimer = new Timer(async (_) => + { + await _moveLock.WaitAsync(); + try + { + if (_phase == Phase.Ended) + return; + + _phase = Phase.Ended; + if (_users[1] != null) + { + _winner = _users[_curUserIndex ^= 1]; + var del = _previousMessage?.DeleteAsync(); + try + { + await _channel.EmbedAsync(GetEmbed(GetText("ttt_time_expired"))).ConfigureAwait(false); + if (del != null) + await del.ConfigureAwait(false); + } + catch { } + } + + OnEnded?.Invoke(this); + } + catch { } + finally + { + _moveLock.Release(); + } + }, null, 15000, Timeout.Infinite); + + _client.MessageReceived += Client_MessageReceived; + + + _previousMessage = await _channel.EmbedAsync(GetEmbed(GetText("game_started"))).ConfigureAwait(false); + } + + private bool IsDraw() + { + for (var i = 0; i < 3; i++) + { + for (var j = 0; j < 3; j++) + { + if (_state[i, j] == null) + return false; + } + } + return true; + } + + private Task Client_MessageReceived(SocketMessage msg) + { + var _ = Task.Run(async () => + { + await _moveLock.WaitAsync().ConfigureAwait(false); + try + { + var curUser = _users[_curUserIndex]; + if (_phase == Phase.Ended || msg.Author?.Id != curUser.Id) + return; + + if (int.TryParse(msg.Content, out var index) && + --index >= 0 && + index <= 9 && + _state[index / 3, index % 3] == null) + { + _state[index / 3, index % 3] = _curUserIndex; + + // i'm lazy + if (_state[index / 3, 0] == _state[index / 3, 1] && _state[index / 3, 1] == _state[index / 3, 2]) + { + _state[index / 3, 0] = _curUserIndex + 2; + _state[index / 3, 1] = _curUserIndex + 2; + _state[index / 3, 2] = _curUserIndex + 2; + + _phase = Phase.Ended; + } + else if (_state[0, index % 3] == _state[1, index % 3] && _state[1, index % 3] == _state[2, index % 3]) + { + _state[0, index % 3] = _curUserIndex + 2; + _state[1, index % 3] = _curUserIndex + 2; + _state[2, index % 3] = _curUserIndex + 2; + + _phase = Phase.Ended; + } + else if (_curUserIndex == _state[0, 0] && _state[0, 0] == _state[1, 1] && _state[1, 1] == _state[2, 2]) + { + _state[0, 0] = _curUserIndex + 2; + _state[1, 1] = _curUserIndex + 2; + _state[2, 2] = _curUserIndex + 2; + + _phase = Phase.Ended; + } + else if (_curUserIndex == _state[0, 2] && _state[0, 2] == _state[1, 1] && _state[1, 1] == _state[2, 0]) + { + _state[0, 2] = _curUserIndex + 2; + _state[1, 1] = _curUserIndex + 2; + _state[2, 0] = _curUserIndex + 2; + + _phase = Phase.Ended; + } + var reason = ""; + + if (_phase == Phase.Ended) // if user won, stop receiving moves + { + reason = GetText("ttt_matched_three"); + _winner = _users[_curUserIndex]; + _client.MessageReceived -= Client_MessageReceived; + OnEnded?.Invoke(this); + } + else if (IsDraw()) + { + reason = GetText("ttt_a_draw"); + _phase = Phase.Ended; + _client.MessageReceived -= Client_MessageReceived; + OnEnded?.Invoke(this); + } + + var sendstate = Task.Run(async () => + { + var del1 = msg.DeleteAsync(); + var del2 = _previousMessage?.DeleteAsync(); + try { _previousMessage = await _channel.EmbedAsync(GetEmbed(reason)); } catch { } + try { await del1; } catch { } + try { if (del2 != null) await del2; } catch { } + }); + _curUserIndex ^= 1; + + _timeoutTimer.Change(15000, Timeout.Infinite); + } + } + finally + { + _moveLock.Release(); + } + }); + + return Task.CompletedTask; + } + } +} diff --git a/src/NadekoBot/Modules/Games/Common/Trivia/TriviaGame.cs b/NadekoBot.Core/Modules/Games/Common/Trivia/TriviaGame.cs similarity index 99% rename from src/NadekoBot/Modules/Games/Common/Trivia/TriviaGame.cs rename to NadekoBot.Core/Modules/Games/Common/Trivia/TriviaGame.cs index abafdb67..e3e98b03 100644 --- a/src/NadekoBot/Modules/Games/Common/Trivia/TriviaGame.cs +++ b/NadekoBot.Core/Modules/Games/Common/Trivia/TriviaGame.cs @@ -9,8 +9,8 @@ using Discord; using Discord.Net; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Impl; using NLog; namespace NadekoBot.Modules.Games.Common.Trivia diff --git a/src/NadekoBot/Modules/Games/Common/Trivia/TriviaQuestion.cs b/NadekoBot.Core/Modules/Games/Common/Trivia/TriviaQuestion.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Trivia/TriviaQuestion.cs rename to NadekoBot.Core/Modules/Games/Common/Trivia/TriviaQuestion.cs diff --git a/src/NadekoBot/Modules/Games/Common/Trivia/TriviaQuestionPool.cs b/NadekoBot.Core/Modules/Games/Common/Trivia/TriviaQuestionPool.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/Trivia/TriviaQuestionPool.cs rename to NadekoBot.Core/Modules/Games/Common/Trivia/TriviaQuestionPool.cs diff --git a/src/NadekoBot/Modules/Games/Common/TypingArticle.cs b/NadekoBot.Core/Modules/Games/Common/TypingArticle.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/TypingArticle.cs rename to NadekoBot.Core/Modules/Games/Common/TypingArticle.cs diff --git a/src/NadekoBot/Modules/Games/Common/TypingGame.cs b/NadekoBot.Core/Modules/Games/Common/TypingGame.cs similarity index 100% rename from src/NadekoBot/Modules/Games/Common/TypingGame.cs rename to NadekoBot.Core/Modules/Games/Common/TypingGame.cs diff --git a/src/NadekoBot/Modules/Games/Connect4Commands.cs b/NadekoBot.Core/Modules/Games/Connect4Commands.cs similarity index 91% rename from src/NadekoBot/Modules/Games/Connect4Commands.cs rename to NadekoBot.Core/Modules/Games/Connect4Commands.cs index 5a1183c2..e6413178 100644 --- a/src/NadekoBot/Modules/Games/Connect4Commands.cs +++ b/NadekoBot.Core/Modules/Games/Connect4Commands.cs @@ -1,10 +1,10 @@ -using Discord; +using Discord; using Discord.Commands; using Discord.WebSocket; using NadekoBot.Common.Attributes; using NadekoBot.Extensions; using NadekoBot.Modules.Games.Common.Connect4; -using System.Collections.Concurrent; +using NadekoBot.Modules.Games.Services; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -13,12 +13,11 @@ namespace NadekoBot.Modules.Games { public partial class Games { - public class Connect4Commands : NadekoSubmodule + [Group] + public class Connect4Commands : NadekoSubmodule { - public static ConcurrentDictionary Games = new ConcurrentDictionary(); private readonly DiscordSocketClient _client; - - //private readonly string[] numbers = new string[] { "⓪", " ①", "②", "③", "④", "⑤", "⑥", "⑦", "⑧", "⑨" }; + private readonly string[] numbers = new string[] { ":one:", ":two:", ":three:", ":four:", ":five:", ":six:", ":seven:", ":eight:"}; public Connect4Commands(DiscordSocketClient client) @@ -32,7 +31,7 @@ namespace NadekoBot.Modules.Games { var newGame = new Connect4Game(Context.User.Id, Context.User.ToString()); Connect4Game game; - if ((game = Games.GetOrAdd(Context.Channel.Id, newGame)) != newGame) + if ((game = _service.Connect4Games.GetOrAdd(Context.Channel.Id, newGame)) != newGame) { if (game.CurrentPhase != Connect4Game.Phase.Joining) return; @@ -84,7 +83,7 @@ namespace NadekoBot.Modules.Games Task Game_OnGameFailedToStart(Connect4Game arg) { - if (Games.TryRemove(Context.Channel.Id, out var toDispose)) + if (_service.Connect4Games.TryRemove(Context.Channel.Id, out var toDispose)) { _client.MessageReceived -= _client_MessageReceived; toDispose.Dispose(); @@ -94,7 +93,7 @@ namespace NadekoBot.Modules.Games Task Game_OnGameEnded(Connect4Game arg, Connect4Game.Result result) { - if (Games.TryRemove(Context.Channel.Id, out var toDispose)) + if (_service.Connect4Games.TryRemove(Context.Channel.Id, out var toDispose)) { _client.MessageReceived -= _client_MessageReceived; toDispose.Dispose(); diff --git a/src/NadekoBot/Modules/Games/Games.cs b/NadekoBot.Core/Modules/Games/Games.cs similarity index 98% rename from src/NadekoBot/Modules/Games/Games.cs rename to NadekoBot.Core/Modules/Games/Games.cs index 07fd450e..e6a75dc7 100644 --- a/src/NadekoBot/Modules/Games/Games.cs +++ b/NadekoBot.Core/Modules/Games/Games.cs @@ -1,6 +1,6 @@ using Discord.Commands; using Discord; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Threading.Tasks; using System; using NadekoBot.Common; @@ -44,7 +44,7 @@ namespace NadekoBot.Modules.Games return; await Context.Channel.EmbedAsync(new EmbedBuilder().WithColor(NadekoBot.OkColor) - .AddField(efb => efb.WithName("❓ " + GetText("question") ).WithValue(question).WithIsInline(false)) + .AddField(efb => efb.WithName("test❓ " + GetText("question") ).WithValue(question).WithIsInline(false)) .AddField(efb => efb.WithName("🎱 " + GetText("8ball")).WithValue(_service.EightBallResponses[new NadekoRandom().Next(0, _service.EightBallResponses.Length)]).WithIsInline(false))); } diff --git a/src/NadekoBot/Modules/Games/HangmanCommands.cs b/NadekoBot.Core/Modules/Games/HangmanCommands.cs similarity index 91% rename from src/NadekoBot/Modules/Games/HangmanCommands.cs rename to NadekoBot.Core/Modules/Games/HangmanCommands.cs index f95f1a99..97340865 100644 --- a/src/NadekoBot/Modules/Games/HangmanCommands.cs +++ b/NadekoBot.Core/Modules/Games/HangmanCommands.cs @@ -1,19 +1,19 @@ using Discord.Commands; using NadekoBot.Extensions; using System; -using System.Collections.Concurrent; using System.Threading.Tasks; using Discord; using Discord.WebSocket; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Games.Common.Hangman; +using NadekoBot.Modules.Games.Services; namespace NadekoBot.Modules.Games { public partial class Games { [Group] - public class HangmanCommands : NadekoSubmodule + public class HangmanCommands : NadekoSubmodule { private readonly DiscordSocketClient _client; @@ -22,23 +22,20 @@ namespace NadekoBot.Modules.Games _client = client; } - //channelId, game - public static ConcurrentDictionary HangmanGames { get; } = new ConcurrentDictionary(); - [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] public async Task Hangmanlist() { - await Context.Channel.SendConfirmAsync(Format.Code(GetText("hangman_types", Prefix)) + "\n" + string.Join("\n", TermPool.Data.Keys)); + await Context.Channel.SendConfirmAsync(Format.Code(GetText("hangman_types", Prefix)) + "\n" + string.Join("\n", _service.TermPool.Data.Keys)); } [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] public async Task Hangman([Remainder]string type = "random") { - var hm = new Hangman(type); + var hm = new Hangman(type, _service.TermPool); - if (!HangmanGames.TryAdd(Context.Channel.Id, hm)) + if (!_service.HangmanGames.TryAdd(Context.Channel.Id, hm)) { hm.Dispose(); await ReplyErrorLocalized("hangman_running").ConfigureAwait(false); @@ -61,7 +58,7 @@ namespace NadekoBot.Modules.Games await hm.EndedTask.ConfigureAwait(false); _client.MessageReceived -= _client_MessageReceived; - HangmanGames.TryRemove(Context.Channel.Id, out _); + _service.HangmanGames.TryRemove(Context.Channel.Id, out _); hm.Dispose(); Task _client_MessageReceived(SocketMessage msg) @@ -127,7 +124,7 @@ namespace NadekoBot.Modules.Games [RequireContext(ContextType.Guild)] public async Task HangmanStop() { - if (HangmanGames.TryRemove(Context.Channel.Id, out var removed)) + if (_service.HangmanGames.TryRemove(Context.Channel.Id, out var removed)) { await removed.Stop().ConfigureAwait(false); await ReplyConfirmLocalized("hangman_stopped").ConfigureAwait(false); diff --git a/src/NadekoBot/Modules/Games/LeetCommands.cs b/NadekoBot.Core/Modules/Games/LeetCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Games/LeetCommands.cs rename to NadekoBot.Core/Modules/Games/LeetCommands.cs diff --git a/src/NadekoBot/Modules/Games/NunchiCommands.cs b/NadekoBot.Core/Modules/Games/NunchiCommands.cs similarity index 90% rename from src/NadekoBot/Modules/Games/NunchiCommands.cs rename to NadekoBot.Core/Modules/Games/NunchiCommands.cs index 834e2c02..9b709261 100644 --- a/src/NadekoBot/Modules/Games/NunchiCommands.cs +++ b/NadekoBot.Core/Modules/Games/NunchiCommands.cs @@ -3,8 +3,8 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Games.Common.Nunchi; +using NadekoBot.Modules.Games.Services; using System; -using System.Collections.Concurrent; using System.Linq; using System.Threading.Tasks; @@ -12,9 +12,9 @@ namespace NadekoBot.Modules.Games { public partial class Games { - public class NunchiCommands : NadekoSubmodule + [Group] + public class NunchiCommands : NadekoSubmodule { - public static readonly ConcurrentDictionary Games = new ConcurrentDictionary(); private readonly DiscordSocketClient _client; public NunchiCommands(DiscordSocketClient client) @@ -30,7 +30,7 @@ namespace NadekoBot.Modules.Games Nunchi nunchi; //if a game was already active - if ((nunchi = Games.GetOrAdd(Context.Guild.Id, newNunchi)) != newNunchi) + if ((nunchi = _service.NunchiGames.GetOrAdd(Context.Guild.Id, newNunchi)) != newNunchi) { // join it if (!await nunchi.Join(Context.User.Id, Context.User.ToString())) @@ -57,7 +57,7 @@ namespace NadekoBot.Modules.Games var success = await nunchi.Initialize().ConfigureAwait(false); if (!success) { - if (Games.TryRemove(Context.Guild.Id, out var game)) + if (_service.NunchiGames.TryRemove(Context.Guild.Id, out var game)) game.Dispose(); await ConfirmLocalized("nunchi_failed_to_start").ConfigureAwait(false); } @@ -85,7 +85,7 @@ namespace NadekoBot.Modules.Games Task Nunchi_OnGameEnded(Nunchi arg1, string arg2) { - if (Games.TryRemove(Context.Guild.Id, out var game)) + if (_service.NunchiGames.TryRemove(Context.Guild.Id, out var game)) { _client.MessageReceived -= _client_MessageReceived; game.Dispose(); diff --git a/src/NadekoBot/Modules/Games/PlantAndPickCommands.cs b/NadekoBot.Core/Modules/Games/PlantAndPickCommands.cs similarity index 76% rename from src/NadekoBot/Modules/Games/PlantAndPickCommands.cs rename to NadekoBot.Core/Modules/Games/PlantAndPickCommands.cs index 3bbe2c79..1cb1e388 100644 --- a/src/NadekoBot/Modules/Games/PlantAndPickCommands.cs +++ b/NadekoBot.Core/Modules/Games/PlantAndPickCommands.cs @@ -2,8 +2,8 @@ using Discord.Commands; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -22,19 +22,18 @@ namespace NadekoBot.Modules.Games /// https://discord.gg/0TYNJfCU4De7YIk8 /// [Group] - public class PlantPickCommands : NadekoSubmodule + public class PlantPickCommands : NadekoSubmodule { + //todo rewrite private readonly CurrencyService _cs; private readonly IBotConfigProvider _bc; - private readonly GamesService _games; private readonly DbService _db; - public PlantPickCommands(IBotConfigProvider bc, CurrencyService cs, GamesService games, + public PlantPickCommands(IBotConfigProvider bc, CurrencyService cs, DbService db) { _bc = bc; _cs = cs; - _games = games; _db = db; } @@ -44,12 +43,12 @@ namespace NadekoBot.Modules.Games { var channel = (ITextChannel)Context.Channel; + ///waaaaaat if (!(await channel.Guild.GetCurrentUserAsync()).GetPermissions(channel).ManageMessages) return; - try { await Context.Message.DeleteAsync().ConfigureAwait(false); } catch { } - if (!_games.PlantedFlowers.TryRemove(channel.Id, out List msgs)) + if (!_service.PlantedFlowers.TryRemove(channel.Id, out List msgs)) return; await Task.WhenAll(msgs.Where(m => m != null).Select(toDelete => toDelete.DeleteAsync())).ConfigureAwait(false); @@ -74,28 +73,32 @@ namespace NadekoBot.Modules.Games return; } - var imgData = _games.GetRandomCurrencyImage(); - - var msgToSend = GetText("planted", - Format.Bold(Context.User.ToString()), - amount + _bc.BotConfig.CurrencySign, - Prefix); - - if (amount > 1) - msgToSend += " " + GetText("pick_pl", Prefix); - else - msgToSend += " " + GetText("pick_sn", Prefix); - - IUserMessage msg; - using (var toSend = imgData.Data.ToStream()) + IUserMessage msg = null; + try { - msg = await Context.Channel.SendFileAsync(toSend, imgData.Name, msgToSend).ConfigureAwait(false); + var imgData = _service.GetRandomCurrencyImage(); + + var msgToSend = GetText("planted", + Format.Bold(Context.User.ToString()), + amount + _bc.BotConfig.CurrencySign, + Prefix); + + if (amount > 1) + msgToSend += " " + GetText("pick_pl", Prefix); + else + msgToSend += " " + GetText("pick_sn", Prefix); + + using (var toSend = imgData.Data.ToStream()) + { + msg = await Context.Channel.SendFileAsync(toSend, imgData.Name, msgToSend).ConfigureAwait(false); + } } + catch { } var msgs = new IUserMessage[amount]; msgs[0] = msg; - _games.PlantedFlowers.AddOrUpdate(Context.Channel.Id, msgs.ToList(), (id, old) => + _service.PlantedFlowers.AddOrUpdate(Context.Channel.Id, msgs.ToList(), (id, old) => { old.AddRange(msgs); return old; @@ -121,13 +124,13 @@ namespace NadekoBot.Modules.Games if (!guildConfig.GenerateCurrencyChannelIds.Contains(toAdd)) { guildConfig.GenerateCurrencyChannelIds.Add(toAdd); - _games.GenerationChannels.Add(channel.Id); + _service.GenerationChannels.Add(channel.Id); enabled = true; } else { guildConfig.GenerateCurrencyChannelIds.Remove(toAdd); - _games.GenerationChannels.TryRemove(channel.Id); + _service.GenerationChannels.TryRemove(channel.Id); enabled = false; } await uow.CompleteAsync(); diff --git a/src/NadekoBot/Modules/Games/PollCommands.cs b/NadekoBot.Core/Modules/Games/PollCommands.cs similarity index 93% rename from src/NadekoBot/Modules/Games/PollCommands.cs rename to NadekoBot.Core/Modules/Games/PollCommands.cs index bd136e7f..c95c4d0f 100644 --- a/src/NadekoBot/Modules/Games/PollCommands.cs +++ b/NadekoBot.Core/Modules/Games/PollCommands.cs @@ -39,7 +39,7 @@ namespace NadekoBot.Modules.Games private async Task InternalStartPoll(string arg) { - if(await _service.StartPoll((ITextChannel)Context.Channel, Context.Message, arg) == false) + if(await _service.StartPoll(Context.Channel.Id, Context.Message, arg) == false) await ReplyErrorLocalized("poll_already_running").ConfigureAwait(false); } @@ -53,8 +53,6 @@ namespace NadekoBot.Modules.Games _service.ActivePolls.TryRemove(channel.Guild.Id, out var poll); await poll.StopPoll().ConfigureAwait(false); } - } - - + } } } \ No newline at end of file diff --git a/src/NadekoBot/Modules/Games/Services/ChatterbotService.cs b/NadekoBot.Core/Modules/Games/Services/ChatterbotService.cs similarity index 93% rename from src/NadekoBot/Modules/Games/Services/ChatterbotService.cs rename to NadekoBot.Core/Modules/Games/Services/ChatterbotService.cs index a137b953..ee1a27f8 100644 --- a/src/NadekoBot/Modules/Games/Services/ChatterbotService.cs +++ b/NadekoBot.Core/Modules/Games/Services/ChatterbotService.cs @@ -9,9 +9,9 @@ using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Extensions; using NadekoBot.Modules.Permissions.Common; using NadekoBot.Modules.Permissions.Services; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NLog; using NadekoBot.Modules.Games.Common.ChatterBot; @@ -28,8 +28,9 @@ namespace NadekoBot.Modules.Games.Services public ConcurrentDictionary> ChatterBotGuilds { get; } - public ChatterBotService(DiscordSocketClient client, PermissionService perms, IEnumerable gcs, - CommandHandler cmd, NadekoStrings strings, IBotCredentials creds) + public ChatterBotService(DiscordSocketClient client, PermissionService perms, + NadekoBot bot, CommandHandler cmd, NadekoStrings strings, + IBotCredentials creds) { _client = client; _log = LogManager.GetCurrentClassLogger(); @@ -39,7 +40,8 @@ namespace NadekoBot.Modules.Games.Services _creds = creds; ChatterBotGuilds = new ConcurrentDictionary>( - gcs.Where(gc => gc.CleverbotEnabled) + bot.AllGuildConfigs + .Where(gc => gc.CleverbotEnabled) .ToDictionary(gc => gc.GuildId, gc => new Lazy(() => CreateSession(), true))); } diff --git a/src/NadekoBot/Modules/Games/Services/GamesService.cs b/NadekoBot.Core/Modules/Games/Services/GamesService.cs similarity index 72% rename from src/NadekoBot/Modules/Games/Services/GamesService.cs rename to NadekoBot.Core/Modules/Games/Services/GamesService.cs index 39164486..25769715 100644 --- a/src/NadekoBot/Modules/Games/Services/GamesService.cs +++ b/NadekoBot.Core/Modules/Games/Services/GamesService.cs @@ -12,15 +12,20 @@ using NadekoBot.Common; using NadekoBot.Common.Collections; using NadekoBot.Extensions; using NadekoBot.Modules.Games.Common; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using Newtonsoft.Json; using NLog; +using NadekoBot.Modules.Games.Common.Acrophobia; +using NadekoBot.Modules.Games.Common.Connect4; +using NadekoBot.Modules.Games.Common.Hangman; +using NadekoBot.Modules.Games.Common.Trivia; +using NadekoBot.Modules.Games.Common.Nunchi; namespace NadekoBot.Modules.Games.Services { - public class GamesService : INService + public class GamesService : INService, IUnloadableService { private readonly IBotConfigProvider _bc; @@ -38,7 +43,19 @@ namespace NadekoBot.Modules.Games.Services public List TypingArticles { get; } = new List(); - public GamesService(CommandHandler cmd, IBotConfigProvider bc, IEnumerable gcs, + //channelId, game + public ConcurrentDictionary AcrophobiaGames { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary Connect4Games { get; } = new ConcurrentDictionary(); + + public ConcurrentDictionary HangmanGames { get; } = new ConcurrentDictionary(); + public TermPool TermPool { get; } = new TermPool(); + + public ConcurrentDictionary RunningTrivias { get; } = new ConcurrentDictionary(); + public Dictionary TicTacToeGames { get; } = new Dictionary(); + public ConcurrentDictionary RunningContests { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary NunchiGames { get; } = new ConcurrentDictionary(); + + public GamesService(CommandHandler cmd, IBotConfigProvider bc, NadekoBot bot, NadekoStrings strings, IImagesService images, CommandHandler cmdHandler) { _bc = bc; @@ -60,7 +77,8 @@ namespace NadekoBot.Modules.Games.Services //plantpick _cmd.OnMessageNoTrigger += PotentialFlowerGeneration; - GenerationChannels = new ConcurrentHashSet(gcs + GenerationChannels = new ConcurrentHashSet(bot + .AllGuildConfigs .SelectMany(c => c.GenerateCurrencyChannelIds.Select(obj => obj.ChannelId))); try @@ -74,6 +92,34 @@ namespace NadekoBot.Modules.Games.Services } } + public async Task Unload() + { + _t.Change(Timeout.Infinite, Timeout.Infinite); + _cmd.OnMessageNoTrigger -= PotentialFlowerGeneration; + + AcrophobiaGames.ForEach(x => x.Value.Dispose()); + AcrophobiaGames.Clear(); + Connect4Games.ForEach(x => x.Value.Dispose()); + Connect4Games.Clear(); + HangmanGames.ForEach(x => x.Value.Dispose()); + HangmanGames.Clear(); + await Task.WhenAll(RunningTrivias.Select(x => x.Value.StopGame())); + RunningTrivias.Clear(); + + TicTacToeGames.Clear(); + + await Task.WhenAll(RunningContests.Select(x => x.Value.Stop())) + .ConfigureAwait(false); + RunningContests.Clear(); + NunchiGames.ForEach(x => x.Value.Dispose()); + NunchiGames.Clear(); + } + + private void DisposeElems(IEnumerable xs) + { + xs.ForEach(x => x.Dispose()); + } + public void AddTypingArticle(IUser user, string text) { TypingArticles.Add(new TypingArticle diff --git a/src/NadekoBot/Modules/Games/Services/PollService.cs b/NadekoBot.Core/Modules/Games/Services/PollService.cs similarity index 90% rename from src/NadekoBot/Modules/Games/Services/PollService.cs rename to NadekoBot.Core/Modules/Games/Services/PollService.cs index 5c14afbc..5ca8e784 100644 --- a/src/NadekoBot/Modules/Games/Services/PollService.cs +++ b/NadekoBot.Core/Modules/Games/Services/PollService.cs @@ -6,8 +6,8 @@ using Discord; using Discord.WebSocket; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Modules.Games.Common; -using NadekoBot.Services; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Impl; using NLog; namespace NadekoBot.Modules.Games.Services @@ -26,7 +26,7 @@ namespace NadekoBot.Modules.Games.Services _strings = strings; } - public async Task StartPoll(ITextChannel channel, IUserMessage msg, string arg) + public async Task StartPoll(ulong guildId, IUserMessage msg, string arg) { if (string.IsNullOrWhiteSpace(arg) || !arg.Contains(";")) return null; @@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Games.Services return null; var poll = new Poll(_client, _strings, msg, data[0], data.Skip(1)); - if (ActivePolls.TryAdd(channel.Guild.Id, poll)) + if (ActivePolls.TryAdd(guildId, poll)) { poll.OnEnded += (gid) => { diff --git a/src/NadekoBot/Modules/Games/SpeedTypingCommands.cs b/NadekoBot.Core/Modules/Games/SpeedTypingCommands.cs similarity index 89% rename from src/NadekoBot/Modules/Games/SpeedTypingCommands.cs rename to NadekoBot.Core/Modules/Games/SpeedTypingCommands.cs index 315080ed..1e049d21 100644 --- a/src/NadekoBot/Modules/Games/SpeedTypingCommands.cs +++ b/NadekoBot.Core/Modules/Games/SpeedTypingCommands.cs @@ -3,7 +3,6 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; using Newtonsoft.Json; -using System.Collections.Concurrent; using System.IO; using System.Linq; using System.Threading.Tasks; @@ -16,9 +15,8 @@ namespace NadekoBot.Modules.Games public partial class Games { [Group] - public class SpeedTypingCommands : NadekoSubmodule + public class SpeedTypingCommands : NadekoSubmodule { - public static ConcurrentDictionary RunningContests = new ConcurrentDictionary(); private readonly GamesService _games; private readonly DiscordSocketClient _client; @@ -34,7 +32,7 @@ namespace NadekoBot.Modules.Games { var channel = (ITextChannel)Context.Channel; - var game = RunningContests.GetOrAdd(channel.Guild.Id, id => new TypingGame(_games, _client, channel, Prefix)); + var game = _service.RunningContests.GetOrAdd(channel.Guild.Id, id => new TypingGame(_games, _client, channel, Prefix)); if (game.IsActive) { @@ -54,8 +52,7 @@ namespace NadekoBot.Modules.Games public async Task TypeStop() { var channel = (ITextChannel)Context.Channel; - TypingGame game; - if (RunningContests.TryRemove(channel.Guild.Id, out game)) + if (_service.RunningContests.TryRemove(channel.Guild.Id, out TypingGame game)) { await game.Stop().ConfigureAwait(false); return; diff --git a/NadekoBot.Core/Modules/Games/TicTacToeCommands.cs b/NadekoBot.Core/Modules/Games/TicTacToeCommands.cs new file mode 100644 index 00000000..aed0b43f --- /dev/null +++ b/NadekoBot.Core/Modules/Games/TicTacToeCommands.cs @@ -0,0 +1,62 @@ +using Discord; +using Discord.Commands; +using Discord.WebSocket; +using NadekoBot.Extensions; +using System; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using NadekoBot.Common.Attributes; +using NadekoBot.Core.Services.Impl; +using NadekoBot.Modules.Games.Services; +using NadekoBot.Modules.Games.Common; + +namespace NadekoBot.Modules.Games +{ + public partial class Games + { + [Group] + public class TicTacToeCommands : NadekoSubmodule + { + private readonly SemaphoreSlim _sem = new SemaphoreSlim(1, 1); + private readonly DiscordSocketClient _client; + + public TicTacToeCommands(DiscordSocketClient client) + { + _client = client; + } + + [NadekoCommand, Usage, Description, Aliases] + [RequireContext(ContextType.Guild)] + public async Task TicTacToe() + { + var channel = (ITextChannel)Context.Channel; + + await _sem.WaitAsync(1000); + try + { + if (_service.TicTacToeGames.TryGetValue(channel.Id, out TicTacToe game)) + { + var _ = Task.Run(async () => + { + await game.Start((IGuildUser)Context.User); + }); + return; + } + game = new TicTacToe(base._strings, this._client, channel, (IGuildUser)Context.User); + _service.TicTacToeGames.Add(channel.Id, game); + await ReplyConfirmLocalized("ttt_created").ConfigureAwait(false); + + game.OnEnded += (g) => + { + _service.TicTacToeGames.Remove(channel.Id); + }; + } + finally + { + _sem.Release(); + } + } + } + } +} \ No newline at end of file diff --git a/src/NadekoBot/Modules/Games/TriviaCommands.cs b/NadekoBot.Core/Modules/Games/TriviaCommands.cs similarity index 83% rename from src/NadekoBot/Modules/Games/TriviaCommands.cs rename to NadekoBot.Core/Modules/Games/TriviaCommands.cs index 3360c87f..d47058d1 100644 --- a/src/NadekoBot/Modules/Games/TriviaCommands.cs +++ b/NadekoBot.Core/Modules/Games/TriviaCommands.cs @@ -2,25 +2,23 @@ using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; -using System.Collections.Concurrent; +using NadekoBot.Core.Services; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Modules.Games.Common.Trivia; +using NadekoBot.Modules.Games.Services; namespace NadekoBot.Modules.Games { public partial class Games { [Group] - public class TriviaCommands : NadekoSubmodule + public class TriviaCommands : NadekoSubmodule { private readonly CurrencyService _cs; private readonly DiscordSocketClient _client; private readonly IBotConfigProvider _bc; - public static ConcurrentDictionary RunningTrivias { get; } = new ConcurrentDictionary(); - public TriviaCommands(DiscordSocketClient client, IBotConfigProvider bc, CurrencyService cs) { _cs = cs; @@ -48,7 +46,7 @@ namespace NadekoBot.Modules.Games var isPokemon = additionalArgs.Contains("pokemon"); var trivia = new TriviaGame(_strings, _client, _bc, _cs, channel.Guild, channel, showHints, winReq, isPokemon); - if (RunningTrivias.TryAdd(channel.Guild.Id, trivia)) + if (_service.RunningTrivias.TryAdd(channel.Guild.Id, trivia)) { try { @@ -56,7 +54,7 @@ namespace NadekoBot.Modules.Games } finally { - RunningTrivias.TryRemove(channel.Guild.Id, out trivia); + _service.RunningTrivias.TryRemove(channel.Guild.Id, out trivia); await trivia.EnsureStopped().ConfigureAwait(false); } return; @@ -72,8 +70,7 @@ namespace NadekoBot.Modules.Games { var channel = (ITextChannel)Context.Channel; - TriviaGame trivia; - if (RunningTrivias.TryGetValue(channel.Guild.Id, out trivia)) + if (_service.RunningTrivias.TryGetValue(channel.Guild.Id, out TriviaGame trivia)) { await channel.SendConfirmAsync(GetText("leaderboard"), trivia.GetLeaderboard()).ConfigureAwait(false); return; @@ -88,8 +85,7 @@ namespace NadekoBot.Modules.Games { var channel = (ITextChannel)Context.Channel; - TriviaGame trivia; - if (RunningTrivias.TryGetValue(channel.Guild.Id, out trivia)) + if (_service.RunningTrivias.TryGetValue(channel.Guild.Id, out TriviaGame trivia)) { await trivia.StopGame().ConfigureAwait(false); return; diff --git a/src/NadekoBot/Modules/Help/Help.cs b/NadekoBot.Core/Modules/Help/Help.cs similarity index 99% rename from src/NadekoBot/Modules/Help/Help.cs rename to NadekoBot.Core/Modules/Help/Help.cs index 35a8f32f..b07ea5be 100644 --- a/src/NadekoBot/Modules/Help/Help.cs +++ b/NadekoBot.Core/Modules/Help/Help.cs @@ -2,7 +2,7 @@ using NadekoBot.Extensions; using System.Linq; using Discord; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Threading.Tasks; using System; using System.IO; diff --git a/src/NadekoBot/Modules/Help/Services/HelpService.cs b/NadekoBot.Core/Modules/Help/Services/HelpService.cs similarity index 97% rename from src/NadekoBot/Modules/Help/Services/HelpService.cs rename to NadekoBot.Core/Modules/Help/Services/HelpService.cs index 88220154..2de4ccfb 100644 --- a/src/NadekoBot/Modules/Help/Services/HelpService.cs +++ b/NadekoBot.Core/Modules/Help/Services/HelpService.cs @@ -7,8 +7,8 @@ using NadekoBot.Extensions; using System.Linq; using NadekoBot.Common.Attributes; using NadekoBot.Common.ModuleBehaviors; -using NadekoBot.Services; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Modules.Help.Services { diff --git a/src/NadekoBot/Modules/Music/Common/Exceptions/NotInVoiceChannelException.cs b/NadekoBot.Core/Modules/Music/Common/Exceptions/NotInVoiceChannelException.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/Exceptions/NotInVoiceChannelException.cs rename to NadekoBot.Core/Modules/Music/Common/Exceptions/NotInVoiceChannelException.cs diff --git a/src/NadekoBot/Modules/Music/Common/Exceptions/QueueFullException.cs b/NadekoBot.Core/Modules/Music/Common/Exceptions/QueueFullException.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/Exceptions/QueueFullException.cs rename to NadekoBot.Core/Modules/Music/Common/Exceptions/QueueFullException.cs diff --git a/src/NadekoBot/Modules/Music/Common/Exceptions/SongNotFoundException.cs b/NadekoBot.Core/Modules/Music/Common/Exceptions/SongNotFoundException.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/Exceptions/SongNotFoundException.cs rename to NadekoBot.Core/Modules/Music/Common/Exceptions/SongNotFoundException.cs diff --git a/src/NadekoBot/Modules/Music/Common/MusicPlayer.cs b/NadekoBot.Core/Modules/Music/Common/MusicPlayer.cs similarity index 99% rename from src/NadekoBot/Modules/Music/Common/MusicPlayer.cs rename to NadekoBot.Core/Modules/Music/Common/MusicPlayer.cs index aa61a9ce..edb85085 100644 --- a/src/NadekoBot/Modules/Music/Common/MusicPlayer.cs +++ b/NadekoBot.Core/Modules/Music/Common/MusicPlayer.cs @@ -9,8 +9,8 @@ using NadekoBot.Extensions; using System.Diagnostics; using NadekoBot.Common.Collections; using NadekoBot.Modules.Music.Services; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Music.Common { diff --git a/src/NadekoBot/Modules/Music/Common/MusicQueue.cs b/NadekoBot.Core/Modules/Music/Common/MusicQueue.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/MusicQueue.cs rename to NadekoBot.Core/Modules/Music/Common/MusicQueue.cs diff --git a/src/NadekoBot/Modules/Music/Common/SongBuffer.cs b/NadekoBot.Core/Modules/Music/Common/SongBuffer.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/SongBuffer.cs rename to NadekoBot.Core/Modules/Music/Common/SongBuffer.cs diff --git a/src/NadekoBot/Modules/Music/Common/SongHandler.cs b/NadekoBot.Core/Modules/Music/Common/SongHandler.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/SongHandler.cs rename to NadekoBot.Core/Modules/Music/Common/SongHandler.cs diff --git a/src/NadekoBot/Modules/Music/Common/SongInfo.cs b/NadekoBot.Core/Modules/Music/Common/SongInfo.cs similarity index 98% rename from src/NadekoBot/Modules/Music/Common/SongInfo.cs rename to NadekoBot.Core/Modules/Music/Common/SongInfo.cs index c19f8057..02f7ac35 100644 --- a/src/NadekoBot/Modules/Music/Common/SongInfo.cs +++ b/NadekoBot.Core/Modules/Music/Common/SongInfo.cs @@ -1,6 +1,6 @@ using Discord; using NadekoBot.Extensions; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Net; using System.Text.RegularExpressions; diff --git a/src/NadekoBot/Modules/Music/Common/SongResolver/ISongResolverFactory.cs b/NadekoBot.Core/Modules/Music/Common/SongResolver/ISongResolverFactory.cs similarity index 86% rename from src/NadekoBot/Modules/Music/Common/SongResolver/ISongResolverFactory.cs rename to NadekoBot.Core/Modules/Music/Common/SongResolver/ISongResolverFactory.cs index c7d79e73..688971f7 100644 --- a/src/NadekoBot/Modules/Music/Common/SongResolver/ISongResolverFactory.cs +++ b/NadekoBot.Core/Modules/Music/Common/SongResolver/ISongResolverFactory.cs @@ -1,5 +1,5 @@ using NadekoBot.Modules.Music.Common.SongResolver.Strategies; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Threading.Tasks; namespace NadekoBot.Modules.Music.Common.SongResolver diff --git a/src/NadekoBot/Modules/Music/Common/SongResolver/SongResolverFactory.cs b/NadekoBot.Core/Modules/Music/Common/SongResolver/SongResolverFactory.cs similarity index 94% rename from src/NadekoBot/Modules/Music/Common/SongResolver/SongResolverFactory.cs rename to NadekoBot.Core/Modules/Music/Common/SongResolver/SongResolverFactory.cs index 7e65701c..b06739b9 100644 --- a/src/NadekoBot/Modules/Music/Common/SongResolver/SongResolverFactory.cs +++ b/NadekoBot.Core/Modules/Music/Common/SongResolver/SongResolverFactory.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NadekoBot.Modules.Music.Common.SongResolver.Strategies; namespace NadekoBot.Modules.Music.Common.SongResolver diff --git a/src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/IResolverStrategy.cs b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/IResolverStrategy.cs similarity index 100% rename from src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/IResolverStrategy.cs rename to NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/IResolverStrategy.cs diff --git a/src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs similarity index 93% rename from src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs rename to NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs index 413dfa9d..e262c9a9 100644 --- a/src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs +++ b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/LocalSongResolveStrategy.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.IO; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs similarity index 98% rename from src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs rename to NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs index 5e11ae4e..06f9ca0f 100644 --- a/src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs +++ b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/RadioResolveStrategy.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NLog; using System; using System.Net.Http; diff --git a/src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs similarity index 95% rename from src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs rename to NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs index 66e42075..ae786e79 100644 --- a/src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs +++ b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/SoundCloudResolveStrategy.cs @@ -1,5 +1,5 @@ using NadekoBot.Modules.Music.Extensions; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; using System.Threading.Tasks; namespace NadekoBot.Modules.Music.Common.SongResolver.Strategies diff --git a/src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs similarity index 96% rename from src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs rename to NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs index e4a0058e..1443a695 100644 --- a/src/NadekoBot/Modules/Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs +++ b/NadekoBot.Core/Modules/Music/Common/SongResolver/Strategies/YoutubeResolveStrategy.cs @@ -1,5 +1,5 @@ -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NLog; using System; using System.Globalization; diff --git a/src/NadekoBot/Modules/Music/Extensions/Extensions.cs b/NadekoBot.Core/Modules/Music/Extensions/Extensions.cs similarity index 89% rename from src/NadekoBot/Modules/Music/Extensions/Extensions.cs rename to NadekoBot.Core/Modules/Music/Extensions/Extensions.cs index b3eb1d38..1acd66fe 100644 --- a/src/NadekoBot/Modules/Music/Extensions/Extensions.cs +++ b/NadekoBot.Core/Modules/Music/Extensions/Extensions.cs @@ -1,6 +1,6 @@ using NadekoBot.Modules.Music.Common; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using System; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Music/Music.cs b/NadekoBot.Core/Modules/Music/Music.cs similarity index 97% rename from src/NadekoBot/Modules/Music/Music.cs rename to NadekoBot.Core/Modules/Music/Music.cs index a5b0295e..d19266d7 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/NadekoBot.Core/Modules/Music/Music.cs @@ -1,20 +1,20 @@ using Discord.Commands; using Discord.WebSocket; -using NadekoBot.Services; +using NadekoBot.Core.Services; using Discord; using System.Threading.Tasks; using System; using System.Linq; using NadekoBot.Extensions; using System.Collections.Generic; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.IO; using System.Net.Http; using NadekoBot.Common; using NadekoBot.Common.Attributes; using NadekoBot.Common.Collections; using Newtonsoft.Json.Linq; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; using NadekoBot.Modules.Music.Services; using NadekoBot.Modules.Music.Common.Exceptions; using NadekoBot.Modules.Music.Common; @@ -30,25 +30,18 @@ namespace NadekoBot.Modules.Music private readonly IGoogleApiService _google; private readonly DbService _db; - public Music(DiscordSocketClient client, IBotCredentials creds, IGoogleApiService google, + public Music(DiscordSocketClient client, + IBotCredentials creds, + IGoogleApiService google, DbService db) { _client = client; _creds = creds; _google = google; _db = db; - - //_client.UserVoiceStateUpdated += Client_UserVoiceStateUpdated; - _client.LeftGuild += _client_LeftGuild; } - private Task _client_LeftGuild(SocketGuild arg) - { - var t = _service.DestroyPlayer(arg.Id); - return Task.CompletedTask; - } - - //todo changing server region is bugged again + //todo 50 changing server region is bugged again //private Task Client_UserVoiceStateUpdated(SocketUser iusr, SocketVoiceState oldState, SocketVoiceState newState) //{ // var t = Task.Run(() => @@ -265,7 +258,6 @@ namespace NadekoBot.Modules.Music total.Minutes, total.Seconds); var maxPlaytime = mp.MaxPlaytimeSeconds; - var lastPage = songs.Length / itemsPerPage; Func printAction = curPage => { var startAt = itemsPerPage * curPage; @@ -307,7 +299,7 @@ namespace NadekoBot.Modules.Music desc = add + "\n" + desc; var embed = new EmbedBuilder() - .WithAuthor(eab => eab.WithName(GetText("player_queue", curPage + 1, lastPage + 1)) + .WithAuthor(eab => eab.WithName(GetText("player_queue", curPage + 1, (songs.Length / itemsPerPage) + 1)) .WithMusicIcon()) .WithDescription(desc) .WithFooter(ef => ef.WithText($"{mp.PrettyVolume} | {songs.Length} " + @@ -316,7 +308,8 @@ namespace NadekoBot.Modules.Music return embed; }; - await Context.Channel.SendPaginatedConfirmAsync(_client, page, printAction, lastPage, false).ConfigureAwait(false); + await Context.Channel.SendPaginatedConfirmAsync(_client, + page, printAction, songs.Length, itemsPerPage, false).ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] diff --git a/src/NadekoBot/Modules/Music/Services/MusicService.cs b/NadekoBot.Core/Modules/Music/Services/MusicService.cs similarity index 91% rename from src/NadekoBot/Modules/Music/Services/MusicService.cs rename to NadekoBot.Core/Modules/Music/Services/MusicService.cs index d0b00657..1e127d98 100644 --- a/src/NadekoBot/Modules/Music/Services/MusicService.cs +++ b/NadekoBot.Core/Modules/Music/Services/MusicService.cs @@ -3,22 +3,21 @@ using System.Linq; using System.Threading.Tasks; using Discord; using NadekoBot.Extensions; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NLog; using System.IO; -using System.Collections.Generic; using Discord.Commands; using Discord.WebSocket; using NadekoBot.Common; -using NadekoBot.Services.Impl; -using NadekoBot.Services; +using NadekoBot.Core.Services.Impl; +using NadekoBot.Core.Services; using NadekoBot.Modules.Music.Common; using NadekoBot.Modules.Music.Common.Exceptions; using NadekoBot.Modules.Music.Common.SongResolver; namespace NadekoBot.Modules.Music.Services { - public class MusicService : INService + public class MusicService : INService, IUnloadableService { public const string MusicDataPath = "data/musicdata"; @@ -36,7 +35,7 @@ namespace NadekoBot.Modules.Music.Services public MusicService(DiscordSocketClient client, IGoogleApiService google, NadekoStrings strings, ILocalization localization, DbService db, - SoundCloudApiService sc, IBotCredentials creds, IEnumerable gcs) + SoundCloudApiService sc, IBotCredentials creds, NadekoBot bot) { _client = client; _google = google; @@ -47,13 +46,27 @@ namespace NadekoBot.Modules.Music.Services _creds = creds; _log = LogManager.GetCurrentClassLogger(); + _client.LeftGuild += _client_LeftGuild; + try { Directory.Delete(MusicDataPath, true); } catch { } - _defaultVolumes = new ConcurrentDictionary(gcs.ToDictionary(x => x.GuildId, x => x.DefaultMusicVolume)); + _defaultVolumes = new ConcurrentDictionary( + bot.AllGuildConfigs + .ToDictionary(x => x.GuildId, x => x.DefaultMusicVolume)); Directory.CreateDirectory(MusicDataPath); + } - //_t = new Timer(_ => _log.Info(MusicPlayers.Count(x => x.Value.Current.Current != null)), null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5)); + public Task Unload() + { + _client.LeftGuild -= _client_LeftGuild; + return Task.CompletedTask; + } + + private Task _client_LeftGuild(SocketGuild arg) + { + var t = DestroyPlayer(arg.Id); + return Task.CompletedTask; } public float GetDefaultVolume(ulong guildId) diff --git a/NadekoBot.Core/Modules/Nsfw/Exceptions/TagBlacklistedException.cs b/NadekoBot.Core/Modules/Nsfw/Exceptions/TagBlacklistedException.cs new file mode 100644 index 00000000..5d4cfc92 --- /dev/null +++ b/NadekoBot.Core/Modules/Nsfw/Exceptions/TagBlacklistedException.cs @@ -0,0 +1,5 @@ +using System; + +namespace NadekoBot.Modules.NSFW.Exceptions +{ +} diff --git a/src/NadekoBot/Modules/NSFW/NSFW.cs b/NadekoBot.Core/Modules/Nsfw/NSFW.cs similarity index 93% rename from src/NadekoBot/Modules/NSFW/NSFW.cs rename to NadekoBot.Core/Modules/Nsfw/NSFW.cs index 1ca27691..4b16fb6c 100644 --- a/src/NadekoBot/Modules/NSFW/NSFW.cs +++ b/NadekoBot.Core/Modules/Nsfw/NSFW.cs @@ -6,23 +6,19 @@ using System.Linq; using System.Threading.Tasks; using NadekoBot.Extensions; using System.Threading; -using System.Collections.Concurrent; using NadekoBot.Common; using NadekoBot.Common.Attributes; using NadekoBot.Common.Collections; using NadekoBot.Modules.Searches.Common; using NadekoBot.Modules.Searches.Services; using NadekoBot.Modules.NSFW.Exceptions; +using NadekoBot.Modules.Searches.Exceptions; namespace NadekoBot.Modules.NSFW { // thanks to halitalf for adding autoboob and autobutt features :D public class NSFW : NadekoTopLevelModule { - private static readonly ConcurrentDictionary _autoHentaiTimers = new ConcurrentDictionary(); - private static readonly ConcurrentDictionary _autoBoobTimers = new ConcurrentDictionary(); - private static readonly ConcurrentDictionary _autoButtTimers = new ConcurrentDictionary(); - private static readonly ConcurrentHashSet _hentaiBombBlacklist = new ConcurrentHashSet(); private async Task InternalHentai(IMessageChannel channel, string tag, bool noError) @@ -90,7 +86,7 @@ namespace NadekoBot.Modules.NSFW if (interval == 0) { - if (!_autoHentaiTimers.TryRemove(Context.Channel.Id, out t)) return; + if (!_service.AutoHentaiTimers.TryRemove(Context.Channel.Id, out t)) return; t.Change(Timeout.Infinite, Timeout.Infinite); //proper way to disable the timer await ReplyConfirmLocalized("stopped").ConfigureAwait(false); @@ -117,7 +113,7 @@ namespace NadekoBot.Modules.NSFW } }, null, interval * 1000, interval * 1000); - _autoHentaiTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => + _service.AutoHentaiTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => { old.Change(Timeout.Infinite, Timeout.Infinite); return t; @@ -136,7 +132,7 @@ namespace NadekoBot.Modules.NSFW if (interval == 0) { - if (!_autoBoobTimers.TryRemove(Context.Channel.Id, out t)) return; + if (!_service.AutoBoobTimers.TryRemove(Context.Channel.Id, out t)) return; t.Change(Timeout.Infinite, Timeout.Infinite); //proper way to disable the timer await ReplyConfirmLocalized("stopped").ConfigureAwait(false); @@ -158,7 +154,7 @@ namespace NadekoBot.Modules.NSFW } }, null, interval * 1000, interval * 1000); - _autoBoobTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => + _service.AutoBoobTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => { old.Change(Timeout.Infinite, Timeout.Infinite); return t; @@ -175,7 +171,7 @@ namespace NadekoBot.Modules.NSFW if (interval == 0) { - if (!_autoButtTimers.TryRemove(Context.Channel.Id, out t)) return; + if (!_service.AutoButtTimers.TryRemove(Context.Channel.Id, out t)) return; t.Change(Timeout.Infinite, Timeout.Infinite); //proper way to disable the timer await ReplyConfirmLocalized("stopped").ConfigureAwait(false); @@ -197,7 +193,7 @@ namespace NadekoBot.Modules.NSFW } }, null, interval * 1000, interval * 1000); - _autoButtTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => + _service.AutoButtTimers.AddOrUpdate(Context.Channel.Id, t, (key, old) => { old.Change(Timeout.Infinite, Timeout.Infinite); return t; diff --git a/src/NadekoBot/Modules/Permissions/BlacklistCommands.cs b/NadekoBot.Core/Modules/Permissions/BlacklistCommands.cs similarity index 77% rename from src/NadekoBot/Modules/Permissions/BlacklistCommands.cs rename to NadekoBot.Core/Modules/Permissions/BlacklistCommands.cs index 377631e0..43108982 100644 --- a/src/NadekoBot/Modules/Permissions/BlacklistCommands.cs +++ b/NadekoBot.Core/Modules/Permissions/BlacklistCommands.cs @@ -1,12 +1,10 @@ using Discord; using Discord.Commands; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using System.Linq; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Common.Collections; -using NadekoBot.Modules.Games.Common.Trivia; using NadekoBot.Modules.Permissions.Services; using NadekoBot.Common.TypeReaders; @@ -99,31 +97,6 @@ namespace NadekoBot.Modules.Permissions } await uow.CompleteAsync().ConfigureAwait(false); } - if (action == AddRemove.Add) - { - TriviaGame tg; - switch (type) - { - case BlacklistType.Server: - Games.Games.TriviaCommands.RunningTrivias.TryRemove(id, out tg); - if (tg != null) - { - await tg.StopGame().ConfigureAwait(false); - } - break; - case BlacklistType.Channel: - var item = Games.Games.TriviaCommands.RunningTrivias.FirstOrDefault(kvp => kvp.Value.Channel.Id == id); - Games.Games.TriviaCommands.RunningTrivias.TryRemove(item.Key, out tg); - if (tg != null) - { - await tg.StopGame().ConfigureAwait(false); - } - break; - case BlacklistType.User: - break; - } - - } if(action == AddRemove.Add) await ReplyConfirmLocalized("blacklisted", Format.Code(type.ToString()), Format.Code(id.ToString())).ConfigureAwait(false); diff --git a/src/NadekoBot/Modules/Permissions/CmdCdsCommands.cs b/NadekoBot.Core/Modules/Permissions/CmdCdsCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Permissions/CmdCdsCommands.cs rename to NadekoBot.Core/Modules/Permissions/CmdCdsCommands.cs index 5c3fed31..66b68cd5 100644 --- a/src/NadekoBot/Modules/Permissions/CmdCdsCommands.cs +++ b/NadekoBot.Core/Modules/Permissions/CmdCdsCommands.cs @@ -2,8 +2,8 @@ using Discord.Commands; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Concurrent; using System.Linq; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Permissions/CommandCostCommands.cs b/NadekoBot.Core/Modules/Permissions/CommandCostCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/CommandCostCommands.cs rename to NadekoBot.Core/Modules/Permissions/CommandCostCommands.cs diff --git a/src/NadekoBot/Modules/Permissions/Common/PermissionCache.cs b/NadekoBot.Core/Modules/Permissions/Common/PermissionCache.cs similarity index 90% rename from src/NadekoBot/Modules/Permissions/Common/PermissionCache.cs rename to NadekoBot.Core/Modules/Permissions/Common/PermissionCache.cs index fd02a0b3..b8a8c7cb 100644 --- a/src/NadekoBot/Modules/Permissions/Common/PermissionCache.cs +++ b/NadekoBot.Core/Modules/Permissions/Common/PermissionCache.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions.Common { diff --git a/src/NadekoBot/Modules/Permissions/Common/PermissionExtensions.cs b/NadekoBot.Core/Modules/Permissions/Common/PermissionExtensions.cs similarity index 99% rename from src/NadekoBot/Modules/Permissions/Common/PermissionExtensions.cs rename to NadekoBot.Core/Modules/Permissions/Common/PermissionExtensions.cs index 977a319a..0ad0c8e5 100644 --- a/src/NadekoBot/Modules/Permissions/Common/PermissionExtensions.cs +++ b/NadekoBot.Core/Modules/Permissions/Common/PermissionExtensions.cs @@ -2,7 +2,7 @@ using System.Linq; using Discord; using Discord.WebSocket; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions.Common { diff --git a/src/NadekoBot/Modules/Permissions/Common/PermissionsCollection.cs b/NadekoBot.Core/Modules/Permissions/Common/PermissionsCollection.cs similarity index 97% rename from src/NadekoBot/Modules/Permissions/Common/PermissionsCollection.cs rename to NadekoBot.Core/Modules/Permissions/Common/PermissionsCollection.cs index 0f6ab6b9..df2e1759 100644 --- a/src/NadekoBot/Modules/Permissions/Common/PermissionsCollection.cs +++ b/NadekoBot.Core/Modules/Permissions/Common/PermissionsCollection.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using NadekoBot.Common.Collections; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions.Common { diff --git a/src/NadekoBot/Modules/Permissions/FilterCommands.cs b/NadekoBot.Core/Modules/Permissions/FilterCommands.cs similarity index 93% rename from src/NadekoBot/Modules/Permissions/FilterCommands.cs rename to NadekoBot.Core/Modules/Permissions/FilterCommands.cs index 22e22c82..7332c6ad 100644 --- a/src/NadekoBot/Modules/Permissions/FilterCommands.cs +++ b/NadekoBot.Core/Modules/Permissions/FilterCommands.cs @@ -3,30 +3,38 @@ using Discord.Commands; using Discord.WebSocket; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Common.Collections; using NadekoBot.Modules.Permissions.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions { public partial class Permissions { [Group] - public class FilterCommands : NadekoSubmodule + public class FilterCommands : NadekoSubmodule { private readonly DbService _db; - private readonly FilterService _service; - public FilterCommands(FilterService service, DbService db) + public FilterCommands(DbService db) { - _service = service; _db = db; } + //[NadekoCommand, Usage, Description, Aliases] + //[RequireContext(ContextType.Guild)] + //public async Task SrvrFilterLinks() + //{ + // using (var uow = _db.UnitOfWork) + // { + // var config = + // } + //} + [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] public async Task SrvrFilterInv() @@ -202,7 +210,7 @@ namespace NadekoBot.Modules.Permissions new EmbedBuilder() .WithTitle(GetText("filter_word_list")) .WithDescription(string.Join("\n", fws.Skip(curPage * 10).Take(10))) - , fws.Length / 10).ConfigureAwait(false); + , fws.Length, 10).ConfigureAwait(false); } } } diff --git a/src/NadekoBot/Modules/Permissions/GlobalPermissionCommands.cs b/NadekoBot.Core/Modules/Permissions/GlobalPermissionCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Permissions/GlobalPermissionCommands.cs rename to NadekoBot.Core/Modules/Permissions/GlobalPermissionCommands.cs index 5c49adf7..0c88199b 100644 --- a/src/NadekoBot/Modules/Permissions/GlobalPermissionCommands.cs +++ b/NadekoBot.Core/Modules/Permissions/GlobalPermissionCommands.cs @@ -1,13 +1,13 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Linq; using System.Threading.Tasks; using NadekoBot.Common.Attributes; using NadekoBot.Common.TypeReaders; using NadekoBot.Modules.Permissions.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions { diff --git a/src/NadekoBot/Modules/Permissions/Permissions.cs b/NadekoBot.Core/Modules/Permissions/Permissions.cs similarity index 99% rename from src/NadekoBot/Modules/Permissions/Permissions.cs rename to NadekoBot.Core/Modules/Permissions/Permissions.cs index ce7f6fa9..d9987f16 100644 --- a/src/NadekoBot/Modules/Permissions/Permissions.cs +++ b/NadekoBot.Core/Modules/Permissions/Permissions.cs @@ -2,9 +2,9 @@ using System.Linq; using System.Threading.Tasks; using Discord.Commands; -using NadekoBot.Services; +using NadekoBot.Core.Services; using Discord; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using Discord.WebSocket; using NadekoBot.Common.Attributes; diff --git a/src/NadekoBot/Modules/Permissions/ResetPermissionsCommands.cs b/NadekoBot.Core/Modules/Permissions/ResetPermissionsCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Permissions/ResetPermissionsCommands.cs rename to NadekoBot.Core/Modules/Permissions/ResetPermissionsCommands.cs diff --git a/src/NadekoBot/Modules/Permissions/Services/BlacklistService.cs b/NadekoBot.Core/Modules/Permissions/Services/BlacklistService.cs similarity index 94% rename from src/NadekoBot/Modules/Permissions/Services/BlacklistService.cs rename to NadekoBot.Core/Modules/Permissions/Services/BlacklistService.cs index 3c2128dc..f5b17ef9 100644 --- a/src/NadekoBot/Modules/Permissions/Services/BlacklistService.cs +++ b/NadekoBot.Core/Modules/Permissions/Services/BlacklistService.cs @@ -3,8 +3,8 @@ using System.Threading.Tasks; using Discord; using NadekoBot.Common.Collections; using NadekoBot.Common.ModuleBehaviors; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions.Services { diff --git a/src/NadekoBot/Modules/Permissions/Services/CmdCdService.cs b/NadekoBot.Core/Modules/Permissions/Services/CmdCdService.cs similarity index 93% rename from src/NadekoBot/Modules/Permissions/Services/CmdCdService.cs rename to NadekoBot.Core/Modules/Permissions/Services/CmdCdService.cs index bead8238..f4942863 100644 --- a/src/NadekoBot/Modules/Permissions/Services/CmdCdService.cs +++ b/NadekoBot.Core/Modules/Permissions/Services/CmdCdService.cs @@ -6,8 +6,8 @@ using Discord; using Discord.WebSocket; using NadekoBot.Common.Collections; using NadekoBot.Common.ModuleBehaviors; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions.Services { @@ -16,10 +16,10 @@ namespace NadekoBot.Modules.Permissions.Services public ConcurrentDictionary> CommandCooldowns { get; } public ConcurrentDictionary> ActiveCooldowns { get; } = new ConcurrentDictionary>(); - public CmdCdService(IEnumerable gcs) + public CmdCdService(NadekoBot bot) { CommandCooldowns = new ConcurrentDictionary>( - gcs.ToDictionary(k => k.GuildId, + bot.AllGuildConfigs.ToDictionary(k => k.GuildId, v => new ConcurrentHashSet(v.CommandCooldowns))); } diff --git a/src/NadekoBot/Modules/Permissions/Services/FilterService.cs b/NadekoBot.Core/Modules/Permissions/Services/FilterService.cs similarity index 84% rename from src/NadekoBot/Modules/Permissions/Services/FilterService.cs rename to NadekoBot.Core/Modules/Permissions/Services/FilterService.cs index e15926a9..f3596071 100644 --- a/src/NadekoBot/Modules/Permissions/Services/FilterService.cs +++ b/NadekoBot.Core/Modules/Permissions/Services/FilterService.cs @@ -8,8 +8,8 @@ using Discord.WebSocket; using NadekoBot.Common.Collections; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Permissions.Services @@ -27,6 +27,9 @@ namespace NadekoBot.Modules.Permissions.Services public ConcurrentHashSet WordFilteringChannels { get; } public ConcurrentHashSet WordFilteringServers { get; } + //public ConcurrentHashSet LinkFilteringServers { get; } + //public ConcurrentDictionary LinkFilteringChannelSettings { get; } + public ConcurrentHashSet FilteredWordsForChannel(ulong channelId, ulong guildId) { ConcurrentHashSet words = new ConcurrentHashSet(); @@ -43,21 +46,22 @@ namespace NadekoBot.Modules.Permissions.Services return words; } - public FilterService(DiscordSocketClient _client, IEnumerable gcs) + public FilterService(DiscordSocketClient _client, NadekoBot bot) { _log = LogManager.GetCurrentClassLogger(); - InviteFilteringServers = new ConcurrentHashSet(gcs.Where(gc => gc.FilterInvites).Select(gc => gc.GuildId)); - InviteFilteringChannels = new ConcurrentHashSet(gcs.SelectMany(gc => gc.FilterInvitesChannelIds.Select(fci => fci.ChannelId))); + InviteFilteringServers = new ConcurrentHashSet(bot.AllGuildConfigs.Where(gc => gc.FilterInvites).Select(gc => gc.GuildId)); + InviteFilteringChannels = new ConcurrentHashSet(bot.AllGuildConfigs.SelectMany(gc => gc.FilterInvitesChannelIds.Select(fci => fci.ChannelId))); - var dict = gcs.ToDictionary(gc => gc.GuildId, gc => new ConcurrentHashSet(gc.FilteredWords.Select(fw => fw.Word))); + var dict = bot.AllGuildConfigs.ToDictionary(gc => gc.GuildId, gc => new ConcurrentHashSet(gc.FilteredWords.Select(fw => fw.Word))); ServerFilteredWords = new ConcurrentDictionary>(dict); - var serverFiltering = gcs.Where(gc => gc.FilterWords); + var serverFiltering = bot.AllGuildConfigs.Where(gc => gc.FilterWords); WordFilteringServers = new ConcurrentHashSet(serverFiltering.Select(gc => gc.GuildId)); + WordFilteringChannels = new ConcurrentHashSet(bot.AllGuildConfigs.SelectMany(gc => gc.FilterWordsChannelIds.Select(fwci => fwci.ChannelId))); - WordFilteringChannels = new ConcurrentHashSet(gcs.SelectMany(gc => gc.FilterWordsChannelIds.Select(fwci => fwci.ChannelId))); + //LinkFilteringServers = new ConcurrentHashSet(bot.AllGuildConfigs.Where(gc => gc.FilterLinks).Select(x => x.GuildId)); _client.MessageUpdated += (oldData, newMsg, channel) => { diff --git a/src/NadekoBot/Modules/Permissions/Services/GlobalPermissionService.cs b/NadekoBot.Core/Modules/Permissions/Services/GlobalPermissionService.cs similarity index 97% rename from src/NadekoBot/Modules/Permissions/Services/GlobalPermissionService.cs rename to NadekoBot.Core/Modules/Permissions/Services/GlobalPermissionService.cs index 18d5337f..d8908ccd 100644 --- a/src/NadekoBot/Modules/Permissions/Services/GlobalPermissionService.cs +++ b/NadekoBot.Core/Modules/Permissions/Services/GlobalPermissionService.cs @@ -4,7 +4,7 @@ using Discord; using Discord.WebSocket; using NadekoBot.Common.Collections; using NadekoBot.Common.ModuleBehaviors; -using NadekoBot.Services; +using NadekoBot.Core.Services; namespace NadekoBot.Modules.Permissions.Services { diff --git a/src/NadekoBot/Modules/Permissions/Services/PermissionsService.cs b/NadekoBot.Core/Modules/Permissions/Services/PermissionsService.cs similarity index 98% rename from src/NadekoBot/Modules/Permissions/Services/PermissionsService.cs rename to NadekoBot.Core/Modules/Permissions/Services/PermissionsService.cs index 9b218758..38435a0d 100644 --- a/src/NadekoBot/Modules/Permissions/Services/PermissionsService.cs +++ b/NadekoBot.Core/Modules/Permissions/Services/PermissionsService.cs @@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Extensions; using NadekoBot.Modules.Permissions.Common; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NLog; namespace NadekoBot.Modules.Permissions.Services diff --git a/src/NadekoBot/Modules/Permissions/Services/ResetPermissionsService.cs b/NadekoBot.Core/Modules/Permissions/Services/ResetPermissionsService.cs similarity index 94% rename from src/NadekoBot/Modules/Permissions/Services/ResetPermissionsService.cs rename to NadekoBot.Core/Modules/Permissions/Services/ResetPermissionsService.cs index 08834b36..fcf5b200 100644 --- a/src/NadekoBot/Modules/Permissions/Services/ResetPermissionsService.cs +++ b/NadekoBot.Core/Modules/Permissions/Services/ResetPermissionsService.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Permissions.Services { diff --git a/src/NadekoBot/Modules/Pokemon/Common/PokeStats.cs b/NadekoBot.Core/Modules/Pokemon/Common/PokeStats.cs similarity index 100% rename from src/NadekoBot/Modules/Pokemon/Common/PokeStats.cs rename to NadekoBot.Core/Modules/Pokemon/Common/PokeStats.cs diff --git a/src/NadekoBot/Modules/Pokemon/Common/PokemonType.cs b/NadekoBot.Core/Modules/Pokemon/Common/PokemonType.cs similarity index 100% rename from src/NadekoBot/Modules/Pokemon/Common/PokemonType.cs rename to NadekoBot.Core/Modules/Pokemon/Common/PokemonType.cs diff --git a/src/NadekoBot/Modules/Pokemon/Pokemon.cs b/NadekoBot.Core/Modules/Pokemon/Pokemon.cs similarity index 99% rename from src/NadekoBot/Modules/Pokemon/Pokemon.cs rename to NadekoBot.Core/Modules/Pokemon/Pokemon.cs index 0389e1b0..f4d6544a 100644 --- a/src/NadekoBot/Modules/Pokemon/Pokemon.cs +++ b/NadekoBot.Core/Modules/Pokemon/Pokemon.cs @@ -1,8 +1,8 @@ using Discord.Commands; using NadekoBot.Extensions; using System.Linq; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Threading.Tasks; using Discord; diff --git a/src/NadekoBot/Modules/Pokemon/Services/PokemonService.cs b/NadekoBot.Core/Modules/Pokemon/Services/PokemonService.cs similarity index 97% rename from src/NadekoBot/Modules/Pokemon/Services/PokemonService.cs rename to NadekoBot.Core/Modules/Pokemon/Services/PokemonService.cs index 43edc5cd..d29f8818 100644 --- a/src/NadekoBot/Modules/Pokemon/Services/PokemonService.cs +++ b/NadekoBot.Core/Modules/Pokemon/Services/PokemonService.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; using NadekoBot.Modules.Pokemon.Common; -using NadekoBot.Services; +using NadekoBot.Core.Services; using Newtonsoft.Json; using NLog; diff --git a/src/NadekoBot/Modules/Searches/AnimeSearchCommands.cs b/NadekoBot.Core/Modules/Searches/AnimeSearchCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/AnimeSearchCommands.cs rename to NadekoBot.Core/Modules/Searches/AnimeSearchCommands.cs diff --git a/src/NadekoBot/Modules/Searches/Common/AnimeResult.cs b/NadekoBot.Core/Modules/Searches/Common/AnimeResult.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/AnimeResult.cs rename to NadekoBot.Core/Modules/Searches/Common/AnimeResult.cs diff --git a/src/NadekoBot/Modules/Searches/Common/DefineModel.cs b/NadekoBot.Core/Modules/Searches/Common/DefineModel.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/DefineModel.cs rename to NadekoBot.Core/Modules/Searches/Common/DefineModel.cs diff --git a/src/NadekoBot/Modules/Searches/Common/Exceptions/StreamNotFoundException.cs b/NadekoBot.Core/Modules/Searches/Common/Exceptions/StreamNotFoundException.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/Exceptions/StreamNotFoundException.cs rename to NadekoBot.Core/Modules/Searches/Common/Exceptions/StreamNotFoundException.cs diff --git a/src/NadekoBot/Modules/Searches/Common/GoogleSearchResult.cs b/NadekoBot.Core/Modules/Searches/Common/GoogleSearchResult.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/GoogleSearchResult.cs rename to NadekoBot.Core/Modules/Searches/Common/GoogleSearchResult.cs diff --git a/src/NadekoBot/Modules/Searches/Common/MagicItem.cs b/NadekoBot.Core/Modules/Searches/Common/MagicItem.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/MagicItem.cs rename to NadekoBot.Core/Modules/Searches/Common/MagicItem.cs diff --git a/src/NadekoBot/Modules/Searches/Common/MangaResult.cs b/NadekoBot.Core/Modules/Searches/Common/MangaResult.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/MangaResult.cs rename to NadekoBot.Core/Modules/Searches/Common/MangaResult.cs diff --git a/src/NadekoBot/Modules/Searches/Common/OmdbProvider.cs b/NadekoBot.Core/Modules/Searches/Common/OmdbProvider.cs similarity index 98% rename from src/NadekoBot/Modules/Searches/Common/OmdbProvider.cs rename to NadekoBot.Core/Modules/Searches/Common/OmdbProvider.cs index 16ea322a..292ea3c0 100644 --- a/src/NadekoBot/Modules/Searches/Common/OmdbProvider.cs +++ b/NadekoBot.Core/Modules/Searches/Common/OmdbProvider.cs @@ -3,7 +3,7 @@ using System.Net.Http; using System.Threading.Tasks; using Discord; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using Newtonsoft.Json; namespace NadekoBot.Modules.Searches.Common diff --git a/src/NadekoBot/Modules/Searches/Common/OverwatchApiModel.cs b/NadekoBot.Core/Modules/Searches/Common/OverwatchApiModel.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/OverwatchApiModel.cs rename to NadekoBot.Core/Modules/Searches/Common/OverwatchApiModel.cs diff --git a/src/NadekoBot/Modules/Searches/Common/SearchImageCacher.cs b/NadekoBot.Core/Modules/Searches/Common/SearchImageCacher.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/SearchImageCacher.cs rename to NadekoBot.Core/Modules/Searches/Common/SearchImageCacher.cs diff --git a/src/NadekoBot/Modules/Searches/Common/SearchPokemon.cs b/NadekoBot.Core/Modules/Searches/Common/SearchPokemon.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/SearchPokemon.cs rename to NadekoBot.Core/Modules/Searches/Common/SearchPokemon.cs diff --git a/src/NadekoBot/Modules/Searches/Common/StreamResponses.cs b/NadekoBot.Core/Modules/Searches/Common/StreamResponses.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/StreamResponses.cs rename to NadekoBot.Core/Modules/Searches/Common/StreamResponses.cs diff --git a/src/NadekoBot/Modules/Searches/Common/TimeModels.cs b/NadekoBot.Core/Modules/Searches/Common/TimeModels.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/TimeModels.cs rename to NadekoBot.Core/Modules/Searches/Common/TimeModels.cs diff --git a/src/NadekoBot/Modules/Searches/Common/WeatherModels.cs b/NadekoBot.Core/Modules/Searches/Common/WeatherModels.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/WeatherModels.cs rename to NadekoBot.Core/Modules/Searches/Common/WeatherModels.cs diff --git a/src/NadekoBot/Modules/Searches/Common/WikipediaApiModel.cs b/NadekoBot.Core/Modules/Searches/Common/WikipediaApiModel.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/WikipediaApiModel.cs rename to NadekoBot.Core/Modules/Searches/Common/WikipediaApiModel.cs diff --git a/src/NadekoBot/Modules/Searches/Common/WoWJoke.cs b/NadekoBot.Core/Modules/Searches/Common/WoWJoke.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/Common/WoWJoke.cs rename to NadekoBot.Core/Modules/Searches/Common/WoWJoke.cs diff --git a/src/NadekoBot/Modules/NSFW/Exceptions/TagBlacklistedException.cs b/NadekoBot.Core/Modules/Searches/Exceptions/TagBlacklistedException.cs similarity index 79% rename from src/NadekoBot/Modules/NSFW/Exceptions/TagBlacklistedException.cs rename to NadekoBot.Core/Modules/Searches/Exceptions/TagBlacklistedException.cs index c0f881f3..68091853 100644 --- a/src/NadekoBot/Modules/NSFW/Exceptions/TagBlacklistedException.cs +++ b/NadekoBot.Core/Modules/Searches/Exceptions/TagBlacklistedException.cs @@ -1,6 +1,6 @@ using System; -namespace NadekoBot.Modules.NSFW.Exceptions +namespace NadekoBot.Modules.Searches.Exceptions { public class TagBlacklistedException : Exception { diff --git a/src/NadekoBot/Modules/Searches/FeedCommands.cs b/NadekoBot.Core/Modules/Searches/FeedCommands.cs similarity index 99% rename from src/NadekoBot/Modules/Searches/FeedCommands.cs rename to NadekoBot.Core/Modules/Searches/FeedCommands.cs index 629209c8..d5e57c39 100644 --- a/src/NadekoBot/Modules/Searches/FeedCommands.cs +++ b/NadekoBot.Core/Modules/Searches/FeedCommands.cs @@ -103,7 +103,7 @@ namespace NadekoBot.Modules.Searches return embed.WithDescription(fs); - }, feeds.Count / 10); + }, feeds.Count, 10); } } } diff --git a/src/NadekoBot/Modules/Searches/JokeCommands.cs b/NadekoBot.Core/Modules/Searches/JokeCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/JokeCommands.cs rename to NadekoBot.Core/Modules/Searches/JokeCommands.cs diff --git a/src/NadekoBot/Modules/Searches/LoLCommands.cs b/NadekoBot.Core/Modules/Searches/LoLCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/LoLCommands.cs rename to NadekoBot.Core/Modules/Searches/LoLCommands.cs diff --git a/src/NadekoBot/Modules/Searches/MemegenCommands.cs b/NadekoBot.Core/Modules/Searches/MemegenCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/MemegenCommands.cs rename to NadekoBot.Core/Modules/Searches/MemegenCommands.cs diff --git a/src/NadekoBot/Modules/Searches/OsuCommands.cs b/NadekoBot.Core/Modules/Searches/OsuCommands.cs similarity index 99% rename from src/NadekoBot/Modules/Searches/OsuCommands.cs rename to NadekoBot.Core/Modules/Searches/OsuCommands.cs index b8f05df0..9b4de2ce 100644 --- a/src/NadekoBot/Modules/Searches/OsuCommands.cs +++ b/NadekoBot.Core/Modules/Searches/OsuCommands.cs @@ -1,7 +1,7 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using Newtonsoft.Json.Linq; using System; using System.Globalization; diff --git a/src/NadekoBot/Modules/Searches/OverwatchCommands.cs b/NadekoBot.Core/Modules/Searches/OverwatchCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/OverwatchCommands.cs rename to NadekoBot.Core/Modules/Searches/OverwatchCommands.cs diff --git a/src/NadekoBot/Modules/Searches/PlaceCommands.cs b/NadekoBot.Core/Modules/Searches/PlaceCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/PlaceCommands.cs rename to NadekoBot.Core/Modules/Searches/PlaceCommands.cs diff --git a/src/NadekoBot/Modules/Searches/PokemonSearchCommands.cs b/NadekoBot.Core/Modules/Searches/PokemonSearchCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/PokemonSearchCommands.cs rename to NadekoBot.Core/Modules/Searches/PokemonSearchCommands.cs diff --git a/src/NadekoBot/Modules/Searches/Searches.cs b/NadekoBot.Core/Modules/Searches/Searches.cs similarity index 97% rename from src/NadekoBot/Modules/Searches/Searches.cs rename to NadekoBot.Core/Modules/Searches/Searches.cs index 1b978535..696cb449 100644 --- a/src/NadekoBot/Modules/Searches/Searches.cs +++ b/NadekoBot.Core/Modules/Searches/Searches.cs @@ -4,7 +4,7 @@ using Newtonsoft.Json.Linq; using System; using System.Linq; using System.Net.Http; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Threading.Tasks; using System.Net; using System.Collections.Generic; @@ -36,6 +36,22 @@ namespace NadekoBot.Modules.Searches _google = google; } + //for anonymasen :^) + [NadekoCommand, Usage, Description, Aliases] + public async Task Rip([Remainder]IGuildUser usr) + { + using (var pic = await _service.GetRipPictureAsync(usr.Nickname ?? usr.Username, usr.RealAvatarUrl())) + using (var picStream = pic.ToStream()) + { + await Context.Channel.SendFileAsync( + picStream, + "rip.png", + $"Rip {Format.Bold(usr.ToString())} \n\t- " + + Format.Italics(Context.User.ToString())) + .ConfigureAwait(false); + } + } + [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] [RequireUserPermission(GuildPermission.ManageMessages)] @@ -81,14 +97,16 @@ namespace NadekoBot.Modules.Searches var data = JsonConvert.DeserializeObject(response); + Func f = StandardConversions.CelsiusToFahrenheit; + var embed = new EmbedBuilder() .AddField(fb => fb.WithName("🌍 " + Format.Bold(GetText("location"))).WithValue($"[{data.Name + ", " + data.Sys.Country}](https://openweathermap.org/city/{data.Id})").WithIsInline(true)) .AddField(fb => fb.WithName("📏 " + Format.Bold(GetText("latlong"))).WithValue($"{data.Coord.Lat}, {data.Coord.Lon}").WithIsInline(true)) .AddField(fb => fb.WithName("☁ " + Format.Bold(GetText("condition"))).WithValue(string.Join(", ", data.Weather.Select(w => w.Main))).WithIsInline(true)) .AddField(fb => fb.WithName("😓 " + Format.Bold(GetText("humidity"))).WithValue($"{data.Main.Humidity}%").WithIsInline(true)) .AddField(fb => fb.WithName("💨 " + Format.Bold(GetText("wind_speed"))).WithValue(data.Wind.Speed + " m/s").WithIsInline(true)) - .AddField(fb => fb.WithName("🌡 " + Format.Bold(GetText("temperature"))).WithValue(data.Main.Temp + "°C").WithIsInline(true)) - .AddField(fb => fb.WithName("🔆 " + Format.Bold(GetText("min_max"))).WithValue($"{data.Main.TempMin}°C - {data.Main.TempMax}°C").WithIsInline(true)) + .AddField(fb => fb.WithName("🌡 " + Format.Bold(GetText("temperature"))).WithValue($"{data.Main.Temp:F1}°C / {f(data.Main.Temp):F1}°F").WithIsInline(true)) + .AddField(fb => fb.WithName("🔆 " + Format.Bold(GetText("min_max"))).WithValue($"{data.Main.TempMin:F1}°C - {data.Main.TempMax:F1}°C\n{f(data.Main.TempMin):F1}°F - {f(data.Main.TempMax):F1}°F").WithIsInline(true)) .AddField(fb => fb.WithName("🌄 " + Format.Bold(GetText("sunrise"))).WithValue($"{data.Sys.Sunrise.ToUnixTimestamp():HH:mm} UTC").WithIsInline(true)) .AddField(fb => fb.WithName("🌇 " + Format.Bold(GetText("sunset"))).WithValue($"{data.Sys.Sunset.ToUnixTimestamp():HH:mm} UTC").WithIsInline(true)) .WithOkColor() diff --git a/src/NadekoBot/Modules/Searches/Services/AnimeSearchService.cs b/NadekoBot.Core/Modules/Searches/Services/AnimeSearchService.cs similarity index 98% rename from src/NadekoBot/Modules/Searches/Services/AnimeSearchService.cs rename to NadekoBot.Core/Modules/Searches/Services/AnimeSearchService.cs index 1a372d8c..0a495806 100644 --- a/src/NadekoBot/Modules/Searches/Services/AnimeSearchService.cs +++ b/NadekoBot.Core/Modules/Searches/Services/AnimeSearchService.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services; +using NadekoBot.Core.Services; using Newtonsoft.Json; using NLog; using System; diff --git a/src/NadekoBot/Modules/Searches/Services/FeedsService.cs b/NadekoBot.Core/Modules/Searches/Services/FeedsService.cs similarity index 95% rename from src/NadekoBot/Modules/Searches/Services/FeedsService.cs rename to NadekoBot.Core/Modules/Searches/Services/FeedsService.cs index 33ac0ff9..a5853ef2 100644 --- a/src/NadekoBot/Modules/Searches/Services/FeedsService.cs +++ b/NadekoBot.Core/Modules/Searches/Services/FeedsService.cs @@ -2,14 +2,14 @@ using Microsoft.SyndicationFeed; using Microsoft.SyndicationFeed.Rss; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Xml; using System.Collections.Generic; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; using System.Collections.Concurrent; using Discord.WebSocket; @@ -24,11 +24,13 @@ namespace NadekoBot.Modules.Searches.Services private readonly ConcurrentDictionary _lastPosts = new ConcurrentDictionary(); - public FeedsService(IEnumerable gcs, DbService db, DiscordSocketClient client) + public FeedsService(NadekoBot bot, DbService db, DiscordSocketClient client) { _db = db; - _subs = gcs.SelectMany(x => x.FeedSubs) + _subs = bot + .AllGuildConfigs + .SelectMany(x => x.FeedSubs) .GroupBy(x => x.Url) .ToDictionary(x => x.Key, x => x.ToHashSet()) .ToConcurrent(); @@ -54,8 +56,7 @@ namespace NadekoBot.Modules.Searches.Services if (kvp.Value.Count == 0) continue; - DateTime lastTime; - if (!_lastPosts.TryGetValue(kvp.Key, out lastTime)) + if (!_lastPosts.TryGetValue(kvp.Key, out DateTime lastTime)) lastTime = _lastPosts.AddOrUpdate(kvp.Key, DateTime.UtcNow, (k, old) => DateTime.UtcNow); var rssUrl = kvp.Key; diff --git a/src/NadekoBot/Modules/Searches/Services/SearchesService.cs b/NadekoBot.Core/Modules/Searches/Services/SearchesService.cs similarity index 69% rename from src/NadekoBot/Modules/Searches/Services/SearchesService.cs rename to NadekoBot.Core/Modules/Searches/Services/SearchesService.cs index 25be38d4..d982b720 100644 --- a/src/NadekoBot/Modules/Searches/Services/SearchesService.cs +++ b/NadekoBot.Core/Modules/Searches/Services/SearchesService.cs @@ -1,7 +1,7 @@ using Discord; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using Newtonsoft.Json; using NLog; using System; @@ -10,17 +10,23 @@ using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using NadekoBot.Modules.Searches.Common; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Linq; using Microsoft.EntityFrameworkCore; -using NadekoBot.Modules.NSFW.Exceptions; using System.Net.Http; using Newtonsoft.Json.Linq; using AngleSharp; +using System.Threading; +using NadekoBot.Modules.Searches.Exceptions; +using ImageSharp; +using Image = ImageSharp.Image; +using SixLabors.Primitives; +using SixLabors.Fonts; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Modules.Searches.Services { - public class SearchesService : INService + public class SearchesService : INService, IUnloadableService { public HttpClient Http { get; } @@ -28,11 +34,16 @@ namespace NadekoBot.Modules.Searches.Services private readonly IGoogleApiService _google; private readonly DbService _db; private readonly Logger _log; + private readonly IImagesService _imgs; + private readonly IDataCache _cache; + private readonly FontProvider _fonts; + private readonly HttpClient http; public ConcurrentDictionary TranslatedChannels { get; } = new ConcurrentDictionary(); public ConcurrentDictionary UserLanguages { get; } = new ConcurrentDictionary(); public readonly string PokemonAbilitiesFile = "data/pokemon/pokemon_abilities7.json"; + public readonly string PokemonListFile = "data/pokemon/pokemon_list7.json"; public Dictionary Pokemons { get; } = new Dictionary(); public Dictionary PokemonAbilities { get; } = new Dictionary(); @@ -41,10 +52,16 @@ namespace NadekoBot.Modules.Searches.Services public List MagicItems { get; } = new List(); private readonly ConcurrentDictionary _imageCacher = new ConcurrentDictionary(); + + public ConcurrentDictionary AutoHentaiTimers { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary AutoBoobTimers { get; } = new ConcurrentDictionary(); + public ConcurrentDictionary AutoButtTimers { get; } = new ConcurrentDictionary(); private readonly ConcurrentDictionary> _blacklistedTags = new ConcurrentDictionary>(); - public SearchesService(DiscordSocketClient client, IGoogleApiService google, DbService db, IEnumerable gcs) + public SearchesService(DiscordSocketClient client, IGoogleApiService google, + DbService db, NadekoBot bot, IImagesService imgs, IDataCache cache, + FontProvider fonts) { Http = new HttpClient(); Http.AddFakeHeaders(); @@ -52,9 +69,13 @@ namespace NadekoBot.Modules.Searches.Services _google = google; _db = db; _log = LogManager.GetCurrentClassLogger(); + _imgs = imgs; + _cache = cache; + _fonts = fonts; + http = new HttpClient(); _blacklistedTags = new ConcurrentDictionary>( - gcs.ToDictionary( + bot.AllGuildConfigs.ToDictionary( x => x.GuildId, x => new HashSet(x.NsfwBlacklistedTags.Select(y => y.Tag)))); @@ -120,6 +141,61 @@ namespace NadekoBot.Modules.Searches.Services _log.Warn("data/magicitems.json is missing. Magic items are not loaded."); } + public async Task> GetRipPictureAsync(string text, string imgUrl) + { + var (succ, data) = await _cache.TryGetImageDataAsync(imgUrl); + if (!succ) + { + using (var temp = await http.GetAsync(imgUrl, HttpCompletionOption.ResponseHeadersRead)) + { + if (temp.Content.Headers.ContentType.MediaType != "image/png" + && temp.Content.Headers.ContentType.MediaType != "image/jpeg" + && temp.Content.Headers.ContentType.MediaType != "image/gif") + data = null; + else + { + using (var tempDraw = ImageSharp.Image.Load(await temp.Content.ReadAsStreamAsync()).Resize(69, 70)) + { + tempDraw.ApplyRoundedCorners(35); + data = tempDraw.ToStream().ToArray(); + } + } + } + + await _cache.SetImageDataAsync(imgUrl, data); + } + var bg = ImageSharp.Image.Load(_imgs.Rip.ToArray()); + + //avatar 82, 139 + if (data != null) + { + var avatar = Image.Load(data).Resize(85, 85); + bg.DrawImage(avatar, + default, + new Point(82, 139), + GraphicsOptions.Default); + } + //text 63, 241 + bg.DrawText(text, + _fonts.RipNameFont, + Rgba32.Black, + new PointF(25, 225), + new ImageSharp.Drawing.TextGraphicsOptions() + { + HorizontalAlignment = HorizontalAlignment.Center, + WrapTextWidth = 190, + }); + + //flowa + var flowers = Image.Load(_imgs.FlowerCircle.ToArray()); + bg.DrawImage(flowers, + default, + new Point(0, 0), + GraphicsOptions.Default); + + return bg; + } + public async Task Translate(string langs, string text = null) { var langarr = langs.ToLowerInvariant().Split('>'); @@ -139,12 +215,6 @@ namespace NadekoBot.Modules.Searches.Services { var blacklistedTags = GetBlacklistedTags(guild.Value); - if (blacklistedTags - .Any(x => tag.ToLowerInvariant().Contains(x))) - { - throw new TagBlacklistedException(); - } - var cacher = _imageCacher.GetOrAdd(guild.Value, (key) => new SearchImageCacher()); return cacher.GetImage(tag, isExplicit, type, blacklistedTags); @@ -206,7 +276,7 @@ namespace NadekoBot.Modules.Searches.Services public async Task<(string Text, string BaseUri)> GetRandomJoke() { - var config = Configuration.Default.WithDefaultLoader(); + var config = AngleSharp.Configuration.Default.WithDefaultLoader(); var document = await BrowsingContext.New(config).OpenAsync("http://www.goodbadjokes.com/random"); var html = document.QuerySelector(".post > .joke-content"); @@ -222,6 +292,19 @@ namespace NadekoBot.Modules.Searches.Services var response = await Http.GetStringAsync("http://api.icndb.com/jokes/random/").ConfigureAwait(false); return JObject.Parse(response)["value"]["joke"].ToString() + " 😆"; } + + public Task Unload() + { + AutoBoobTimers.ForEach(x => x.Value.Change(Timeout.Infinite, Timeout.Infinite)); + AutoBoobTimers.Clear(); + AutoButtTimers.ForEach(x => x.Value.Change(Timeout.Infinite, Timeout.Infinite)); + AutoButtTimers.Clear(); + AutoHentaiTimers.ForEach(x => x.Value.Change(Timeout.Infinite, Timeout.Infinite)); + AutoHentaiTimers.Clear(); + + _imageCacher.Clear(); + return Task.CompletedTask; + } } public struct UserChannelPair diff --git a/src/NadekoBot/Modules/Searches/Services/StreamNotificationService.cs b/NadekoBot.Core/Modules/Searches/Services/StreamNotificationService.cs similarity index 98% rename from src/NadekoBot/Modules/Searches/Services/StreamNotificationService.cs rename to NadekoBot.Core/Modules/Searches/Services/StreamNotificationService.cs index 15cc639a..2ca9fd58 100644 --- a/src/NadekoBot/Modules/Searches/Services/StreamNotificationService.cs +++ b/NadekoBot.Core/Modules/Searches/Services/StreamNotificationService.cs @@ -1,8 +1,8 @@ using Discord; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using Newtonsoft.Json; using System; using System.Collections.Concurrent; @@ -13,7 +13,7 @@ using System.Threading; using System.Threading.Tasks; using NadekoBot.Modules.Searches.Common; using NadekoBot.Modules.Searches.Common.Exceptions; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; namespace NadekoBot.Modules.Searches.Services { diff --git a/src/NadekoBot/Modules/Searches/StreamNotificationCommands.cs b/NadekoBot.Core/Modules/Searches/StreamNotificationCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Searches/StreamNotificationCommands.cs rename to NadekoBot.Core/Modules/Searches/StreamNotificationCommands.cs index 1796b4fd..8b565704 100644 --- a/src/NadekoBot/Modules/Searches/StreamNotificationCommands.cs +++ b/NadekoBot.Core/Modules/Searches/StreamNotificationCommands.cs @@ -2,9 +2,9 @@ using Discord; using System.Linq; using System.Threading.Tasks; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System.Collections.Generic; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; using NadekoBot.Common.Attributes; using NadekoBot.Extensions; diff --git a/src/NadekoBot/Modules/Searches/TranslatorCommands.cs b/NadekoBot.Core/Modules/Searches/TranslatorCommands.cs similarity index 99% rename from src/NadekoBot/Modules/Searches/TranslatorCommands.cs rename to NadekoBot.Core/Modules/Searches/TranslatorCommands.cs index 9f4960fe..b0693fdd 100644 --- a/src/NadekoBot/Modules/Searches/TranslatorCommands.cs +++ b/NadekoBot.Core/Modules/Searches/TranslatorCommands.cs @@ -4,7 +4,7 @@ using NadekoBot.Extensions; using System.Threading.Tasks; using System.Linq; using NadekoBot.Common.Attributes; -using NadekoBot.Services; +using NadekoBot.Core.Services; using NadekoBot.Modules.Searches.Services; namespace NadekoBot.Modules.Searches diff --git a/src/NadekoBot/Modules/Searches/XkcdCommands.cs b/NadekoBot.Core/Modules/Searches/XkcdCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Searches/XkcdCommands.cs rename to NadekoBot.Core/Modules/Searches/XkcdCommands.cs diff --git a/src/NadekoBot/Modules/Utility/BotConfigCommands.cs b/NadekoBot.Core/Modules/Utility/BotConfigCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Utility/BotConfigCommands.cs rename to NadekoBot.Core/Modules/Utility/BotConfigCommands.cs index cc91dd9f..9c1f5f56 100644 --- a/src/NadekoBot/Modules/Utility/BotConfigCommands.cs +++ b/NadekoBot.Core/Modules/Utility/BotConfigCommands.cs @@ -2,7 +2,7 @@ using Discord.Commands; using NadekoBot.Common; using NadekoBot.Common.Attributes; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Utility/CalcCommands.cs b/NadekoBot.Core/Modules/Utility/CalcCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/CalcCommands.cs rename to NadekoBot.Core/Modules/Utility/CalcCommands.cs diff --git a/src/NadekoBot/Modules/Utility/CommandMapCommands.cs b/NadekoBot.Core/Modules/Utility/CommandMapCommands.cs similarity index 97% rename from src/NadekoBot/Modules/Utility/CommandMapCommands.cs rename to NadekoBot.Core/Modules/Utility/CommandMapCommands.cs index 9903dedf..212e8191 100644 --- a/src/NadekoBot/Modules/Utility/CommandMapCommands.cs +++ b/NadekoBot.Core/Modules/Utility/CommandMapCommands.cs @@ -3,8 +3,8 @@ using Discord.Commands; using Discord.WebSocket; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; @@ -126,7 +126,7 @@ namespace NadekoBot.Modules.Utility .WithDescription(string.Join("\n", arr.Skip(curPage * 10).Take(10).Select(x => $"`{x.Key}` => `{x.Value}`"))); - }, arr.Length / 10).ConfigureAwait(false); + }, arr.Length, 10).ConfigureAwait(false); } } } diff --git a/NadekoBot.Core/Modules/Utility/Common/ConvertUnit.cs b/NadekoBot.Core/Modules/Utility/Common/ConvertUnit.cs new file mode 100644 index 00000000..85b565f3 --- /dev/null +++ b/NadekoBot.Core/Modules/Utility/Common/ConvertUnit.cs @@ -0,0 +1,9 @@ +namespace NadekoBot.Modules.Utility.Common +{ + public class ConvertUnit + { + public string[] Triggers { get; set; } + public string UnitType { get; set; } + public decimal Modifier { get; set; } + } +} diff --git a/src/NadekoBot/Modules/Utility/Common/Exceptions/StreamRoleNotFoundException.cs b/NadekoBot.Core/Modules/Utility/Common/Exceptions/StreamRoleNotFoundException.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Common/Exceptions/StreamRoleNotFoundException.cs rename to NadekoBot.Core/Modules/Utility/Common/Exceptions/StreamRoleNotFoundException.cs diff --git a/src/NadekoBot/Modules/Utility/Common/Exceptions/StreamRolePermissionException.cs b/NadekoBot.Core/Modules/Utility/Common/Exceptions/StreamRolePermissionException.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Common/Exceptions/StreamRolePermissionException.cs rename to NadekoBot.Core/Modules/Utility/Common/Exceptions/StreamRolePermissionException.cs diff --git a/src/NadekoBot/Modules/Utility/Common/Patreon/PatreonData.cs b/NadekoBot.Core/Modules/Utility/Common/Patreon/PatreonData.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Common/Patreon/PatreonData.cs rename to NadekoBot.Core/Modules/Utility/Common/Patreon/PatreonData.cs diff --git a/src/NadekoBot/Modules/Utility/Common/Patreon/PatreonPledge.cs b/NadekoBot.Core/Modules/Utility/Common/Patreon/PatreonPledge.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Common/Patreon/PatreonPledge.cs rename to NadekoBot.Core/Modules/Utility/Common/Patreon/PatreonPledge.cs diff --git a/src/NadekoBot/Modules/Utility/Common/Patreon/PatreonUser.cs b/NadekoBot.Core/Modules/Utility/Common/Patreon/PatreonUser.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Common/Patreon/PatreonUser.cs rename to NadekoBot.Core/Modules/Utility/Common/Patreon/PatreonUser.cs diff --git a/src/NadekoBot/Modules/Utility/Common/RepeatRunner.cs b/NadekoBot.Core/Modules/Utility/Common/RepeatRunner.cs similarity index 98% rename from src/NadekoBot/Modules/Utility/Common/RepeatRunner.cs rename to NadekoBot.Core/Modules/Utility/Common/RepeatRunner.cs index bf21d317..30c14709 100644 --- a/src/NadekoBot/Modules/Utility/Common/RepeatRunner.cs +++ b/NadekoBot.Core/Modules/Utility/Common/RepeatRunner.cs @@ -5,7 +5,7 @@ using Discord; using Discord.Net; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Utility.Common diff --git a/src/NadekoBot/Modules/Utility/Common/StreamRoleListType.cs b/NadekoBot.Core/Modules/Utility/Common/StreamRoleListType.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/Common/StreamRoleListType.cs rename to NadekoBot.Core/Modules/Utility/Common/StreamRoleListType.cs diff --git a/src/NadekoBot/Modules/Utility/Extensions/StreamRoleExtensions.cs b/NadekoBot.Core/Modules/Utility/Extensions/StreamRoleExtensions.cs similarity index 89% rename from src/NadekoBot/Modules/Utility/Extensions/StreamRoleExtensions.cs rename to NadekoBot.Core/Modules/Utility/Extensions/StreamRoleExtensions.cs index eaf16e84..f33ad47b 100644 --- a/src/NadekoBot/Modules/Utility/Extensions/StreamRoleExtensions.cs +++ b/NadekoBot.Core/Modules/Utility/Extensions/StreamRoleExtensions.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Database.Repositories; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Database.Repositories; namespace NadekoBot.Modules.Utility.Extensions { diff --git a/src/NadekoBot/Modules/Utility/InfoCommands.cs b/NadekoBot.Core/Modules/Utility/InfoCommands.cs similarity index 99% rename from src/NadekoBot/Modules/Utility/InfoCommands.cs rename to NadekoBot.Core/Modules/Utility/InfoCommands.cs index 95a3f6b1..96243dcc 100644 --- a/src/NadekoBot/Modules/Utility/InfoCommands.cs +++ b/NadekoBot.Core/Modules/Utility/InfoCommands.cs @@ -2,7 +2,7 @@ using Discord; using Discord.Commands; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; using System.Linq; using System.Text; diff --git a/NadekoBot.Core/Modules/Utility/NadekoBot.Modules.Searches.csproj b/NadekoBot.Core/Modules/Utility/NadekoBot.Modules.Searches.csproj new file mode 100644 index 00000000..0ec5a3a3 --- /dev/null +++ b/NadekoBot.Core/Modules/Utility/NadekoBot.Modules.Searches.csproj @@ -0,0 +1,23 @@ + + + + netcoreapp2.0 + latest + + + + ..\src\NadekoBot\bin\$(Configuration)\netcoreapp2.0\modules\$(AssemblyName)\ + false + false + + + + + + + + + + + + diff --git a/src/NadekoBot/Modules/Utility/PatreonCommands.cs b/NadekoBot.Core/Modules/Utility/PatreonCommands.cs similarity index 94% rename from src/NadekoBot/Modules/Utility/PatreonCommands.cs rename to NadekoBot.Core/Modules/Utility/PatreonCommands.cs index 96ac04c4..330779d8 100644 --- a/src/NadekoBot/Modules/Utility/PatreonCommands.cs +++ b/NadekoBot.Core/Modules/Utility/PatreonCommands.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; using Discord.Commands; using System; -using NadekoBot.Services; +using NadekoBot.Core.Services; using NadekoBot.Extensions; using Discord; using NadekoBot.Common.Attributes; @@ -26,21 +26,19 @@ namespace NadekoBot.Modules.Utility _db = db; _currency = currency; } - + [NadekoCommand, Usage, Description, Aliases] - [OwnerOnly] [RequireContext(ContextType.DM)] public async Task PatreonRewardsReload() { if (string.IsNullOrWhiteSpace(_creds.PatreonAccessToken)) return; - await _service.RefreshPledges(true).ConfigureAwait(false); + await _service.RefreshPledges().ConfigureAwait(false); await Context.Channel.SendConfirmAsync("👌").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] - [RequireContext(ContextType.DM)] public async Task ClaimPatreonRewards() { if (string.IsNullOrWhiteSpace(_creds.PatreonAccessToken)) diff --git a/src/NadekoBot/Modules/Utility/QuoteCommands.cs b/NadekoBot.Core/Modules/Utility/QuoteCommands.cs similarity index 99% rename from src/NadekoBot/Modules/Utility/QuoteCommands.cs rename to NadekoBot.Core/Modules/Utility/QuoteCommands.cs index 8b4a6752..1056a73a 100644 --- a/src/NadekoBot/Modules/Utility/QuoteCommands.cs +++ b/NadekoBot.Core/Modules/Utility/QuoteCommands.cs @@ -1,8 +1,8 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Utility/RemindCommands.cs b/NadekoBot.Core/Modules/Utility/RemindCommands.cs similarity index 98% rename from src/NadekoBot/Modules/Utility/RemindCommands.cs rename to NadekoBot.Core/Modules/Utility/RemindCommands.cs index caa13aed..ec18d50e 100644 --- a/src/NadekoBot/Modules/Utility/RemindCommands.cs +++ b/NadekoBot.Core/Modules/Utility/RemindCommands.cs @@ -1,8 +1,8 @@ using Discord; using Discord.Commands; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Threading.Tasks; diff --git a/src/NadekoBot/Modules/Utility/RepeatCommands.cs b/NadekoBot.Core/Modules/Utility/RepeatCommands.cs similarity index 99% rename from src/NadekoBot/Modules/Utility/RepeatCommands.cs rename to NadekoBot.Core/Modules/Utility/RepeatCommands.cs index 921c0746..241b7744 100644 --- a/src/NadekoBot/Modules/Utility/RepeatCommands.cs +++ b/NadekoBot.Core/Modules/Utility/RepeatCommands.cs @@ -2,8 +2,8 @@ using Discord.Commands; using Microsoft.EntityFrameworkCore; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Concurrent; using System.Linq; diff --git a/src/NadekoBot/Modules/Utility/Services/CommandMapService.cs b/NadekoBot.Core/Modules/Utility/Services/CommandMapService.cs similarity index 93% rename from src/NadekoBot/Modules/Utility/Services/CommandMapService.cs rename to NadekoBot.Core/Modules/Utility/Services/CommandMapService.cs index 2aa1c419..23efc2f9 100644 --- a/src/NadekoBot/Modules/Utility/Services/CommandMapService.cs +++ b/NadekoBot.Core/Modules/Utility/Services/CommandMapService.cs @@ -5,8 +5,8 @@ using System.Threading.Tasks; using Discord; using NadekoBot.Common.ModuleBehaviors; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; namespace NadekoBot.Modules.Utility.Services @@ -17,11 +17,11 @@ namespace NadekoBot.Modules.Utility.Services public ConcurrentDictionary> AliasMaps { get; } = new ConcurrentDictionary>(); //commandmap - public CommandMapService(IEnumerable gcs) + public CommandMapService(NadekoBot bot) { _log = LogManager.GetCurrentClassLogger(); AliasMaps = new ConcurrentDictionary>( - gcs.ToDictionary( + bot.AllGuildConfigs.ToDictionary( x => x.GuildId, x => new ConcurrentDictionary(x.CommandAliases .Distinct(new CommandAliasEqualityComparer()) diff --git a/NadekoBot.Core/Modules/Utility/Services/ConverterService.cs b/NadekoBot.Core/Modules/Utility/Services/ConverterService.cs new file mode 100644 index 00000000..46c88fc8 --- /dev/null +++ b/NadekoBot.Core/Modules/Utility/Services/ConverterService.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Discord.WebSocket; +using NadekoBot.Core.Services; +using Newtonsoft.Json; +using NLog; +using NadekoBot.Modules.Utility.Common; +using NadekoBot.Extensions; + +namespace NadekoBot.Modules.Utility.Services +{ + public class ConverterService : INService, IUnloadableService + { + public ConvertUnit[] Units => + _cache.Redis.GetDatabase() + .StringGet("converter_units") + .ToString() + .MapJson(); + + private readonly Logger _log; + private readonly Timer _currencyUpdater; + private readonly TimeSpan _updateInterval = new TimeSpan(12, 0, 0); + private readonly DbService _db; + private readonly IDataCache _cache; + private readonly HttpClient _http; + + public ConverterService(DiscordSocketClient client, DbService db, + IDataCache cache) + { + _log = LogManager.GetCurrentClassLogger(); + _db = db; + _cache = cache; + _http = new HttpClient(); + + if (client.ShardId == 0) + { + _currencyUpdater = new Timer(async (shouldLoad) => await UpdateCurrency((bool)shouldLoad), + client.ShardId == 0, + TimeSpan.Zero, + _updateInterval); + } + } + + private async Task GetCurrencyRates() + { + var res = await _http.GetStringAsync("http://api.fixer.io/latest").ConfigureAwait(false); + return JsonConvert.DeserializeObject(res); + } + + private async Task UpdateCurrency(bool shouldLoad) + { + try + { + var unitTypeString = "currency"; + if (shouldLoad) + { + var currencyRates = await GetCurrencyRates(); + var baseType = new ConvertUnit() + { + Triggers = new[] { currencyRates.Base }, + Modifier = decimal.One, + UnitType = unitTypeString + }; + var range = currencyRates.ConversionRates.Select(u => new ConvertUnit() + { + Triggers = new[] { u.Key }, + Modifier = u.Value, + UnitType = unitTypeString + }).ToArray(); + + var fileData = JsonConvert.DeserializeObject( + File.ReadAllText("data/units.json")); + + var data = JsonConvert.SerializeObject(range.Append(baseType).Concat(fileData).ToList()); + _cache.Redis.GetDatabase() + .StringSet("converter_units", data); + } + } + catch (Exception ex) + { + _log.Warn("Ignore the message below"); + _log.Warn(ex); + } + } + + public Task Unload() + { + _currencyUpdater?.Change(Timeout.Infinite, Timeout.Infinite); + return Task.CompletedTask; + } + } + + public class Rates + { + public string Base { get; set; } + public DateTime Date { get; set; } + [JsonProperty("rates")] + public Dictionary ConversionRates { get; set; } + } +} diff --git a/src/NadekoBot/Modules/Utility/Services/MessageRepeaterService.cs b/NadekoBot.Core/Modules/Utility/Services/MessageRepeaterService.cs similarity index 51% rename from src/NadekoBot/Modules/Utility/Services/MessageRepeaterService.cs rename to NadekoBot.Core/Modules/Utility/Services/MessageRepeaterService.cs index 4e937eb4..bd19be3b 100644 --- a/src/NadekoBot/Modules/Utility/Services/MessageRepeaterService.cs +++ b/NadekoBot.Core/Modules/Utility/Services/MessageRepeaterService.cs @@ -4,8 +4,8 @@ using System.Linq; using System.Threading.Tasks; using Discord.WebSocket; using NadekoBot.Modules.Utility.Common; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Utility.Services { @@ -16,24 +16,25 @@ namespace NadekoBot.Modules.Utility.Services public ConcurrentDictionary> Repeaters { get; set; } public bool RepeaterReady { get; private set; } - public MessageRepeaterService(NadekoBot bot, DiscordSocketClient client, IEnumerable gcs) + public MessageRepeaterService(NadekoBot bot, DiscordSocketClient client) { var _ = Task.Run(async () => { await bot.Ready.Task.ConfigureAwait(false); - Repeaters = new ConcurrentDictionary>(gcs - .Select(gc => - { - var guild = client.GetGuild(gc.GuildId); - if (guild == null) - return (0, null); - return (gc.GuildId, new ConcurrentQueue(gc.GuildRepeaters - .Select(gr => new RepeatRunner(client, guild, gr)) - .Where(x => x.Guild != null))); - }) - .Where(x => x.Item2 != null) - .ToDictionary(x => x.Item1, x => x.Item2)); + Repeaters = new ConcurrentDictionary>( + bot.AllGuildConfigs + .Select(gc => + { + var guild = client.GetGuild(gc.GuildId); + if (guild == null) + return (0, null); + return (gc.GuildId, new ConcurrentQueue(gc.GuildRepeaters + .Select(gr => new RepeatRunner(client, guild, gr)) + .Where(x => x.Guild != null))); + }) + .Where(x => x.Item2 != null) + .ToDictionary(x => x.GuildId, x => x.Item2)); RepeaterReady = true; }); } diff --git a/src/NadekoBot/Modules/Utility/Services/PatreonRewardsService.cs b/NadekoBot.Core/Modules/Utility/Services/PatreonRewardsService.cs similarity index 50% rename from src/NadekoBot/Modules/Utility/Services/PatreonRewardsService.cs rename to NadekoBot.Core/Modules/Utility/Services/PatreonRewardsService.cs index c0dbc96e..1deb8f5f 100644 --- a/src/NadekoBot/Modules/Utility/Services/PatreonRewardsService.cs +++ b/NadekoBot.Core/Modules/Utility/Services/PatreonRewardsService.cs @@ -1,26 +1,26 @@ using System; using System.Collections.Generic; -using System.Collections.Immutable; -using System.IO; using System.Linq; using System.Net.Http; using System.Threading; using System.Threading.Tasks; using Discord.WebSocket; using NadekoBot.Modules.Utility.Common.Patreon; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using Newtonsoft.Json; using NLog; +using NadekoBot.Extensions; +using NadekoBot.Core.Common.Caching; namespace NadekoBot.Modules.Utility.Services { - public class PatreonRewardsService : INService + public class PatreonRewardsService : INService, IUnloadableService { private readonly SemaphoreSlim getPledgesLocker = new SemaphoreSlim(1, 1); - public ImmutableArray Pledges { get; private set; } - public DateTime LastUpdate { get; private set; } = DateTime.UtcNow; + private readonly FactoryCache _pledges; + public PatreonUserAndReward[] Pledges => _pledges.GetValue(); public readonly Timer Updater; private readonly SemaphoreSlim claimLockJustInCase = new SemaphoreSlim(1, 1); @@ -30,78 +30,92 @@ namespace NadekoBot.Modules.Utility.Services private readonly IBotCredentials _creds; private readonly DbService _db; private readonly CurrencyService _currency; + private readonly IDataCache _cache; + private readonly string _key; - private readonly string cacheFileName = "./patreon-rewards.json"; + public DateTime LastUpdate { get; private set; } = DateTime.UtcNow; - public PatreonRewardsService(IBotCredentials creds, DbService db, CurrencyService currency, - DiscordSocketClient client) + public PatreonRewardsService(IBotCredentials creds, DbService db, + CurrencyService currency, + DiscordSocketClient client, IDataCache cache) { + _log = LogManager.GetCurrentClassLogger(); _creds = creds; _db = db; _currency = currency; - if (string.IsNullOrWhiteSpace(creds.PatreonAccessToken)) - return; - _log = LogManager.GetCurrentClassLogger(); - Updater = new Timer(async (load) => await RefreshPledges((bool)load), - client.ShardId == 0, client.ShardId == 0 ? TimeSpan.Zero : TimeSpan.FromMinutes(2), Interval); + _cache = cache; + _key = _creds.RedisKey() + "_patreon_rewards"; + + _pledges = new FactoryCache(() => + { + var r = _cache.Redis.GetDatabase(); + var data = r.StringGet(_key); + if (data.IsNullOrEmpty) + return null; + else + { + return JsonConvert.DeserializeObject(data); + } + }, TimeSpan.FromSeconds(20)); + + if(client.ShardId == 0) + Updater = new Timer(async _ => await RefreshPledges(), + null, TimeSpan.Zero, Interval); } - public async Task RefreshPledges(bool shouldLoad) + public async Task RefreshPledges() { - if (shouldLoad) + if (string.IsNullOrWhiteSpace(_creds.PatreonAccessToken)) + return; + + LastUpdate = DateTime.UtcNow; + await getPledgesLocker.WaitAsync().ConfigureAwait(false); + try { - LastUpdate = DateTime.UtcNow; - await getPledgesLocker.WaitAsync().ConfigureAwait(false); - try + var rewards = new List(); + var users = new List(); + using (var http = new HttpClient()) { - var rewards = new List(); - var users = new List(); - using (var http = new HttpClient()) + http.DefaultRequestHeaders.Clear(); + http.DefaultRequestHeaders.Add("Authorization", "Bearer " + _creds.PatreonAccessToken); + var data = new PatreonData() { - http.DefaultRequestHeaders.Clear(); - http.DefaultRequestHeaders.Add("Authorization", "Bearer " + _creds.PatreonAccessToken); - var data = new PatreonData() + Links = new PatreonDataLinks() { - Links = new PatreonDataLinks() - { - next = $"https://api.patreon.com/oauth2/api/campaigns/{_creds.PatreonCampaignId}/pledges" - } - }; - do - { - var res = await http.GetStringAsync(data.Links.next) - .ConfigureAwait(false); - data = JsonConvert.DeserializeObject(res); - var pledgers = data.Data.Where(x => x["type"].ToString() == "pledge"); - rewards.AddRange(pledgers.Select(x => JsonConvert.DeserializeObject(x.ToString())) - .Where(x => x.attributes.declined_since == null)); - users.AddRange(data.Included - .Where(x => x["type"].ToString() == "user") - .Select(x => JsonConvert.DeserializeObject(x.ToString()))); - } while (!string.IsNullOrWhiteSpace(data.Links.next)); - } - Pledges = rewards.Join(users, (r) => r.relationships?.patron?.data?.id, (u) => u.id, (x, y) => new PatreonUserAndReward() + next = $"https://api.patreon.com/oauth2/api/campaigns/{_creds.PatreonCampaignId}/pledges" + } + }; + do { - User = y, - Reward = x, - }).ToImmutableArray(); - File.WriteAllText("./patreon_rewards.json", JsonConvert.SerializeObject(Pledges)); + var res = await http.GetStringAsync(data.Links.next) + .ConfigureAwait(false); + data = JsonConvert.DeserializeObject(res); + var pledgers = data.Data.Where(x => x["type"].ToString() == "pledge"); + rewards.AddRange(pledgers.Select(x => JsonConvert.DeserializeObject(x.ToString())) + .Where(x => x.attributes.declined_since == null)); + users.AddRange(data.Included + .Where(x => x["type"].ToString() == "user") + .Select(x => JsonConvert.DeserializeObject(x.ToString()))); + } while (!string.IsNullOrWhiteSpace(data.Links.next)); } - catch (Exception ex) + var db = _cache.Redis.GetDatabase(); + var toSet = JsonConvert.SerializeObject(rewards.Join(users, (r) => r.relationships?.patron?.data?.id, (u) => u.id, (x, y) => new PatreonUserAndReward() { - _log.Warn(ex); - } - finally - { - getPledgesLocker.Release(); - } + User = y, + Reward = x, + }).ToArray()); + + db.StringSet(_key, toSet); } - else + catch (Exception ex) { - if(File.Exists(cacheFileName)) - Pledges = JsonConvert.DeserializeObject(File.ReadAllText("./patreon_rewards.json")) - .ToImmutableArray(); + _log.Warn(ex); } + finally + { + getPledgesLocker.Release(); + } + } public async Task ClaimReward(ulong userId) @@ -110,7 +124,7 @@ namespace NadekoBot.Modules.Utility.Services var now = DateTime.UtcNow; try { - var data = Pledges.FirstOrDefault(x => x.User.attributes?.social_connections?.discord?.user_id == userId.ToString()); + var data = Pledges?.FirstOrDefault(x => x.User.attributes?.social_connections?.discord?.user_id == userId.ToString()); if (data == null) return 0; @@ -171,5 +185,11 @@ namespace NadekoBot.Modules.Utility.Services claimLockJustInCase.Release(); } } + + public Task Unload() + { + Updater?.Change(Timeout.Infinite, Timeout.Infinite); + return Task.CompletedTask; + } } } diff --git a/src/NadekoBot/Modules/Utility/Services/RemindService.cs b/NadekoBot.Core/Modules/Utility/Services/RemindService.cs similarity index 86% rename from src/NadekoBot/Modules/Utility/Services/RemindService.cs rename to NadekoBot.Core/Modules/Utility/Services/RemindService.cs index 0e3b2206..5a6fc2ce 100644 --- a/src/NadekoBot/Modules/Utility/Services/RemindService.cs +++ b/NadekoBot.Core/Modules/Utility/Services/RemindService.cs @@ -7,11 +7,11 @@ using Discord; using Discord.WebSocket; using NadekoBot.Common.Replacements; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NLog; +using System.Collections.Generic; namespace NadekoBot.Modules.Utility.Services { @@ -29,8 +29,10 @@ namespace NadekoBot.Modules.Utility.Services private readonly DiscordSocketClient _client; private readonly DbService _db; - public RemindService(DiscordSocketClient client, IBotConfigProvider config, DbService db, - StartingGuildsService guilds, IUnitOfWork uow) + public RemindService(DiscordSocketClient client, + IBotConfigProvider config, + DbService db, + StartingGuildsService guilds) { _config = config; _client = client; @@ -39,8 +41,12 @@ namespace NadekoBot.Modules.Utility.Services cancelSource = new CancellationTokenSource(); cancelAllToken = cancelSource.Token; - - var reminders = uow.Reminders.GetIncludedReminders(guilds).ToList(); + + List reminders; + using (var uow = _db.UnitOfWork) + { + reminders = uow.Reminders.GetIncludedReminders(guilds).ToList(); + } RemindMessageFormat = _config.BotConfig.RemindMessageFormat; foreach (var r in reminders) diff --git a/src/NadekoBot/Modules/Utility/Services/StreamRoleService.cs b/NadekoBot.Core/Modules/Utility/Services/StreamRoleService.cs similarity index 93% rename from src/NadekoBot/Modules/Utility/Services/StreamRoleService.cs rename to NadekoBot.Core/Modules/Utility/Services/StreamRoleService.cs index 98f34eaf..52a3266a 100644 --- a/src/NadekoBot/Modules/Utility/Services/StreamRoleService.cs +++ b/NadekoBot.Core/Modules/Utility/Services/StreamRoleService.cs @@ -6,8 +6,8 @@ using System.Threading.Tasks; using Discord; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using NLog; using NadekoBot.Modules.Utility.Extensions; using NadekoBot.Common.TypeReaders; @@ -17,22 +17,25 @@ using Discord.Net; namespace NadekoBot.Modules.Utility.Services { - public class StreamRoleService : INService + public class StreamRoleService : INService, IUnloadableService { private readonly DbService _db; + private readonly DiscordSocketClient _client; private readonly ConcurrentDictionary guildSettings; private readonly Logger _log; - public StreamRoleService(DiscordSocketClient client, DbService db, IEnumerable gcs) + public StreamRoleService(DiscordSocketClient client, DbService db, NadekoBot bot) { - this._db = db; this._log = LogManager.GetCurrentClassLogger(); + this._db = db; + this._client = client; - guildSettings = gcs.ToDictionary(x => x.GuildId, x => x.StreamRole) + guildSettings = bot.AllGuildConfigs + .ToDictionary(x => x.GuildId, x => x.StreamRole) .Where(x => x.Value != null && x.Value.Enabled) .ToConcurrent(); - client.GuildMemberUpdated += Client_GuildMemberUpdated; + _client.GuildMemberUpdated += Client_GuildMemberUpdated; var _ = Task.Run(async () => { @@ -47,6 +50,12 @@ namespace NadekoBot.Modules.Utility.Services }); } + public Task Unload() + { + _client.GuildMemberUpdated -= Client_GuildMemberUpdated; + return Task.CompletedTask; + } + private Task Client_GuildMemberUpdated(SocketGuildUser before, SocketGuildUser after) { var _ = Task.Run(async () => @@ -255,7 +264,7 @@ namespace NadekoBot.Modules.Utility.Services throw new StreamRoleNotFoundException(); await user.RemoveRoleAsync(addRole).ConfigureAwait(false); - _log.Info("Removed stream role from a user {0} in {1} server", user.ToString(), user.Guild.ToString()); + _log.Info("Removed stream role from the user {0} in {1} server", user.ToString(), user.Guild.ToString()); } catch (HttpException ex) when (ex.HttpCode == System.Net.HttpStatusCode.Forbidden) { @@ -264,7 +273,6 @@ namespace NadekoBot.Modules.Utility.Services _log.Error(ex); throw new StreamRolePermissionException(); } - _log.Info("Removed stream role from the user {0} in {1} server", user.ToString(), user.Guild.ToString()); } } } diff --git a/src/NadekoBot/Modules/Utility/Services/VerboseErrorsService.cs b/NadekoBot.Core/Modules/Utility/Services/VerboseErrorsService.cs similarity index 75% rename from src/NadekoBot/Modules/Utility/Services/VerboseErrorsService.cs rename to NadekoBot.Core/Modules/Utility/Services/VerboseErrorsService.cs index 9f438128..58cb8db6 100644 --- a/src/NadekoBot/Modules/Utility/Services/VerboseErrorsService.cs +++ b/NadekoBot.Core/Modules/Utility/Services/VerboseErrorsService.cs @@ -1,32 +1,39 @@ -using System.Collections.Generic; -using System.Linq; +using System.Linq; using System.Threading.Tasks; using Discord; using Discord.Commands; using NadekoBot.Common.Collections; using NadekoBot.Extensions; using NadekoBot.Modules.Help.Services; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; namespace NadekoBot.Modules.Utility.Services { - public class VerboseErrorsService : INService + public class VerboseErrorsService : INService, IUnloadableService { private readonly ConcurrentHashSet guildsEnabled; private readonly DbService _db; private readonly CommandHandler _ch; private readonly HelpService _hs; - public VerboseErrorsService(IEnumerable gcs, DbService db, CommandHandler ch, HelpService hs) + public VerboseErrorsService(NadekoBot bot, DbService db, CommandHandler ch, HelpService hs) { _db = db; _ch = ch; _hs = hs; - ch.CommandErrored += LogVerboseError; + _ch.CommandErrored += LogVerboseError; - guildsEnabled = new ConcurrentHashSet(gcs.Where(x => x.VerboseErrors).Select(x => x.GuildId)); + guildsEnabled = new ConcurrentHashSet(bot + .AllGuildConfigs + .Where(x => x.VerboseErrors) + .Select(x => x.GuildId)); + } + + public Task Unload() + { + _ch.CommandErrored -= LogVerboseError; + return Task.CompletedTask; } private async Task LogVerboseError(CommandInfo cmd, ITextChannel channel, string reason) @@ -73,6 +80,5 @@ namespace NadekoBot.Modules.Utility.Services return enabled; } - } } diff --git a/src/NadekoBot/Modules/Utility/StreamRoleCommands.cs b/NadekoBot.Core/Modules/Utility/StreamRoleCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/StreamRoleCommands.cs rename to NadekoBot.Core/Modules/Utility/StreamRoleCommands.cs diff --git a/src/NadekoBot/Modules/Utility/UnitConversionCommands.cs b/NadekoBot.Core/Modules/Utility/UnitConversionCommands.cs similarity index 92% rename from src/NadekoBot/Modules/Utility/UnitConversionCommands.cs rename to NadekoBot.Core/Modules/Utility/UnitConversionCommands.cs index 4f9ca0e6..5dc3948a 100644 --- a/src/NadekoBot/Modules/Utility/UnitConversionCommands.cs +++ b/NadekoBot.Core/Modules/Utility/UnitConversionCommands.cs @@ -26,11 +26,12 @@ namespace NadekoBot.Modules.Utility .OrderBy(x => x))))); await Context.Channel.EmbedAsync(res); } + [NadekoCommand, Usage, Description, Aliases] public async Task Convert(string origin, string target, decimal value) { - var originUnit = _service.Units.Find(x => x.Triggers.Select(y => y.ToLowerInvariant()).Contains(origin.ToLowerInvariant())); - var targetUnit = _service.Units.Find(x => x.Triggers.Select(y => y.ToLowerInvariant()).Contains(target.ToLowerInvariant())); + var originUnit = _service.Units.FirstOrDefault(x => x.Triggers.Select(y => y.ToLowerInvariant()).Contains(origin.ToLowerInvariant())); + var targetUnit = _service.Units.FirstOrDefault(x => x.Triggers.Select(y => y.ToLowerInvariant()).Contains(target.ToLowerInvariant())); if (originUnit == null || targetUnit == null) { await ReplyErrorLocalized("convert_not_found", Format.Bold(origin), Format.Bold(target)).ConfigureAwait(false); diff --git a/src/NadekoBot/Modules/Utility/Utility.cs b/NadekoBot.Core/Modules/Utility/Utility.cs similarity index 87% rename from src/NadekoBot/Modules/Utility/Utility.cs rename to NadekoBot.Core/Modules/Utility/Utility.cs index 82c8551e..c5cdcc0f 100644 --- a/src/NadekoBot/Modules/Utility/Utility.cs +++ b/NadekoBot.Core/Modules/Utility/Utility.cs @@ -5,11 +5,8 @@ using System.Linq; using System.Threading.Tasks; using System.Text; using NadekoBot.Extensions; -using System.Reflection; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services.Impl; using System.Net.Http; -using System.Collections.Concurrent; -using System.Threading; using ImageSharp; using System.Collections.Generic; using Newtonsoft.Json; @@ -17,8 +14,7 @@ using Discord.WebSocket; using System.Diagnostics; using NadekoBot.Common; using NadekoBot.Common.Attributes; -using Color = Discord.Color; -using NadekoBot.Services; +using NadekoBot.Core.Services; namespace NadekoBot.Modules.Utility { @@ -27,14 +23,18 @@ namespace NadekoBot.Modules.Utility private readonly DiscordSocketClient _client; private readonly IStatsService _stats; private readonly IBotCredentials _creds; - private readonly ShardsCoordinator _shardCoord; + private readonly NadekoBot _bot; + private readonly DbService _db; - public Utility(NadekoBot nadeko, DiscordSocketClient client, IStatsService stats, IBotCredentials creds) + public Utility(NadekoBot nadeko, DiscordSocketClient client, + IStatsService stats, IBotCredentials creds, + DbService db) { _client = client; _stats = stats; _creds = creds; - _shardCoord = nadeko.ShardCoord; + _bot = nadeko; + _db = db; } [NadekoCommand, Usage, Description, Aliases] @@ -214,47 +214,6 @@ namespace NadekoBot.Modules.Utility await Context.Channel.SendConfirmAsync($"{Context.User.Mention} https://discord.gg/{invite.Code}"); } - [NadekoCommand, Usage, Description, Aliases] - [Shard0Precondition] - public async Task ShardStats(int page = 1) - { - if (--page < 0) - return; - var statuses = _shardCoord.Statuses.ToArray() - .Where(x => x != null); - - var status = string.Join(", ", statuses - .GroupBy(x => x.ConnectionState) - .Select(x => $"{x.Count()} {x.Key}") - .ToArray()); - - var allShardStrings = statuses - .Select(x => - { - var timeDiff = DateTime.UtcNow - x.Time; - if (timeDiff > TimeSpan.FromSeconds(20)) - return $"Shard #{Format.Bold(x.ShardId.ToString())} **UNRESPONSIVE** for {timeDiff.ToString(@"hh\:mm\:ss")}"; - return GetText("shard_stats_txt", x.ShardId.ToString(), - Format.Bold(x.ConnectionState.ToString()), Format.Bold(x.Guilds.ToString()), timeDiff.ToString(@"hh\:mm\:ss")); - }) - .ToArray(); - - await Context.Channel.SendPaginatedConfirmAsync(_client, page, (curPage) => - { - - var str = string.Join("\n", allShardStrings.Skip(25 * curPage).Take(25)); - - if (string.IsNullOrWhiteSpace(str)) - str = GetText("no_shards_on_page"); - - return new EmbedBuilder() - .WithAuthor(a => a.WithName(GetText("shard_stats"))) - .WithTitle(status) - .WithOkColor() - .WithDescription(str); - }, allShardStrings.Length / 25); - } - [NadekoCommand, Usage, Description, Aliases] public async Task Stats() { @@ -273,7 +232,7 @@ namespace NadekoBot.Modules.Utility .AddField(efb => efb.WithName(GetText("uptime")).WithValue(_stats.GetUptimeString("\n")).WithIsInline(true)) .AddField(efb => efb.WithName(GetText("presence")).WithValue( GetText("presence_txt", - _stats.GuildCount, _stats.TextChannels, _stats.VoiceChannels)).WithIsInline(true))); + _bot.GuildCount, _stats.TextChannels, _stats.VoiceChannels)).WithIsInline(true))); } [NadekoCommand, Usage, Description, Aliases] diff --git a/src/NadekoBot/Modules/Utility/VerboseErrorCommands.cs b/NadekoBot.Core/Modules/Utility/VerboseErrorCommands.cs similarity index 100% rename from src/NadekoBot/Modules/Utility/VerboseErrorCommands.cs rename to NadekoBot.Core/Modules/Utility/VerboseErrorCommands.cs diff --git a/src/NadekoBot/Modules/Xp/Club.cs b/NadekoBot.Core/Modules/Xp/Club.cs similarity index 98% rename from src/NadekoBot/Modules/Xp/Club.cs rename to NadekoBot.Core/Modules/Xp/Club.cs index 20a6e97a..a6351cbf 100644 --- a/src/NadekoBot/Modules/Xp/Club.cs +++ b/NadekoBot.Core/Modules/Xp/Club.cs @@ -5,7 +5,7 @@ using NadekoBot.Common.Attributes; using NadekoBot.Extensions; using NadekoBot.Modules.Xp.Common; using NadekoBot.Modules.Xp.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Linq; using System.Threading.Tasks; @@ -99,8 +99,7 @@ namespace NadekoBot.Modules.Xp return; } - ClubInfo club; - if (!_service.GetClubByName(clubName, out club)) + if (!_service.GetClubByName(clubName, out ClubInfo club)) { await ReplyErrorLocalized("club_not_exists").ConfigureAwait(false); return; @@ -140,7 +139,7 @@ namespace NadekoBot.Modules.Xp return embed.WithThumbnailUrl(club.ImageUrl); return embed; - }, club.Users.Count / 10); + }, club.Users.Count, 10); } [NadekoCommand, Usage, Description, Aliases] @@ -171,7 +170,7 @@ namespace NadekoBot.Modules.Xp .WithDescription(toShow) .WithOkColor(); - }, bans.Length / 10); + }, bans.Length, 10); } @@ -203,7 +202,7 @@ namespace NadekoBot.Modules.Xp .WithDescription(toShow) .WithOkColor(); - }, apps.Length / 10); + }, apps.Length, 10); } [NadekoCommand, Usage, Description, Aliases] diff --git a/src/NadekoBot/Modules/Xp/Common/FullUserStats.cs b/NadekoBot.Core/Modules/Xp/Common/FullUserStats.cs similarity index 93% rename from src/NadekoBot/Modules/Xp/Common/FullUserStats.cs rename to NadekoBot.Core/Modules/Xp/Common/FullUserStats.cs index 11f38648..62e68a39 100644 --- a/src/NadekoBot/Modules/Xp/Common/FullUserStats.cs +++ b/NadekoBot.Core/Modules/Xp/Common/FullUserStats.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; namespace NadekoBot.Modules.Xp.Common { diff --git a/src/NadekoBot/Modules/Xp/Common/LevelStats.cs b/NadekoBot.Core/Modules/Xp/Common/LevelStats.cs similarity index 100% rename from src/NadekoBot/Modules/Xp/Common/LevelStats.cs rename to NadekoBot.Core/Modules/Xp/Common/LevelStats.cs diff --git a/src/NadekoBot/Modules/Xp/Extensions/Extensions.cs b/NadekoBot.Core/Modules/Xp/Extensions/Extensions.cs similarity index 94% rename from src/NadekoBot/Modules/Xp/Extensions/Extensions.cs rename to NadekoBot.Core/Modules/Xp/Extensions/Extensions.cs index c5d6605b..207f3e51 100644 --- a/src/NadekoBot/Modules/Xp/Extensions/Extensions.cs +++ b/NadekoBot.Core/Modules/Xp/Extensions/Extensions.cs @@ -1,5 +1,5 @@ using NadekoBot.Modules.Xp.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; diff --git a/src/NadekoBot/Modules/Xp/Services/ClubService.cs b/NadekoBot.Core/Modules/Xp/Services/ClubService.cs similarity index 98% rename from src/NadekoBot/Modules/Xp/Services/ClubService.cs rename to NadekoBot.Core/Modules/Xp/Services/ClubService.cs index 4c61d7ab..75181cd9 100644 --- a/src/NadekoBot/Modules/Xp/Services/ClubService.cs +++ b/NadekoBot.Core/Modules/Xp/Services/ClubService.cs @@ -1,11 +1,9 @@ -using NadekoBot.Services; +using NadekoBot.Core.Services; using System; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Discord; using NadekoBot.Modules.Xp.Common; using System.Linq; -using Microsoft.EntityFrameworkCore; -using System.Collections.Generic; namespace NadekoBot.Modules.Xp.Services { diff --git a/src/NadekoBot/Modules/Xp/Services/UserCacheItem.cs b/NadekoBot.Core/Modules/Xp/Services/UserCacheItem.cs similarity index 100% rename from src/NadekoBot/Modules/Xp/Services/UserCacheItem.cs rename to NadekoBot.Core/Modules/Xp/Services/UserCacheItem.cs diff --git a/src/NadekoBot/Modules/Xp/Services/XpService.cs b/NadekoBot.Core/Modules/Xp/Services/XpService.cs similarity index 82% rename from src/NadekoBot/Modules/Xp/Services/XpService.cs rename to NadekoBot.Core/Modules/Xp/Services/XpService.cs index 09fa7ec9..ef3bdbcc 100644 --- a/src/NadekoBot/Modules/Xp/Services/XpService.cs +++ b/NadekoBot.Core/Modules/Xp/Services/XpService.cs @@ -3,9 +3,9 @@ using Discord.WebSocket; using NadekoBot.Common.Collections; using NadekoBot.Extensions; using NadekoBot.Modules.Xp.Common; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Impl; using NLog; using System; using System.Collections.Concurrent; @@ -26,7 +26,7 @@ using ImageSharp.Drawing.Brushes; namespace NadekoBot.Modules.Xp.Services { - public class XpService : INService + public class XpService : INService, IUnloadableService { private enum NotifOf { Server, Global } // is it a server level-up or global level-up notification @@ -37,7 +37,7 @@ namespace NadekoBot.Modules.Xp.Services private readonly Logger _log; private readonly NadekoStrings _strings; private readonly IDataCache _cache; - private readonly FontCollection _fonts = new FontCollection(); + private readonly FontProvider _fonts; public const int XP_REQUIRED_LVL_1 = 36; private readonly ConcurrentDictionary> _excludedRoles @@ -55,19 +55,15 @@ namespace NadekoBot.Modules.Xp.Services private readonly ConcurrentQueue _addMessageXp = new ConcurrentQueue(); - private readonly Timer updateXpTimer; + private readonly Timer _updateXpTimer; + private readonly CancellationTokenSource _clearRewardTimerTokenSource; + private readonly Task _clearRewardTimer; private readonly HttpClient http = new HttpClient(); - private FontFamily _usernameFontFamily; - private FontFamily _clubFontFamily; - private Font _levelFont; - private Font _xpFont; - private Font _awardedFont; - private Font _rankFont; - private Font _timeFont; public XpService(CommandHandler cmd, IBotConfigProvider bc, - IEnumerable allGuildConfigs, IImagesService images, - DbService db, NadekoStrings strings, IDataCache cache) + NadekoBot bot, IImagesService images, + DbService db, NadekoStrings strings, IDataCache cache, + FontProvider fonts) { _db = db; _cmd = cmd; @@ -76,9 +72,10 @@ namespace NadekoBot.Modules.Xp.Services _log = LogManager.GetCurrentClassLogger(); _strings = strings; _cache = cache; + _fonts = fonts; //load settings - allGuildConfigs = allGuildConfigs.Where(x => x.XpSettings != null); + var allGuildConfigs = bot.AllGuildConfigs.Where(x => x.XpSettings != null); _excludedChannels = allGuildConfigs .ToDictionary( x => x.GuildId, @@ -103,19 +100,9 @@ namespace NadekoBot.Modules.Xp.Services allGuildConfigs.Where(x => x.XpSettings.ServerExcluded) .Select(x => x.GuildId)); - //todo 60 move to font provider or somethign - _fonts = new FontCollection(); - if (Directory.Exists("data/fonts")) - foreach (var file in Directory.GetFiles("data/fonts")) - { - _fonts.Install(file); - } - - InitializeFonts(); - _cmd.OnMessageNoTrigger += _cmd_OnMessageNoTrigger; - updateXpTimer = new Timer(async _ => + _updateXpTimer = new Timer(async _ => { try { @@ -241,19 +228,20 @@ namespace NadekoBot.Modules.Xp.Services _log.Warn(ex); } }, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5)); - - + + _clearRewardTimerTokenSource = new CancellationTokenSource(); + var token = _clearRewardTimerTokenSource.Token; //just a first line, in order to prevent queries. But since other shards can try to do this too, //i'll check in the db too. - var clearRewardTimer = Task.Run(async () => + _clearRewardTimer = Task.Run(async () => { - while (true) + while (!token.IsCancellationRequested) { _rewardedUsers.Clear(); await Task.Delay(TimeSpan.FromMinutes(_bc.BotConfig.XpMinutesTimeout)); } - }); + }, token); } public IEnumerable GetRoleRewards(ulong id) @@ -544,16 +532,6 @@ namespace NadekoBot.Modules.Xp.Services return GenerateImageAsync(GetUserStats(user)); } - private void InitializeFonts() - { - _usernameFontFamily = _fonts.Find("Whitney-Bold"); - _clubFontFamily = _fonts.Find("Whitney-Bold"); - _levelFont = _fonts.Find("Whitney-Bold").CreateFont(45); - _xpFont = _fonts.Find("Whitney-Bold").CreateFont(50); - _awardedFont = _fonts.Find("Whitney-Bold").CreateFont(25); - _rankFont = _fonts.Find("Uni Sans Thin CAPS").CreateFont(30); - _timeFont = _fonts.Find("Whitney-Bold").CreateFont(20); - } public Task GenerateImageAsync(FullUserStats stats) => Task.Run(async () => { @@ -561,7 +539,7 @@ namespace NadekoBot.Modules.Xp.Services { var username = stats.User.ToString(); - var usernameFont = _usernameFontFamily + var usernameFont = _fonts.UsernameFontFamily .CreateFont(username.Length <= 6 ? 50 : 50 - username.Length); @@ -571,17 +549,17 @@ namespace NadekoBot.Modules.Xp.Services // level - img.DrawText(stats.Global.Level.ToString(), _levelFont, Rgba32.White, + img.DrawText(stats.Global.Level.ToString(), _fonts.LevelFont, Rgba32.White, new PointF(47, 137)); - img.DrawText(stats.Guild.Level.ToString(), _levelFont, Rgba32.White, + img.DrawText(stats.Guild.Level.ToString(), _fonts.LevelFont, Rgba32.White, new PointF(47, 285)); //club name var clubName = stats.User.Club?.ToString() ?? "-"; - var clubFont = _clubFontFamily + var clubFont = _fonts.ClubFontFamily .CreateFont(clubName.Length <= 8 ? 35 : 35 - (clubName.Length / 2)); @@ -604,7 +582,7 @@ namespace NadekoBot.Modules.Xp.Services new PointF(286 + (450 * (global.LevelXp / (float)global.RequiredXp)), 235), new PointF(286, 235), }); - img.DrawText($"{global.LevelXp}/{global.RequiredXp}", _xpFont, brush, pen, + img.DrawText($"{global.LevelXp}/{global.RequiredXp}", _fonts.XpFont, brush, pen, new PointF(430, 130)); img.FillPolygon(xpBgBrush, new[] { @@ -613,7 +591,7 @@ namespace NadekoBot.Modules.Xp.Services new PointF(247 + (450 * (guild.LevelXp / (float)guild.RequiredXp)), 379), new PointF(247, 379), }); - img.DrawText($"{guild.LevelXp}/{guild.RequiredXp}", _xpFont, brush, pen, + img.DrawText($"{guild.LevelXp}/{guild.RequiredXp}", _fonts.XpFont, brush, pen, new PointF(400, 270)); if (stats.FullGuildStats.AwardedXp != 0) @@ -621,16 +599,16 @@ namespace NadekoBot.Modules.Xp.Services var sign = stats.FullGuildStats.AwardedXp > 0 ? "+ " : ""; - img.DrawText($"({sign}{stats.FullGuildStats.AwardedXp})", _awardedFont, brush, pen, + img.DrawText($"({sign}{stats.FullGuildStats.AwardedXp})", _fonts.AwardedFont, brush, pen, new PointF(445 - (Math.Max(0, (stats.FullGuildStats.AwardedXp.ToString().Length - 2)) * 5), 335)); } //ranking - img.DrawText(stats.GlobalRanking.ToString(), _rankFont, Rgba32.White, + img.DrawText(stats.GlobalRanking.ToString(), _fonts.RankFont, Rgba32.White, new PointF(148, 170)); - img.DrawText(stats.GuildRanking.ToString(), _rankFont, Rgba32.White, + img.DrawText(stats.GuildRanking.ToString(), _fonts.RankFont, Rgba32.White, new PointF(148, 317)); //time on this level @@ -641,10 +619,10 @@ namespace NadekoBot.Modules.Xp.Services return $"{offset.Days}d{offset.Hours}h{offset.Minutes}m"; } - img.DrawText(GetTimeSpent(stats.User.LastLevelUp), _timeFont, Rgba32.White, + img.DrawText(GetTimeSpent(stats.User.LastLevelUp), _fonts.TimeFont, Rgba32.White, new PointF(50, 197)); - img.DrawText(GetTimeSpent(stats.FullGuildStats.LastLevelUp), _timeFont, Rgba32.White, + img.DrawText(GetTimeSpent(stats.FullGuildStats.LastLevelUp), _fonts.TimeFont, Rgba32.White, new PointF(50, 344)); //avatar @@ -661,7 +639,7 @@ namespace NadekoBot.Modules.Xp.Services using (var temp = await http.GetStreamAsync(avatarUrl)) using (var tempDraw = Image.Load(temp).Resize(69, 70)) { - ApplyRoundedCorners(tempDraw, 35); + tempDraw.ApplyRoundedCorners(35); data = tempDraw.ToStream().ToArray(); } @@ -682,74 +660,62 @@ namespace NadekoBot.Modules.Xp.Services } //club image - - if (!string.IsNullOrWhiteSpace(stats.User.Club?.ImageUrl)) - { - var imgUrl = stats.User.Club.ImageUrl; - try - { - var (succ, data) = await _cache.TryGetImageDataAsync(imgUrl); - if (!succ) - { - using (var temp = await http.GetStreamAsync(imgUrl)) - using (var tempDraw = Image.Load(temp).Resize(45, 45)) - { - ApplyRoundedCorners(tempDraw, 22.5f); - data = tempDraw.ToStream().ToArray(); - } - - await _cache.SetImageDataAsync(imgUrl, data); - } - var toDraw = Image.Load(data); - - img.DrawImage(toDraw, - 1, - new Size(45, 45), - new Point(722, 25)); - } - catch (Exception ex) - { - _log.Warn(ex); - } - } + await DrawClubImage(img, stats).ConfigureAwait(false); return img.Resize(432, 211).ToStream(); } }); - // https://github.com/SixLabors/ImageSharp/tree/master/samples/AvatarWithRoundedCorner - public static void ApplyRoundedCorners(Image img, float cornerRadius) + private async Task DrawClubImage(Image img, FullUserStats stats) { - var corners = BuildCorners(img.Width, img.Height, cornerRadius); - // now we have our corners time to draw them - img.Fill(Rgba32.Transparent, corners, new GraphicsOptions(true) + if (!string.IsNullOrWhiteSpace(stats.User.Club?.ImageUrl)) { - BlenderMode = ImageSharp.PixelFormats.PixelBlenderMode.Src // enforces that any part of this shape that has color is punched out of the background - }); + var imgUrl = stats.User.Club.ImageUrl; + try + { + var (succ, data) = await _cache.TryGetImageDataAsync(imgUrl); + if (!succ) + { + using (var temp = await http.GetAsync(imgUrl, HttpCompletionOption.ResponseHeadersRead)) + { + if (temp.Content.Headers.ContentType.MediaType != "image/png" + && temp.Content.Headers.ContentType.MediaType != "image/jpeg" + && temp.Content.Headers.ContentType.MediaType != "image/gif") + return; + using (var tempDraw = Image.Load(await temp.Content.ReadAsStreamAsync()).Resize(45, 45)) + { + tempDraw.ApplyRoundedCorners(22.5f); + data = tempDraw.ToStream().ToArray(); + } + } + + await _cache.SetImageDataAsync(imgUrl, data); + } + var toDraw = Image.Load(data); + + img.DrawImage(toDraw, + 1, + new Size(45, 45), + new Point(722, 25)); + } + catch (Exception ex) + { + _log.Warn(ex); + } + } } - public static IPathCollection BuildCorners(int imageWidth, int imageHeight, float cornerRadius) + public Task Unload() { - // first create a square - var rect = new RectangularePolygon(-0.5f, -0.5f, cornerRadius, cornerRadius); + _cmd.OnMessageNoTrigger -= _cmd_OnMessageNoTrigger; - // then cut out of the square a circle so we are left with a corner - var cornerToptLeft = rect.Clip(new EllipsePolygon(cornerRadius - 0.5f, cornerRadius - 0.5f, cornerRadius)); + if (!_clearRewardTimerTokenSource.IsCancellationRequested) + _clearRewardTimerTokenSource.Cancel(); - // corner is now a corner shape positions top left - //lets make 3 more positioned correctly, we can do that by translating the orgional around the center of the image - var center = new Vector2(imageWidth / 2, imageHeight / 2); - - float rightPos = imageWidth - cornerToptLeft.Bounds.Width + 1; - float bottomPos = imageHeight - cornerToptLeft.Bounds.Height + 1; - - // move it across the width of the image - the width of the shape - var cornerTopRight = cornerToptLeft.RotateDegree(90).Translate(rightPos, 0); - var cornerBottomLeft = cornerToptLeft.RotateDegree(-90).Translate(0, bottomPos); - var cornerBottomRight = cornerToptLeft.RotateDegree(180).Translate(rightPos, bottomPos); - - return new PathCollection(cornerToptLeft, cornerBottomLeft, cornerTopRight, cornerBottomRight); + _updateXpTimer.Change(Timeout.Infinite, Timeout.Infinite); + _clearRewardTimerTokenSource.Dispose(); + return Task.CompletedTask; } } } diff --git a/src/NadekoBot/Modules/Xp/Xp.cs b/NadekoBot.Core/Modules/Xp/Xp.cs similarity index 98% rename from src/NadekoBot/Modules/Xp/Xp.cs rename to NadekoBot.Core/Modules/Xp/Xp.cs index a3356372..aa4224f5 100644 --- a/src/NadekoBot/Modules/Xp/Xp.cs +++ b/NadekoBot.Core/Modules/Xp/Xp.cs @@ -1,13 +1,12 @@ using Discord; using Discord.Commands; using Discord.WebSocket; -using NadekoBot.Common; using NadekoBot.Common.Attributes; using NadekoBot.Extensions; using NadekoBot.Modules.Xp.Common; using NadekoBot.Modules.Xp.Services; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Database.Models; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; @@ -237,7 +236,7 @@ namespace NadekoBot.Modules.Xp } return embed; } - }, addPaginatedFooter: false); + }, 1000, 10, addPaginatedFooter: false); } [NadekoCommand, Usage, Description, Aliases] diff --git a/NadekoBot.Core/NadekoBot.Core.csproj b/NadekoBot.Core/NadekoBot.Core.csproj new file mode 100644 index 00000000..fcf7538f --- /dev/null +++ b/NadekoBot.Core/NadekoBot.Core.csproj @@ -0,0 +1,51 @@ + + + + netcoreapp2.0 + latest + + + + true + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/NadekoBot/Services/CommandHandler.cs b/NadekoBot.Core/Services/CommandHandler.cs similarity index 98% rename from src/NadekoBot/Services/CommandHandler.cs rename to NadekoBot.Core/Services/CommandHandler.cs index c06d14ab..f7cd4e61 100644 --- a/src/NadekoBot/Services/CommandHandler.cs +++ b/NadekoBot.Core/Services/CommandHandler.cs @@ -10,14 +10,14 @@ using NadekoBot.Extensions; using System.Collections.Concurrent; using System.Threading; using System.Collections.Immutable; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.IO; using Discord.Net; using NadekoBot.Common; using NadekoBot.Common.Collections; using NadekoBot.Common.ModuleBehaviors; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public class GuildUserComparer : IEqualityComparer { @@ -51,7 +51,9 @@ namespace NadekoBot.Services public ConcurrentHashSet UsersOnShortCooldown { get; } = new ConcurrentHashSet(); private readonly Timer _clearUsersOnShortCooldown; - public CommandHandler(DiscordSocketClient client, DbService db, IBotConfigProvider bc, IEnumerable gcs, CommandService commandService, IBotCredentials credentials, NadekoBot bot) + public CommandHandler(DiscordSocketClient client, DbService db, + IBotConfigProvider bc, CommandService commandService, + IBotCredentials credentials, NadekoBot bot) { _client = client; _commandService = commandService; @@ -67,7 +69,7 @@ namespace NadekoBot.Services }, null, GlobalCommandsCooldown, GlobalCommandsCooldown); DefaultPrefix = bc.BotConfig.DefaultPrefix; - _prefixes = gcs + _prefixes = bot.AllGuildConfigs .Where(x => x.Prefix != null) .ToDictionary(x => x.GuildId, x => x.Prefix) .ToConcurrent(); diff --git a/src/NadekoBot/Services/CurrencyService.cs b/NadekoBot.Core/Services/CurrencyService.cs similarity index 96% rename from src/NadekoBot/Services/CurrencyService.cs rename to NadekoBot.Core/Services/CurrencyService.cs index 5b8fb44f..f94359fc 100644 --- a/src/NadekoBot/Services/CurrencyService.cs +++ b/NadekoBot.Core/Services/CurrencyService.cs @@ -2,11 +2,11 @@ using System.Threading.Tasks; using Discord; using NadekoBot.Extensions; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services.Database; -using NadekoBot.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services.Database; +using NadekoBot.Core.Services; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public class CurrencyService : INService { diff --git a/src/NadekoBot/Services/Database/IUnitOfWork.cs b/NadekoBot.Core/Services/Database/IUnitOfWork.cs similarity index 83% rename from src/NadekoBot/Services/Database/IUnitOfWork.cs rename to NadekoBot.Core/Services/Database/IUnitOfWork.cs index 6b97a085..b981da9a 100644 --- a/src/NadekoBot/Services/Database/IUnitOfWork.cs +++ b/NadekoBot.Core/Services/Database/IUnitOfWork.cs @@ -1,8 +1,8 @@ -using NadekoBot.Services.Database.Repositories; +using NadekoBot.Core.Services.Database.Repositories; using System; using System.Threading.Tasks; -namespace NadekoBot.Services.Database +namespace NadekoBot.Core.Services.Database { public interface IUnitOfWork : IDisposable { @@ -11,11 +11,9 @@ namespace NadekoBot.Services.Database IQuoteRepository Quotes { get; } IGuildConfigRepository GuildConfigs { get; } IDonatorsRepository Donators { get; } - IClashOfClansRepository ClashOfClans { get; } IReminderRepository Reminders { get; } ISelfAssignedRolesRepository SelfAssignedRoles { get; } IBotConfigRepository BotConfig { get; } - IUnitConverterRepository ConverterUnits { get; } ICustomReactionRepository CustomReactions { get; } ICurrencyRepository Currency { get; } ICurrencyTransactionsRepository CurrencyTransactions { get; } diff --git a/src/NadekoBot/Services/Database/Models/AntiProtection.cs b/NadekoBot.Core/Services/Database/Models/AntiProtection.cs similarity index 96% rename from src/NadekoBot/Services/Database/Models/AntiProtection.cs rename to NadekoBot.Core/Services/Database/Models/AntiProtection.cs index fbafc9e3..9d6c5d14 100644 --- a/src/NadekoBot/Services/Database/Models/AntiProtection.cs +++ b/NadekoBot.Core/Services/Database/Models/AntiProtection.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class AntiRaidSetting : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/BotConfig.cs b/NadekoBot.Core/Services/Database/Models/BotConfig.cs similarity index 89% rename from src/NadekoBot/Services/Database/Models/BotConfig.cs rename to NadekoBot.Core/Services/Database/Models/BotConfig.cs index 98b84594..ea9ec872 100644 --- a/src/NadekoBot/Services/Database/Models/BotConfig.cs +++ b/NadekoBot.Core/Services/Database/Models/BotConfig.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class BotConfig : DbEntity { @@ -12,8 +12,6 @@ namespace NadekoBot.Services.Database.Models public float CurrencyGenerationChance { get; set; } = 0.02f; public int CurrencyGenerationCooldown { get; set; } = 10; - public HashSet ModulePrefixes { get; set; } = new HashSet(); - public List RotatingStatusMessages { get; set; } = new List(); public bool RotatingStatuses { get; set; } = false; @@ -70,6 +68,7 @@ Nadeko Support Server: https://discord.gg/nadekobot"; public bool CustomReactionsStartWith { get; set; } = false; public int XpPerMessage { get; set; } = 3; public int XpMinutesTimeout { get; set; } = 5; + public HashSet LoadedPackages { get; set; } = new HashSet(); } public class BlockedCmdOrMdl : DbEntity @@ -155,23 +154,4 @@ Nadeko Support Server: https://discord.gg/nadekobot"; return ((RaceAnimal)obj).Icon == Icon; } } - - public class ModulePrefix : DbEntity - { - public string ModuleName { get; set; } - public string Prefix { get; set; } - - public override int GetHashCode() - { - return ModuleName.GetHashCode(); - } - - public override bool Equals(object obj) - { - if(!(obj is ModulePrefix)) - return base.Equals(obj); - - return ((ModulePrefix)obj).ModuleName == ModuleName; - } - } } diff --git a/src/NadekoBot/Services/Database/Models/ClubInfo.cs b/NadekoBot.Core/Services/Database/Models/ClubInfo.cs similarity index 96% rename from src/NadekoBot/Services/Database/Models/ClubInfo.cs rename to NadekoBot.Core/Services/Database/Models/ClubInfo.cs index 68f68bc3..e2645c23 100644 --- a/src/NadekoBot/Services/Database/Models/ClubInfo.cs +++ b/NadekoBot.Core/Services/Database/Models/ClubInfo.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class ClubInfo : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/CommandCooldown.cs b/NadekoBot.Core/Services/Database/Models/CommandCooldown.cs similarity index 73% rename from src/NadekoBot/Services/Database/Models/CommandCooldown.cs rename to NadekoBot.Core/Services/Database/Models/CommandCooldown.cs index 6adcf2ad..57ec7657 100644 --- a/src/NadekoBot/Services/Database/Models/CommandCooldown.cs +++ b/NadekoBot.Core/Services/Database/Models/CommandCooldown.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class CommandCooldown : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/CommandCost.cs b/NadekoBot.Core/Services/Database/Models/CommandCost.cs similarity index 89% rename from src/NadekoBot/Services/Database/Models/CommandCost.cs rename to NadekoBot.Core/Services/Database/Models/CommandCost.cs index b3a74745..3fc6c6e3 100644 --- a/src/NadekoBot/Services/Database/Models/CommandCost.cs +++ b/NadekoBot.Core/Services/Database/Models/CommandCost.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class CommandCost : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/CommandPrice.cs b/NadekoBot.Core/Services/Database/Models/CommandPrice.cs similarity index 76% rename from src/NadekoBot/Services/Database/Models/CommandPrice.cs rename to NadekoBot.Core/Services/Database/Models/CommandPrice.cs index 62db2067..5f6ffb14 100644 --- a/src/NadekoBot/Services/Database/Models/CommandPrice.cs +++ b/NadekoBot.Core/Services/Database/Models/CommandPrice.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class CommandPrice : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/Currency.cs b/NadekoBot.Core/Services/Database/Models/Currency.cs similarity index 71% rename from src/NadekoBot/Services/Database/Models/Currency.cs rename to NadekoBot.Core/Services/Database/Models/Currency.cs index b86e32e1..c6e62a7f 100644 --- a/src/NadekoBot/Services/Database/Models/Currency.cs +++ b/NadekoBot.Core/Services/Database/Models/Currency.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class Currency : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/CurrencyTransaction.cs b/NadekoBot.Core/Services/Database/Models/CurrencyTransaction.cs similarity index 78% rename from src/NadekoBot/Services/Database/Models/CurrencyTransaction.cs rename to NadekoBot.Core/Services/Database/Models/CurrencyTransaction.cs index 243539a3..e9ef93e5 100644 --- a/src/NadekoBot/Services/Database/Models/CurrencyTransaction.cs +++ b/NadekoBot.Core/Services/Database/Models/CurrencyTransaction.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class CurrencyTransaction : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/CustomReaction.cs b/NadekoBot.Core/Services/Database/Models/CustomReaction.cs similarity index 94% rename from src/NadekoBot/Services/Database/Models/CustomReaction.cs rename to NadekoBot.Core/Services/Database/Models/CustomReaction.cs index cd57bc35..4c1399fe 100644 --- a/src/NadekoBot/Services/Database/Models/CustomReaction.cs +++ b/NadekoBot.Core/Services/Database/Models/CustomReaction.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations.Schema; using System.Text.RegularExpressions; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class CustomReaction : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/DbEntity.cs b/NadekoBot.Core/Services/Database/Models/DbEntity.cs similarity index 81% rename from src/NadekoBot/Services/Database/Models/DbEntity.cs rename to NadekoBot.Core/Services/Database/Models/DbEntity.cs index e727851c..47f68831 100644 --- a/src/NadekoBot/Services/Database/Models/DbEntity.cs +++ b/NadekoBot.Core/Services/Database/Models/DbEntity.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/DiscordUser.cs b/NadekoBot.Core/Services/Database/Models/DiscordUser.cs similarity index 95% rename from src/NadekoBot/Services/Database/Models/DiscordUser.cs rename to NadekoBot.Core/Services/Database/Models/DiscordUser.cs index 654408e2..48d2ef40 100644 --- a/src/NadekoBot/Services/Database/Models/DiscordUser.cs +++ b/NadekoBot.Core/Services/Database/Models/DiscordUser.cs @@ -1,6 +1,6 @@ using System; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class DiscordUser : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/Donator.cs b/NadekoBot.Core/Services/Database/Models/Donator.cs similarity index 77% rename from src/NadekoBot/Services/Database/Models/Donator.cs rename to NadekoBot.Core/Services/Database/Models/Donator.cs index da5cd390..16a100d3 100644 --- a/src/NadekoBot/Services/Database/Models/Donator.cs +++ b/NadekoBot.Core/Services/Database/Models/Donator.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class Donator : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/FeedSub.cs b/NadekoBot.Core/Services/Database/Models/FeedSub.cs similarity index 91% rename from src/NadekoBot/Services/Database/Models/FeedSub.cs rename to NadekoBot.Core/Services/Database/Models/FeedSub.cs index aabf455e..a20d4918 100644 --- a/src/NadekoBot/Services/Database/Models/FeedSub.cs +++ b/NadekoBot.Core/Services/Database/Models/FeedSub.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class FeedSub : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/FollowedStream.cs b/NadekoBot.Core/Services/Database/Models/FollowedStream.cs similarity index 94% rename from src/NadekoBot/Services/Database/Models/FollowedStream.cs rename to NadekoBot.Core/Services/Database/Models/FollowedStream.cs index b49bc430..57273418 100644 --- a/src/NadekoBot/Services/Database/Models/FollowedStream.cs +++ b/NadekoBot.Core/Services/Database/Models/FollowedStream.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class FollowedStream : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/GuildConfig.cs b/NadekoBot.Core/Services/Database/Models/GuildConfig.cs similarity index 92% rename from src/NadekoBot/Services/Database/Models/GuildConfig.cs rename to NadekoBot.Core/Services/Database/Models/GuildConfig.cs index 501b9a64..2c855e20 100644 --- a/src/NadekoBot/Services/Database/Models/GuildConfig.cs +++ b/NadekoBot.Core/Services/Database/Models/GuildConfig.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class GuildConfig : DbEntity { @@ -55,6 +55,9 @@ namespace NadekoBot.Services.Database.Models public bool FilterInvites { get; set; } public HashSet FilterInvitesChannelIds { get; set; } = new HashSet(); + //public bool FilterLinks { get; set; } + //public HashSet FilterLinksChannels { get; set; } = new HashSet(); + public bool FilterWords { get; set; } public HashSet FilteredWords { get; set; } = new HashSet(); public HashSet FilterWordsChannelIds { get; set; } = new HashSet(); @@ -211,6 +214,23 @@ namespace NadekoBot.Services.Database.Models public ulong ChannelId { get; set; } } + public class FilterLinksChannelId : DbEntity + { + public ulong ChannelId { get; set; } + + public override bool Equals(object obj) + { + return obj is FilterLinksChannelId f + ? f.ChannelId == ChannelId + : false; + } + + public override int GetHashCode() + { + return ChannelId.GetHashCode(); + } + } + public class FilteredWord : DbEntity { public string Word { get; set; } diff --git a/src/NadekoBot/Services/Database/Models/IgnoredLogChannel.cs b/NadekoBot.Core/Services/Database/Models/IgnoredLogChannel.cs similarity index 74% rename from src/NadekoBot/Services/Database/Models/IgnoredLogChannel.cs rename to NadekoBot.Core/Services/Database/Models/IgnoredLogChannel.cs index 40198c7f..753b8969 100644 --- a/src/NadekoBot/Services/Database/Models/IgnoredLogChannel.cs +++ b/NadekoBot.Core/Services/Database/Models/IgnoredLogChannel.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class IgnoredLogChannel : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Models/LoadedPackage.cs b/NadekoBot.Core/Services/Database/Models/LoadedPackage.cs new file mode 100644 index 00000000..4de54ebe --- /dev/null +++ b/NadekoBot.Core/Services/Database/Models/LoadedPackage.cs @@ -0,0 +1,19 @@ +namespace NadekoBot.Core.Services.Database.Models +{ + public class LoadedPackage : DbEntity + { + public string Name { get; set; } + + public override bool Equals(object obj) + { + return obj is LoadedPackage p + ? p.Name == Name + : false; + } + + public override int GetHashCode() + { + return Name.GetHashCode(); + } + } +} diff --git a/src/NadekoBot/Services/Database/Models/LogSetting.cs b/NadekoBot.Core/Services/Database/Models/LogSetting.cs similarity index 98% rename from src/NadekoBot/Services/Database/Models/LogSetting.cs rename to NadekoBot.Core/Services/Database/Models/LogSetting.cs index 659df55c..16255964 100644 --- a/src/NadekoBot/Services/Database/Models/LogSetting.cs +++ b/NadekoBot.Core/Services/Database/Models/LogSetting.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class LogSetting : DbEntity diff --git a/src/NadekoBot/Services/Database/Models/MusicPlaylist.cs b/NadekoBot.Core/Services/Database/Models/MusicPlaylist.cs similarity index 85% rename from src/NadekoBot/Services/Database/Models/MusicPlaylist.cs rename to NadekoBot.Core/Services/Database/Models/MusicPlaylist.cs index 9788f033..b514d1f0 100644 --- a/src/NadekoBot/Services/Database/Models/MusicPlaylist.cs +++ b/NadekoBot.Core/Services/Database/Models/MusicPlaylist.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class MusicPlaylist : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/Permission.cs b/NadekoBot.Core/Services/Database/Models/Permission.cs similarity index 98% rename from src/NadekoBot/Services/Database/Models/Permission.cs rename to NadekoBot.Core/Services/Database/Models/Permission.cs index fe692221..ddbd0cc8 100644 --- a/src/NadekoBot/Services/Database/Models/Permission.cs +++ b/NadekoBot.Core/Services/Database/Models/Permission.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations.Schema; using System.Diagnostics; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { [DebuggerDisplay("{global::NadekoBot.Modules.Permissions.PermissionExtensions.GetCommand(this)}", Target = typeof(Permission))] public class Permission : DbEntity diff --git a/src/NadekoBot/Services/Database/Models/PlaylistSong.cs b/NadekoBot.Core/Services/Database/Models/PlaylistSong.cs similarity index 87% rename from src/NadekoBot/Services/Database/Models/PlaylistSong.cs rename to NadekoBot.Core/Services/Database/Models/PlaylistSong.cs index f938d242..eadc3dca 100644 --- a/src/NadekoBot/Services/Database/Models/PlaylistSong.cs +++ b/NadekoBot.Core/Services/Database/Models/PlaylistSong.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class PlaylistSong : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/PokeType.cs b/NadekoBot.Core/Services/Database/Models/PokeType.cs similarity index 72% rename from src/NadekoBot/Services/Database/Models/PokeType.cs rename to NadekoBot.Core/Services/Database/Models/PokeType.cs index d4956c96..c0487406 100644 --- a/src/NadekoBot/Services/Database/Models/PokeType.cs +++ b/NadekoBot.Core/Services/Database/Models/PokeType.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class UserPokeTypes : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/Quote.cs b/NadekoBot.Core/Services/Database/Models/Quote.cs similarity index 88% rename from src/NadekoBot/Services/Database/Models/Quote.cs rename to NadekoBot.Core/Services/Database/Models/Quote.cs index f8a3e308..3f04823f 100644 --- a/src/NadekoBot/Services/Database/Models/Quote.cs +++ b/NadekoBot.Core/Services/Database/Models/Quote.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class Quote : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/Reminder.cs b/NadekoBot.Core/Services/Database/Models/Reminder.cs similarity index 86% rename from src/NadekoBot/Services/Database/Models/Reminder.cs rename to NadekoBot.Core/Services/Database/Models/Reminder.cs index 63600de9..013fdd24 100644 --- a/src/NadekoBot/Services/Database/Models/Reminder.cs +++ b/NadekoBot.Core/Services/Database/Models/Reminder.cs @@ -1,6 +1,6 @@ using System; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class Reminder : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/Repeater.cs b/NadekoBot.Core/Services/Database/Models/Repeater.cs similarity index 87% rename from src/NadekoBot/Services/Database/Models/Repeater.cs rename to NadekoBot.Core/Services/Database/Models/Repeater.cs index c30c1b87..4bea35d4 100644 --- a/src/NadekoBot/Services/Database/Models/Repeater.cs +++ b/NadekoBot.Core/Services/Database/Models/Repeater.cs @@ -1,6 +1,6 @@ using System; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class Repeater : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/RewardedUser.cs b/NadekoBot.Core/Services/Database/Models/RewardedUser.cs similarity index 84% rename from src/NadekoBot/Services/Database/Models/RewardedUser.cs rename to NadekoBot.Core/Services/Database/Models/RewardedUser.cs index f40e083f..f2751b4b 100644 --- a/src/NadekoBot/Services/Database/Models/RewardedUser.cs +++ b/NadekoBot.Core/Services/Database/Models/RewardedUser.cs @@ -1,6 +1,6 @@ using System; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class RewardedUser : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/SelfAssignableRole.cs b/NadekoBot.Core/Services/Database/Models/SelfAssignableRole.cs similarity index 59% rename from src/NadekoBot/Services/Database/Models/SelfAssignableRole.cs rename to NadekoBot.Core/Services/Database/Models/SelfAssignableRole.cs index 93e70223..7c3fafc4 100644 --- a/src/NadekoBot/Services/Database/Models/SelfAssignableRole.cs +++ b/NadekoBot.Core/Services/Database/Models/SelfAssignableRole.cs @@ -1,8 +1,10 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class SelfAssignedRole : DbEntity { public ulong GuildId { get; set; } public ulong RoleId { get; set; } + + public int Group { get; set; } } } diff --git a/src/NadekoBot/Services/Database/Models/ShopEntry.cs b/NadekoBot.Core/Services/Database/Models/ShopEntry.cs similarity index 95% rename from src/NadekoBot/Services/Database/Models/ShopEntry.cs rename to NadekoBot.Core/Services/Database/Models/ShopEntry.cs index aaedbe00..d00dcaa9 100644 --- a/src/NadekoBot/Services/Database/Models/ShopEntry.cs +++ b/NadekoBot.Core/Services/Database/Models/ShopEntry.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public enum ShopEntryType { diff --git a/src/NadekoBot/Services/Database/Models/StreamRoleSettings.cs b/NadekoBot.Core/Services/Database/Models/StreamRoleSettings.cs similarity index 97% rename from src/NadekoBot/Services/Database/Models/StreamRoleSettings.cs rename to NadekoBot.Core/Services/Database/Models/StreamRoleSettings.cs index 8ef5b690..51dd051d 100644 --- a/src/NadekoBot/Services/Database/Models/StreamRoleSettings.cs +++ b/NadekoBot.Core/Services/Database/Models/StreamRoleSettings.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class StreamRoleSettings : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/UserXpStats.cs b/NadekoBot.Core/Services/Database/Models/UserXpStats.cs similarity index 89% rename from src/NadekoBot/Services/Database/Models/UserXpStats.cs rename to NadekoBot.Core/Services/Database/Models/UserXpStats.cs index 8695298e..ea2e78fd 100644 --- a/src/NadekoBot/Services/Database/Models/UserXpStats.cs +++ b/NadekoBot.Core/Services/Database/Models/UserXpStats.cs @@ -1,6 +1,6 @@ using System; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class UserXpStats : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/VoicePresenceChannel.cs b/NadekoBot.Core/Services/Database/Models/VoicePresenceChannel.cs similarity index 76% rename from src/NadekoBot/Services/Database/Models/VoicePresenceChannel.cs rename to NadekoBot.Core/Services/Database/Models/VoicePresenceChannel.cs index 75bced37..23b347d1 100644 --- a/src/NadekoBot/Services/Database/Models/VoicePresenceChannel.cs +++ b/NadekoBot.Core/Services/Database/Models/VoicePresenceChannel.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class IgnoredVoicePresenceChannel : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/Waifu.cs b/NadekoBot.Core/Services/Database/Models/Waifu.cs similarity index 96% rename from src/NadekoBot/Services/Database/Models/Waifu.cs rename to NadekoBot.Core/Services/Database/Models/Waifu.cs index 5be73b46..5f90c12c 100644 --- a/src/NadekoBot/Services/Database/Models/Waifu.cs +++ b/NadekoBot.Core/Services/Database/Models/Waifu.cs @@ -1,7 +1,7 @@ using NadekoBot.Extensions; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class WaifuInfo : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/WaifuItem.cs b/NadekoBot.Core/Services/Database/Models/WaifuItem.cs similarity index 97% rename from src/NadekoBot/Services/Database/Models/WaifuItem.cs rename to NadekoBot.Core/Services/Database/Models/WaifuItem.cs index 2184391f..b203f5fb 100644 --- a/src/NadekoBot/Services/Database/Models/WaifuItem.cs +++ b/NadekoBot.Core/Services/Database/Models/WaifuItem.cs @@ -1,6 +1,6 @@ using System; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class WaifuItem : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/WaifuUpdate.cs b/NadekoBot.Core/Services/Database/Models/WaifuUpdate.cs similarity index 89% rename from src/NadekoBot/Services/Database/Models/WaifuUpdate.cs rename to NadekoBot.Core/Services/Database/Models/WaifuUpdate.cs index 2722900a..bfb23515 100644 --- a/src/NadekoBot/Services/Database/Models/WaifuUpdate.cs +++ b/NadekoBot.Core/Services/Database/Models/WaifuUpdate.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class WaifuUpdate : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/Warning.cs b/NadekoBot.Core/Services/Database/Models/Warning.cs similarity index 85% rename from src/NadekoBot/Services/Database/Models/Warning.cs rename to NadekoBot.Core/Services/Database/Models/Warning.cs index e5c8f4ff..94ab616a 100644 --- a/src/NadekoBot/Services/Database/Models/Warning.cs +++ b/NadekoBot.Core/Services/Database/Models/Warning.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class Warning : DbEntity { diff --git a/src/NadekoBot/Services/Database/Models/XpSettings.cs b/NadekoBot.Core/Services/Database/Models/XpSettings.cs similarity index 97% rename from src/NadekoBot/Services/Database/Models/XpSettings.cs rename to NadekoBot.Core/Services/Database/Models/XpSettings.cs index fcc67fff..ca04d36b 100644 --- a/src/NadekoBot/Services/Database/Models/XpSettings.cs +++ b/NadekoBot.Core/Services/Database/Models/XpSettings.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace NadekoBot.Services.Database.Models +namespace NadekoBot.Core.Services.Database.Models { public class XpSettings : DbEntity { diff --git a/src/NadekoBot/Services/Database/NadekoContext.cs b/NadekoBot.Core/Services/Database/NadekoContext.cs similarity index 95% rename from src/NadekoBot/Services/Database/NadekoContext.cs rename to NadekoBot.Core/Services/Database/NadekoContext.cs index 9b4c1e46..804d702a 100644 --- a/src/NadekoBot/Services/Database/NadekoContext.cs +++ b/NadekoBot.Core/Services/Database/NadekoContext.cs @@ -1,14 +1,14 @@ using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.Linq; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NadekoBot.Extensions; using System; using Microsoft.EntityFrameworkCore.Design; using Microsoft.Data.Sqlite; using System.IO; -namespace NadekoBot.Services.Database +namespace NadekoBot.Core.Services.Database { public class NadekoContextFactory : IDesignTimeDbContextFactory { @@ -29,13 +29,10 @@ namespace NadekoBot.Services.Database public DbSet Quotes { get; set; } public DbSet Donators { get; set; } public DbSet GuildConfigs { get; set; } - public DbSet ClashOfClans { get; set; } - public DbSet ClashCallers { get; set; } public DbSet Reminders { get; set; } public DbSet SelfAssignableRoles { get; set; } public DbSet BotConfig { get; set; } public DbSet Currency { get; set; } - public DbSet ConversionUnits { get; set; } public DbSet MusicPlaylists { get; set; } public DbSet CustomReactions { get; set; } public DbSet CurrencyTransactions { get; set; } @@ -44,6 +41,7 @@ namespace NadekoBot.Services.Database public DbSet Warnings { get; set; } public DbSet UserXpStats { get; set; } public DbSet Clubs { get; set; } + public DbSet LoadedPackages { get; set; } //logging public DbSet LogSettings { get; set; } @@ -53,7 +51,6 @@ namespace NadekoBot.Services.Database //orphans xD public DbSet EightBallResponses { get; set; } public DbSet RaceAnimals { get; set; } - public DbSet ModulePrefixes { get; set; } public DbSet RewardedUsers { get; set; } public NadekoContext(DbContextOptions options) : base(options) @@ -171,16 +168,7 @@ namespace NadekoBot.Services.Database // .HasForeignKey(mp => mp.BotConfigId); #endregion - - #region ClashOfClans - - var callersEntity = modelBuilder.Entity(); - callersEntity - .HasOne(c => c.ClashWar) - .WithMany(c => c.Bases); - - #endregion - + #region Self Assignable Roles var selfassignableRolesEntity = modelBuilder.Entity(); @@ -189,6 +177,10 @@ namespace NadekoBot.Services.Database .HasIndex(s => new { s.GuildId, s.RoleId }) .IsUnique(); + selfassignableRolesEntity + .Property(x => x.Group) + .HasDefaultValue(0); + #endregion #region Currency @@ -307,8 +299,7 @@ namespace NadekoBot.Services.Database .HasOne(x => x.GuildConfig) .WithOne(x => x.XpSettings); #endregion - - //todo major bug + #region XpRoleReward modelBuilder.Entity() .HasIndex(x => new { x.XpSettingsId, x.Level }) diff --git a/src/NadekoBot/Services/Database/Repositories/IBotConfigRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IBotConfigRepository.cs similarity index 70% rename from src/NadekoBot/Services/Database/Repositories/IBotConfigRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IBotConfigRepository.cs index 7a2adf63..507f041f 100644 --- a/src/NadekoBot/Services/Database/Repositories/IBotConfigRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IBotConfigRepository.cs @@ -1,9 +1,9 @@ using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Linq; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IBotConfigRepository : IRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/IClubRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IClubRepository.cs similarity index 85% rename from src/NadekoBot/Services/Database/Repositories/IClubRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IClubRepository.cs index 66ad3d92..5b00dcef 100644 --- a/src/NadekoBot/Services/Database/Repositories/IClubRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IClubRepository.cs @@ -1,9 +1,9 @@ using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Linq; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IClubRepository : IRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/ICurrencyRepository.cs b/NadekoBot.Core/Services/Database/Repositories/ICurrencyRepository.cs similarity index 75% rename from src/NadekoBot/Services/Database/Repositories/ICurrencyRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/ICurrencyRepository.cs index a59d8233..51f35cf0 100644 --- a/src/NadekoBot/Services/Database/Repositories/ICurrencyRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/ICurrencyRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface ICurrencyRepository : IRepository { diff --git a/NadekoBot.Core/Services/Database/Repositories/ICurrencyTransactionsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/ICurrencyTransactionsRepository.cs new file mode 100644 index 00000000..4efa1ba3 --- /dev/null +++ b/NadekoBot.Core/Services/Database/Repositories/ICurrencyTransactionsRepository.cs @@ -0,0 +1,8 @@ +using NadekoBot.Core.Services.Database.Models; + +namespace NadekoBot.Core.Services.Database.Repositories +{ + public interface ICurrencyTransactionsRepository : IRepository + { + } +} diff --git a/NadekoBot.Core/Services/Database/Repositories/ICustomReactionRepository.cs b/NadekoBot.Core/Services/Database/Repositories/ICustomReactionRepository.cs new file mode 100644 index 00000000..034a93eb --- /dev/null +++ b/NadekoBot.Core/Services/Database/Repositories/ICustomReactionRepository.cs @@ -0,0 +1,9 @@ +using NadekoBot.Core.Services.Database.Models; + +namespace NadekoBot.Core.Services.Database.Repositories +{ + public interface ICustomReactionRepository : IRepository + { + + } +} diff --git a/src/NadekoBot/Services/Database/Repositories/IDiscordUserRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IDiscordUserRepository.cs similarity index 71% rename from src/NadekoBot/Services/Database/Repositories/IDiscordUserRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IDiscordUserRepository.cs index fb9360b7..78dce1ec 100644 --- a/src/NadekoBot/Services/Database/Repositories/IDiscordUserRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IDiscordUserRepository.cs @@ -1,7 +1,7 @@ using Discord; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IDiscordUserRepository : IRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/IDonatorsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IDonatorsRepository.cs similarity index 69% rename from src/NadekoBot/Services/Database/Repositories/IDonatorsRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IDonatorsRepository.cs index d0cfd699..4a7731cf 100644 --- a/src/NadekoBot/Services/Database/Repositories/IDonatorsRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IDonatorsRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IDonatorsRepository : IRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/IGuildConfigRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IGuildConfigRepository.cs similarity index 88% rename from src/NadekoBot/Services/Database/Repositories/IGuildConfigRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IGuildConfigRepository.cs index 498b72ed..0444a252 100644 --- a/src/NadekoBot/Services/Database/Repositories/IGuildConfigRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IGuildConfigRepository.cs @@ -1,10 +1,10 @@ using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IGuildConfigRepository : IRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/IMusicPlaylistRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IMusicPlaylistRepository.cs similarity index 68% rename from src/NadekoBot/Services/Database/Repositories/IMusicPlaylistRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IMusicPlaylistRepository.cs index d14b27c2..bcb15f26 100644 --- a/src/NadekoBot/Services/Database/Repositories/IMusicPlaylistRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IMusicPlaylistRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IMusicPlaylistRepository : IRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/IPokeGameRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IPokeGameRepository.cs similarity index 56% rename from src/NadekoBot/Services/Database/Repositories/IPokeGameRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IPokeGameRepository.cs index af9b003b..7af017c6 100644 --- a/src/NadekoBot/Services/Database/Repositories/IPokeGameRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IPokeGameRepository.cs @@ -1,6 +1,6 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IPokeGameRepository : IRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/IQuoteRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IQuoteRepository.cs similarity index 83% rename from src/NadekoBot/Services/Database/Repositories/IQuoteRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IQuoteRepository.cs index 2cd1cdbe..4781ca7f 100644 --- a/src/NadekoBot/Services/Database/Repositories/IQuoteRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IQuoteRepository.cs @@ -1,8 +1,8 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Threading.Tasks; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IQuoteRepository : IRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/IReminderRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IReminderRepository.cs similarity index 64% rename from src/NadekoBot/Services/Database/Repositories/IReminderRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IReminderRepository.cs index dc757dbc..f5823aac 100644 --- a/src/NadekoBot/Services/Database/Repositories/IReminderRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IReminderRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IReminderRepository : IRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/IRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IRepository.cs similarity index 79% rename from src/NadekoBot/Services/Database/Repositories/IRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IRepository.cs index d66aae87..30ec2a05 100644 --- a/src/NadekoBot/Services/Database/Repositories/IRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IRepository.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IRepository where T : DbEntity { diff --git a/NadekoBot.Core/Services/Database/Repositories/ISelfAssignedRolesRepository.cs b/NadekoBot.Core/Services/Database/Repositories/ISelfAssignedRolesRepository.cs new file mode 100644 index 00000000..065777ec --- /dev/null +++ b/NadekoBot.Core/Services/Database/Repositories/ISelfAssignedRolesRepository.cs @@ -0,0 +1,12 @@ +using NadekoBot.Core.Services.Database.Models; +using System.Collections.Generic; +using System.Linq; + +namespace NadekoBot.Core.Services.Database.Repositories +{ + public interface ISelfAssignedRolesRepository : IRepository + { + bool DeleteByGuildAndRoleId(ulong guildId, ulong roleId); + IEnumerable> GetFromGuild(ulong guildId); + } +} diff --git a/src/NadekoBot/Services/Database/Repositories/IWaifuRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IWaifuRepository.cs similarity index 72% rename from src/NadekoBot/Services/Database/Repositories/IWaifuRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IWaifuRepository.cs index 50295897..0c90612e 100644 --- a/src/NadekoBot/Services/Database/Repositories/IWaifuRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IWaifuRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IWaifuRepository : IRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/IWarningsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IWarningsRepository.cs similarity index 71% rename from src/NadekoBot/Services/Database/Repositories/IWarningsRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IWarningsRepository.cs index f8c8296e..63320b1a 100644 --- a/src/NadekoBot/Services/Database/Repositories/IWarningsRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IWarningsRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Threading.Tasks; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IWarningsRepository : IRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/IXpRepository.cs b/NadekoBot.Core/Services/Database/Repositories/IXpRepository.cs similarity index 71% rename from src/NadekoBot/Services/Database/Repositories/IXpRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/IXpRepository.cs index f62394d7..f19ba8be 100644 --- a/src/NadekoBot/Services/Database/Repositories/IXpRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/IXpRepository.cs @@ -1,6 +1,6 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services.Database.Repositories +namespace NadekoBot.Core.Services.Database.Repositories { public interface IXpRepository : IRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/BotConfigRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/BotConfigRepository.cs similarity index 92% rename from src/NadekoBot/Services/Database/Repositories/Impl/BotConfigRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/BotConfigRepository.cs index c21b1ff2..7d2f6e92 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/BotConfigRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/BotConfigRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Linq; using Microsoft.EntityFrameworkCore; using System; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class BotConfigRepository : Repository, IBotConfigRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/ClubRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/ClubRepository.cs similarity index 96% rename from src/NadekoBot/Services/Database/Repositories/Impl/ClubRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/ClubRepository.cs index 8caa1838..9da05925 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/ClubRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/ClubRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Linq; using Microsoft.EntityFrameworkCore; using System; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class ClubRepository : Repository, IClubRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/CurrencyRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyRepository.cs similarity index 92% rename from src/NadekoBot/Services/Database/Repositories/Impl/CurrencyRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyRepository.cs index 6f397789..e21c63a1 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/CurrencyRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class CurrencyRepository : Repository, ICurrencyRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs similarity index 70% rename from src/NadekoBot/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs index 85a23a47..cb49e10c 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/CurrencyTransactionsRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class CurrencyTransactionsRepository : Repository, ICurrencyTransactionsRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/CustomReactionRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/CustomReactionRepository.cs similarity index 69% rename from src/NadekoBot/Services/Database/Repositories/Impl/CustomReactionRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/CustomReactionRepository.cs index f9b7c819..51b304f3 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/CustomReactionRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/CustomReactionRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class CustomReactionsRepository : Repository, ICustomReactionRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/DiscordUserRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/DiscordUserRepository.cs similarity index 94% rename from src/NadekoBot/Services/Database/Repositories/Impl/DiscordUserRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/DiscordUserRepository.cs index 933d583b..9aab7144 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/DiscordUserRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/DiscordUserRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Linq; using Microsoft.EntityFrameworkCore; using Discord; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class DiscordUserRepository : Repository, IDiscordUserRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/DonatorsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/DonatorsRepository.cs similarity index 90% rename from src/NadekoBot/Services/Database/Repositories/Impl/DonatorsRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/DonatorsRepository.cs index b5c8c269..03e322bc 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/DonatorsRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/DonatorsRepository.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class DonatorsRepository : Repository, IDonatorsRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/GuildConfigRepository.cs similarity index 98% rename from src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/GuildConfigRepository.cs index eac42399..63e8a314 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/GuildConfigRepository.cs @@ -1,10 +1,10 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore; using System; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class GuildConfigRepository : Repository, IGuildConfigRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs similarity index 87% rename from src/NadekoBot/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs index 50347593..3f11b2d5 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/MusicPlaylistRepository.cs @@ -1,10 +1,10 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class MusicPlaylistRepository : Repository, IMusicPlaylistRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/PokeGameRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/PokeGameRepository.cs similarity index 80% rename from src/NadekoBot/Services/Database/Repositories/Impl/PokeGameRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/PokeGameRepository.cs index 06662b06..ab5130ef 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/PokeGameRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/PokeGameRepository.cs @@ -1,7 +1,7 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class PokeGameRepository : Repository, IPokeGameRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/QuoteRepository.cs similarity index 93% rename from src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/QuoteRepository.cs index 00db27b0..132d4192 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/QuoteRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/QuoteRepository.cs @@ -1,4 +1,4 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NadekoBot.Extensions; using System; using System.Collections.Generic; @@ -7,7 +7,7 @@ using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using NadekoBot.Common; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class QuoteRepository : Repository, IQuoteRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/ReminderRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/ReminderRepository.cs similarity index 80% rename from src/NadekoBot/Services/Database/Repositories/Impl/ReminderRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/ReminderRepository.cs index e29cc3f2..39b13363 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/ReminderRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/ReminderRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.Linq; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class ReminderRepository : Repository, IReminderRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/Repository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/Repository.cs similarity index 90% rename from src/NadekoBot/Services/Database/Repositories/Impl/Repository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/Repository.cs index b90cf154..0b44801f 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/Repository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/Repository.cs @@ -1,9 +1,9 @@ using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class Repository : IRepository where T : DbEntity { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs similarity index 64% rename from src/NadekoBot/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs index d17dac7d..7a6a6643 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/SelfAssignedRolesRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class SelfAssignedRolesRepository : Repository, ISelfAssignedRolesRepository { @@ -22,7 +22,9 @@ namespace NadekoBot.Services.Database.Repositories.Impl return true; } - public IEnumerable GetFromGuild(ulong guildId) => - _set.Where(s => s.GuildId == guildId).ToList(); + public IEnumerable> GetFromGuild(ulong guildId) + => _set.Where(s => s.GuildId == guildId) + .AsEnumerable() + .GroupBy(x => x.Group); } } diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/WaifuRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/WaifuRepository.cs similarity index 93% rename from src/NadekoBot/Services/Database/Repositories/Impl/WaifuRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/WaifuRepository.cs index f08473b6..07fa3660 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/WaifuRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/WaifuRepository.cs @@ -1,10 +1,10 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class WaifuRepository : Repository, IWaifuRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/WarningsRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/WarningsRepository.cs similarity index 90% rename from src/NadekoBot/Services/Database/Repositories/Impl/WarningsRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/WarningsRepository.cs index cb2cc089..e427627c 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/WarningsRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/WarningsRepository.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using Microsoft.EntityFrameworkCore; using System.Linq; using System.Threading.Tasks; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class WarningsRepository : Repository, IWarningsRepository { diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/XpRepository.cs b/NadekoBot.Core/Services/Database/Repositories/Impl/XpRepository.cs similarity index 93% rename from src/NadekoBot/Services/Database/Repositories/Impl/XpRepository.cs rename to NadekoBot.Core/Services/Database/Repositories/Impl/XpRepository.cs index 90160da1..96788d13 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/XpRepository.cs +++ b/NadekoBot.Core/Services/Database/Repositories/Impl/XpRepository.cs @@ -1,8 +1,8 @@ -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Linq; using Microsoft.EntityFrameworkCore; -namespace NadekoBot.Services.Database.Repositories.Impl +namespace NadekoBot.Core.Services.Database.Repositories.Impl { public class XpRepository : Repository, IXpRepository { diff --git a/src/NadekoBot/Services/Database/UnitOfWork.cs b/NadekoBot.Core/Services/Database/UnitOfWork.cs similarity index 87% rename from src/NadekoBot/Services/Database/UnitOfWork.cs rename to NadekoBot.Core/Services/Database/UnitOfWork.cs index 27a43b13..af660051 100644 --- a/src/NadekoBot/Services/Database/UnitOfWork.cs +++ b/NadekoBot.Core/Services/Database/UnitOfWork.cs @@ -1,9 +1,9 @@ -using NadekoBot.Services.Database.Repositories; -using NadekoBot.Services.Database.Repositories.Impl; +using NadekoBot.Core.Services.Database.Repositories; +using NadekoBot.Core.Services.Database.Repositories.Impl; using System; using System.Threading.Tasks; -namespace NadekoBot.Services.Database +namespace NadekoBot.Core.Services.Database { public class UnitOfWork : IUnitOfWork { @@ -18,9 +18,6 @@ namespace NadekoBot.Services.Database private IDonatorsRepository _donators; public IDonatorsRepository Donators => _donators ?? (_donators = new DonatorsRepository(_context)); - private IClashOfClansRepository _clashOfClans; - public IClashOfClansRepository ClashOfClans => _clashOfClans ?? (_clashOfClans = new ClashOfClansRepository(_context)); - private IReminderRepository _reminders; public IReminderRepository Reminders => _reminders ?? (_reminders = new ReminderRepository(_context)); @@ -36,9 +33,6 @@ namespace NadekoBot.Services.Database private ICurrencyTransactionsRepository _currencyTransactions; public ICurrencyTransactionsRepository CurrencyTransactions => _currencyTransactions ?? (_currencyTransactions = new CurrencyTransactionsRepository(_context)); - private IUnitConverterRepository _conUnits; - public IUnitConverterRepository ConverterUnits => _conUnits ?? (_conUnits = new UnitConverterRepository(_context)); - private IMusicPlaylistRepository _musicPlaylists; public IMusicPlaylistRepository MusicPlaylists => _musicPlaylists ?? (_musicPlaylists = new MusicPlaylistRepository(_context)); diff --git a/src/NadekoBot/Services/DbService.cs b/NadekoBot.Core/Services/DbService.cs similarity index 96% rename from src/NadekoBot/Services/DbService.cs rename to NadekoBot.Core/Services/DbService.cs index 56c6940a..737cdce2 100644 --- a/src/NadekoBot/Services/DbService.cs +++ b/NadekoBot.Core/Services/DbService.cs @@ -1,11 +1,11 @@ using Microsoft.Data.Sqlite; using Microsoft.EntityFrameworkCore; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; using System; using System.IO; using System.Linq; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public class DbService { diff --git a/src/NadekoBot/Services/GreetSettingsService.cs b/NadekoBot.Core/Services/GreetSettingsService.cs similarity index 97% rename from src/NadekoBot/Services/GreetSettingsService.cs rename to NadekoBot.Core/Services/GreetSettingsService.cs index 2d8b5e9b..b25e8785 100644 --- a/src/NadekoBot/Services/GreetSettingsService.cs +++ b/NadekoBot.Core/Services/GreetSettingsService.cs @@ -1,7 +1,7 @@ using Discord; using Discord.WebSocket; using NadekoBot.Extensions; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NLog; using System; using System.Collections.Concurrent; @@ -11,7 +11,7 @@ using System.Threading.Tasks; using NadekoBot.Common; using NadekoBot.Common.Replacements; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public class GreetSettingsService : INService { @@ -21,13 +21,15 @@ namespace NadekoBot.Services private readonly DiscordSocketClient _client; private readonly Logger _log; - public GreetSettingsService(DiscordSocketClient client, IEnumerable guildConfigs, DbService db) + public GreetSettingsService(DiscordSocketClient client, NadekoBot bot, DbService db) { _db = db; _client = client; _log = LogManager.GetCurrentClassLogger(); - GuildConfigsCache = new ConcurrentDictionary(guildConfigs.ToDictionary(g => g.GuildId, GreetSettings.Create)); + GuildConfigsCache = new ConcurrentDictionary( + bot.AllGuildConfigs + .ToDictionary(g => g.GuildId, GreetSettings.Create)); _client.UserJoined += UserJoined; _client.UserLeft += UserLeft; @@ -180,10 +182,8 @@ namespace NadekoBot.Services public GreetSettings GetOrAddSettingsForGuild(ulong guildId) { - GreetSettings settings; - GuildConfigsCache.TryGetValue(guildId, out settings); - - if (settings != null) + if(GuildConfigsCache.TryGetValue(guildId, out var settings) && + settings != null) return settings; using (var uow = _db.UnitOfWork) diff --git a/src/NadekoBot/Services/IBotConfigProvider.cs b/NadekoBot.Core/Services/IBotConfigProvider.cs similarity index 71% rename from src/NadekoBot/Services/IBotConfigProvider.cs rename to NadekoBot.Core/Services/IBotConfigProvider.cs index 6ef54970..b93b958b 100644 --- a/src/NadekoBot/Services/IBotConfigProvider.cs +++ b/NadekoBot.Core/Services/IBotConfigProvider.cs @@ -1,7 +1,7 @@ using NadekoBot.Common; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface IBotConfigProvider { diff --git a/src/NadekoBot/Services/IBotCredentials.cs b/NadekoBot.Core/Services/IBotCredentials.cs similarity index 97% rename from src/NadekoBot/Services/IBotCredentials.cs rename to NadekoBot.Core/Services/IBotCredentials.cs index 3ee15942..af8cfe5e 100644 --- a/src/NadekoBot/Services/IBotCredentials.cs +++ b/NadekoBot.Core/Services/IBotCredentials.cs @@ -1,7 +1,7 @@ using Discord; using System.Collections.Immutable; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface IBotCredentials { diff --git a/src/NadekoBot/Services/IDataCache.cs b/NadekoBot.Core/Services/IDataCache.cs similarity index 78% rename from src/NadekoBot/Services/IDataCache.cs rename to NadekoBot.Core/Services/IDataCache.cs index 3be7ad35..0cd9adc5 100644 --- a/src/NadekoBot/Services/IDataCache.cs +++ b/NadekoBot.Core/Services/IDataCache.cs @@ -1,11 +1,7 @@ using StackExchange.Redis; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface IDataCache { diff --git a/src/NadekoBot/Services/IGoogleApiService.cs b/NadekoBot.Core/Services/IGoogleApiService.cs similarity index 97% rename from src/NadekoBot/Services/IGoogleApiService.cs rename to NadekoBot.Core/Services/IGoogleApiService.cs index 758a7d0f..90b2cc11 100644 --- a/src/NadekoBot/Services/IGoogleApiService.cs +++ b/NadekoBot.Core/Services/IGoogleApiService.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface IGoogleApiService : INService { diff --git a/src/NadekoBot/Services/IImagesService.cs b/NadekoBot.Core/Services/IImagesService.cs similarity index 84% rename from src/NadekoBot/Services/IImagesService.cs rename to NadekoBot.Core/Services/IImagesService.cs index 0b2b94f2..0d700c42 100644 --- a/src/NadekoBot/Services/IImagesService.cs +++ b/NadekoBot.Core/Services/IImagesService.cs @@ -1,6 +1,6 @@ using System.Collections.Immutable; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface IImagesService : INService { @@ -19,6 +19,9 @@ namespace NadekoBot.Services ImmutableArray XpCard { get; } + ImmutableArray Rip { get; } + ImmutableArray FlowerCircle { get; } + void Reload(); } } diff --git a/src/NadekoBot/Services/ILocalization.cs b/NadekoBot.Core/Services/ILocalization.cs similarity index 95% rename from src/NadekoBot/Services/ILocalization.cs rename to NadekoBot.Core/Services/ILocalization.cs index c3cfbe94..9e5ae3ba 100644 --- a/src/NadekoBot/Services/ILocalization.cs +++ b/NadekoBot.Core/Services/ILocalization.cs @@ -2,7 +2,7 @@ using System.Globalization; using Discord; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface ILocalization : INService { diff --git a/NadekoBot.Core/Services/INService.cs b/NadekoBot.Core/Services/INService.cs new file mode 100644 index 00000000..832ecba7 --- /dev/null +++ b/NadekoBot.Core/Services/INService.cs @@ -0,0 +1,20 @@ +using System.Threading.Tasks; + +namespace NadekoBot.Core.Services +{ + /// + /// All services must implement this interface in order to be auto-discovered by the DI system + /// + public interface INService + { + + } + + /// + /// All services which require cleanup after they are unloaded must implement this interface + /// + public interface IUnloadableService + { + Task Unload(); + } +} diff --git a/src/NadekoBot/Services/IStatsService.cs b/NadekoBot.Core/Services/IStatsService.cs similarity index 89% rename from src/NadekoBot/Services/IStatsService.cs rename to NadekoBot.Core/Services/IStatsService.cs index 800b8fba..b591ba92 100644 --- a/src/NadekoBot/Services/IStatsService.cs +++ b/NadekoBot.Core/Services/IStatsService.cs @@ -1,7 +1,7 @@ using System; using System.Threading.Tasks; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface IStatsService : INService { @@ -13,7 +13,6 @@ namespace NadekoBot.Services double MessagesPerSecond { get; } long TextChannels { get; } long VoiceChannels { get; } - int GuildCount { get; } TimeSpan GetUptime(); string GetUptimeString(string separator = ", "); diff --git a/src/NadekoBot/Services/Impl/BotConfigProvider.cs b/NadekoBot.Core/Services/Impl/BotConfigProvider.cs similarity index 98% rename from src/NadekoBot/Services/Impl/BotConfigProvider.cs rename to NadekoBot.Core/Services/Impl/BotConfigProvider.cs index 2d293401..1b707312 100644 --- a/src/NadekoBot/Services/Impl/BotConfigProvider.cs +++ b/NadekoBot.Core/Services/Impl/BotConfigProvider.cs @@ -1,9 +1,9 @@ using System; using NadekoBot.Common; -using NadekoBot.Services.Database.Models; -using NadekoBot.Services; +using NadekoBot.Core.Services.Database.Models; +using NadekoBot.Core.Services; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class BotConfigProvider : IBotConfigProvider { diff --git a/src/NadekoBot/Services/Impl/BotCredentials.cs b/NadekoBot.Core/Services/Impl/BotCredentials.cs similarity index 99% rename from src/NadekoBot/Services/Impl/BotCredentials.cs rename to NadekoBot.Core/Services/Impl/BotCredentials.cs index 07624cde..b7176b47 100644 --- a/src/NadekoBot/Services/Impl/BotCredentials.cs +++ b/NadekoBot.Core/Services/Impl/BotCredentials.cs @@ -8,18 +8,15 @@ using Microsoft.Extensions.Configuration; using System.Collections.Immutable; using NadekoBot.Common; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class BotCredentials : IBotCredentials { private Logger _log; public ulong ClientId { get; } - public string GoogleApiKey { get; } - public string MashapeKey { get; } - public string Token { get; } public ImmutableArray OwnerIds { get; } diff --git a/NadekoBot.Core/Services/Impl/FontProvider.cs b/NadekoBot.Core/Services/Impl/FontProvider.cs new file mode 100644 index 00000000..9497cc8b --- /dev/null +++ b/NadekoBot.Core/Services/Impl/FontProvider.cs @@ -0,0 +1,38 @@ +using SixLabors.Fonts; +using System.IO; + +namespace NadekoBot.Core.Services.Impl +{ + public class FontProvider : INService + { + private readonly FontCollection _fonts; + + public FontProvider() + { + _fonts = new FontCollection(); + if (Directory.Exists("data/fonts")) + foreach (var file in Directory.GetFiles("data/fonts")) + { + _fonts.Install(file); + } + + UsernameFontFamily = _fonts.Find("Whitney-Bold"); + ClubFontFamily = _fonts.Find("Whitney-Bold"); + LevelFont = _fonts.Find("Whitney-Bold").CreateFont(45); + XpFont = _fonts.Find("Whitney-Bold").CreateFont(50); + AwardedFont = _fonts.Find("Whitney-Bold").CreateFont(25); + RankFont = _fonts.Find("Uni Sans Thin CAPS").CreateFont(30); + TimeFont = _fonts.Find("Whitney-Bold").CreateFont(20); + RipNameFont = _fonts.Find("Whitney-Bold").CreateFont(20); + } + + public Font LevelFont { get; } + public Font XpFont { get; } + public Font AwardedFont { get; } + public Font RankFont { get; } + public Font TimeFont { get; } + public FontFamily UsernameFontFamily { get; } + public FontFamily ClubFontFamily { get; } + public Font RipNameFont { get; } + } +} diff --git a/src/NadekoBot/Services/Impl/GoogleApiService.cs b/NadekoBot.Core/Services/Impl/GoogleApiService.cs similarity index 99% rename from src/NadekoBot/Services/Impl/GoogleApiService.cs rename to NadekoBot.Core/Services/Impl/GoogleApiService.cs index 45727fba..0721caba 100644 --- a/src/NadekoBot/Services/Impl/GoogleApiService.cs +++ b/NadekoBot.Core/Services/Impl/GoogleApiService.cs @@ -14,7 +14,7 @@ using System.Net; using Newtonsoft.Json.Linq; using NadekoBot.Extensions; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class GoogleApiService : IGoogleApiService { diff --git a/src/NadekoBot/Services/Impl/ImagesService.cs b/NadekoBot.Core/Services/Impl/ImagesService.cs similarity index 88% rename from src/NadekoBot/Services/Impl/ImagesService.cs rename to NadekoBot.Core/Services/Impl/ImagesService.cs index 3bb0bd2e..3b8b2a43 100644 --- a/src/NadekoBot/Services/Impl/ImagesService.cs +++ b/NadekoBot.Core/Services/Impl/ImagesService.cs @@ -4,7 +4,7 @@ using System.Collections.Immutable; using System.IO; using System.Linq; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class ImagesService : IImagesService { @@ -27,6 +27,9 @@ namespace NadekoBot.Services.Impl private const string _xpCardPath = _basePath + "xp/xp.png"; + private const string _ripPath = _basePath + "rip/rip.png"; + private const string _ripFlowersPath = _basePath + "rip/rose_overlay.png"; + public ImmutableArray Heads { get; private set; } public ImmutableArray Tails { get; private set; } @@ -44,6 +47,9 @@ namespace NadekoBot.Services.Impl public ImmutableArray XpCard { get; private set; } + public ImmutableArray Rip { get; private set; } + public ImmutableArray FlowerCircle { get; private set; } + public ImagesService() { _log = LogManager.GetCurrentClassLogger(); @@ -82,6 +88,9 @@ namespace NadekoBot.Services.Impl RategirlDot = File.ReadAllBytes(_rategirlDot).ToImmutableArray(); XpCard = File.ReadAllBytes(_xpCardPath).ToImmutableArray(); + + Rip = File.ReadAllBytes(_ripPath).ToImmutableArray(); + FlowerCircle = File.ReadAllBytes(_ripFlowersPath).ToImmutableArray(); } catch (Exception ex) { diff --git a/src/NadekoBot/Services/Impl/Localization.cs b/NadekoBot.Core/Services/Impl/Localization.cs similarity index 92% rename from src/NadekoBot/Services/Impl/Localization.cs rename to NadekoBot.Core/Services/Impl/Localization.cs index 8bc0d257..67a63080 100644 --- a/src/NadekoBot/Services/Impl/Localization.cs +++ b/NadekoBot.Core/Services/Impl/Localization.cs @@ -4,12 +4,12 @@ using System.Globalization; using System.Linq; using Discord; using NLog; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using NadekoBot.Common; using Newtonsoft.Json; using System.IO; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class Localization : ILocalization { @@ -28,11 +28,11 @@ namespace NadekoBot.Services.Impl } private Localization() { } - public Localization(IBotConfigProvider bcp, IEnumerable gcs, DbService db) + public Localization(IBotConfigProvider bcp, NadekoBot bot, DbService db) { _log = LogManager.GetCurrentClassLogger(); - var cultureInfoNames = gcs.ToDictionary(x => x.GuildId, x => x.Locale); + var cultureInfoNames = bot.AllGuildConfigs.ToDictionary(x => x.GuildId, x => x.Locale); var defaultCulture = bcp.BotConfig.Locale; _db = db; @@ -123,8 +123,7 @@ namespace NadekoBot.Services.Impl { if (guildId == null) return DefaultCultureInfo; - CultureInfo info = null; - GuildCultureInfos.TryGetValue(guildId.Value, out info); + GuildCultureInfos.TryGetValue(guildId.Value, out CultureInfo info); return info ?? DefaultCultureInfo; } diff --git a/src/NadekoBot/Services/Impl/NadekoStrings.cs b/NadekoBot.Core/Services/Impl/NadekoStrings.cs similarity index 99% rename from src/NadekoBot/Services/Impl/NadekoStrings.cs rename to NadekoBot.Core/Services/Impl/NadekoStrings.cs index b50f553e..a21b7c38 100644 --- a/src/NadekoBot/Services/Impl/NadekoStrings.cs +++ b/NadekoBot.Core/Services/Impl/NadekoStrings.cs @@ -8,7 +8,7 @@ using System.Text.RegularExpressions; using Newtonsoft.Json; using NLog; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class NadekoStrings : INService { diff --git a/src/NadekoBot/Services/Impl/RedisCache.cs b/NadekoBot.Core/Services/Impl/RedisCache.cs similarity index 80% rename from src/NadekoBot/Services/Impl/RedisCache.cs rename to NadekoBot.Core/Services/Impl/RedisCache.cs index e0951120..7e26d2ab 100644 --- a/src/NadekoBot/Services/Impl/RedisCache.cs +++ b/NadekoBot.Core/Services/Impl/RedisCache.cs @@ -1,23 +1,24 @@ using StackExchange.Redis; using System.Threading.Tasks; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class RedisCache : IDataCache { - private ulong _botid; - public ConnectionMultiplexer Redis { get; } private readonly IDatabase _db; - public RedisCache(ulong botId) + public RedisCache() { - _botid = botId; Redis = ConnectionMultiplexer.Connect("127.0.0.1"); Redis.PreserveAsyncOrder = false; _db = Redis.GetDatabase(); } + // things here so far don't need the bot id + // because it's a good thing if different bots + // which are hosted on the same PC + // can re-use the same image/anime data public async Task<(bool Success, byte[] Data)> TryGetImageDataAsync(string key) { byte[] x = await _db.StringGetAsync("image_" + key); diff --git a/src/NadekoBot/Services/Impl/SoundCloudApiService.cs b/NadekoBot.Core/Services/Impl/SoundCloudApiService.cs similarity index 99% rename from src/NadekoBot/Services/Impl/SoundCloudApiService.cs rename to NadekoBot.Core/Services/Impl/SoundCloudApiService.cs index acdba5b7..65249cce 100644 --- a/src/NadekoBot/Services/Impl/SoundCloudApiService.cs +++ b/NadekoBot.Core/Services/Impl/SoundCloudApiService.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Net.Http; using System.Threading.Tasks; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class SoundCloudApiService : INService { diff --git a/src/NadekoBot/Services/Impl/StartingGuildsListService.cs b/NadekoBot.Core/Services/Impl/StartingGuildsListService.cs similarity index 94% rename from src/NadekoBot/Services/Impl/StartingGuildsListService.cs rename to NadekoBot.Core/Services/Impl/StartingGuildsListService.cs index e7f413cc..02f98ff8 100644 --- a/src/NadekoBot/Services/Impl/StartingGuildsListService.cs +++ b/NadekoBot.Core/Services/Impl/StartingGuildsListService.cs @@ -4,7 +4,7 @@ using System.Collections.Immutable; using System.Linq; using System.Collections; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class StartingGuildsService : IEnumerable, INService { diff --git a/src/NadekoBot/Services/Impl/StatsService.cs b/NadekoBot.Core/Services/Impl/StatsService.cs similarity index 93% rename from src/NadekoBot/Services/Impl/StatsService.cs rename to NadekoBot.Core/Services/Impl/StatsService.cs index 6c8611e0..9fa1b86d 100644 --- a/src/NadekoBot/Services/Impl/StatsService.cs +++ b/NadekoBot.Core/Services/Impl/StatsService.cs @@ -1,6 +1,8 @@ using Discord; using Discord.WebSocket; +using NadekoBot.Common.ShardCom; using NadekoBot.Extensions; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Globalization; @@ -11,8 +13,9 @@ using System.Security.Cryptography; using System.Text; using System.Threading; using System.Threading.Tasks; +using StackExchange.Redis; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class StatsService : IStatsService { @@ -20,7 +23,7 @@ namespace NadekoBot.Services.Impl private readonly IBotCredentials _creds; private readonly DateTime _started; - public const string BotVersion = "1.10.2"; + public const string BotVersion = "2.0.0"; public string Author => "Kwoth#2560"; public string Library => "Discord.Net"; @@ -39,16 +42,15 @@ namespace NadekoBot.Services.Impl private readonly Timer _carbonitexTimer; private readonly Timer _dataTimer; - private readonly ShardsCoordinator _sc; + private readonly ConnectionMultiplexer _redis; - public int GuildCount => - _sc?.GuildCount ?? _client.Guilds.Count(); - - public StatsService(DiscordSocketClient client, CommandHandler cmdHandler, IBotCredentials creds, NadekoBot nadeko) + public StatsService(DiscordSocketClient client, CommandHandler cmdHandler, + IBotCredentials creds, NadekoBot nadeko, + IDataCache cache) { _client = client; _creds = creds; - _sc = nadeko.ShardCoord; + _redis = cache.Redis; _started = DateTime.UtcNow; _client.MessageReceived += _ => Task.FromResult(Interlocked.Increment(ref _messageCounter)); @@ -130,7 +132,7 @@ namespace NadekoBot.Services.Impl return Task.CompletedTask; }; - if (_sc != null) + if (_client.ShardId == 0) { _carbonitexTimer = new Timer(async (state) => { @@ -142,7 +144,7 @@ namespace NadekoBot.Services.Impl { using (var content = new FormUrlEncodedContent( new Dictionary { - { "servercount", _sc.GuildCount.ToString() }, + { "servercount", nadeko.GuildCount.ToString() }, { "key", _creds.CarbonKey }})) { content.Headers.Clear(); @@ -175,7 +177,7 @@ namespace NadekoBot.Services.Impl using (var content = new FormUrlEncodedContent( new Dictionary { { "id", string.Concat(MD5.Create().ComputeHash(Encoding.ASCII.GetBytes(_creds.ClientId.ToString())).Select(x => x.ToString("X2"))) }, - { "guildCount", _sc.GuildCount.ToString() }, + { "guildCount", nadeko.GuildCount.ToString() }, { "version", BotVersion }, { "platform", platform }})) { diff --git a/src/NadekoBot/Services/Impl/SyncPreconditionService.cs b/NadekoBot.Core/Services/Impl/SyncPreconditionService.cs similarity index 61% rename from src/NadekoBot/Services/Impl/SyncPreconditionService.cs rename to NadekoBot.Core/Services/Impl/SyncPreconditionService.cs index b6a47133..b40a4d41 100644 --- a/src/NadekoBot/Services/Impl/SyncPreconditionService.cs +++ b/NadekoBot.Core/Services/Impl/SyncPreconditionService.cs @@ -1,4 +1,4 @@ -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class SyncPreconditionService { diff --git a/src/NadekoBot/Services/Impl/Ytdl.cs b/NadekoBot.Core/Services/Impl/Ytdl.cs similarity index 97% rename from src/NadekoBot/Services/Impl/Ytdl.cs rename to NadekoBot.Core/Services/Impl/Ytdl.cs index 0ddebe6b..5b8ba558 100644 --- a/src/NadekoBot/Services/Impl/Ytdl.cs +++ b/NadekoBot.Core/Services/Impl/Ytdl.cs @@ -3,7 +3,7 @@ using System; using System.Diagnostics; using System.Threading.Tasks; -namespace NadekoBot.Services.Impl +namespace NadekoBot.Core.Services.Impl { public class YtdlOperation : IDisposable { diff --git a/src/NadekoBot/Services/LogSetup.cs b/NadekoBot.Core/Services/LogSetup.cs similarity index 94% rename from src/NadekoBot/Services/LogSetup.cs rename to NadekoBot.Core/Services/LogSetup.cs index 9cf85799..6e22854c 100644 --- a/src/NadekoBot/Services/LogSetup.cs +++ b/NadekoBot.Core/Services/LogSetup.cs @@ -2,7 +2,7 @@ using NLog.Config; using NLog.Targets; -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public class LogSetup { diff --git a/src/NadekoBot/NadekoBot.cs b/NadekoBot.Core/Services/NadekoBot.cs similarity index 58% rename from src/NadekoBot/NadekoBot.cs rename to NadekoBot.Core/Services/NadekoBot.cs index 946ba5c3..6e974535 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/NadekoBot.Core/Services/NadekoBot.cs @@ -1,8 +1,8 @@ using Discord; using Discord.Commands; using Discord.WebSocket; -using NadekoBot.Services; -using NadekoBot.Services.Impl; +using NadekoBot.Core.Services; +using NadekoBot.Core.Services.Impl; using NLog; using System; using System.Linq; @@ -10,16 +10,14 @@ using System.Reflection; using System.Threading.Tasks; using System.Collections.Immutable; using System.Diagnostics; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System.Threading; using System.IO; using NadekoBot.Extensions; using System.Collections.Generic; using NadekoBot.Common; using NadekoBot.Common.ShardCom; -using NadekoBot.Common.TypeReaders; -using NadekoBot.Common.TypeReaders.Models; -using NadekoBot.Services.Database; +using NadekoBot.Core.Services.Database; using StackExchange.Redis; using Newtonsoft.Json; @@ -30,7 +28,6 @@ namespace NadekoBot private Logger _log; public BotCredentials Credentials { get; } - public DiscordSocketClient Client { get; } public CommandService CommandService { get; } @@ -50,32 +47,25 @@ namespace NadekoBot public INServiceProvider Services { get; private set; } - public ShardsCoordinator ShardCoord { get; private set; } - - private readonly ShardComClient _comClient; - private readonly BotConfig _botConfig; + public IDataCache Cache { get; private set; } - public NadekoBot(int shardId, int parentProcessId, int? port = null) + public int GuildCount => + Cache.Redis.GetDatabase() + .ListRange(Credentials.RedisKey() + "_shardstats") + .Select(x => JsonConvert.DeserializeObject(x)) + .Sum(x => x.Guilds); + + public NadekoBot(int shardId, int parentProcessId) { if (shardId < 0) throw new ArgumentOutOfRangeException(nameof(shardId)); - //var obj = JsonConvert.DeserializeObject>(File.ReadAllText("./data/command_strings.json")) - // .ToDictionary(x => x.Key, x => new CommandData2 - // { - // Cmd = x.Value.Cmd, - // Desc = x.Value.Desc, - // Usage = x.Value.Usage.Select(y => y.Substring(1, y.Length - 2)).ToArray(), - // }); - - //File.WriteAllText("./data/command_strings.json", JsonConvert.SerializeObject(obj, Formatting.Indented)); - - LogSetup.SetupLogger(); _log = LogManager.GetCurrentClassLogger(); TerribleElevatedPermissionCheck(); + Cache = new RedisCache(); Credentials = new BotCredentials(); _db = new DbService(Credentials); Client = new DiscordSocketClient(new DiscordSocketConfig @@ -93,9 +83,6 @@ namespace NadekoBot DefaultRunMode = RunMode.Sync, }); - port = port ?? Credentials.ShardRunPort; - _comClient = new ShardComClient(port.Value); - using (var uow = _db.UnitOfWork) { _botConfig = uow.BotConfig.GetOrCreate(); @@ -103,7 +90,7 @@ namespace NadekoBot ErrorColor = new Color(Convert.ToUInt32(_botConfig.ErrorColor, 16)); } - SetupShard(parentProcessId, port.Value); + SetupShard(parentProcessId); #if GLOBAL_NADEKO Client.Log += Client_Log; @@ -116,13 +103,18 @@ namespace NadekoBot { while (true) { - await _comClient.Send(new ShardComMessage() + var data = new ShardComMessage() { ConnectionState = Client.ConnectionState, Guilds = Client.ConnectionState == ConnectionState.Connected ? Client.Guilds.Count : 0, ShardId = Client.ShardId, Time = DateTime.UtcNow, - }); + }; + + var sub = Cache.Redis.GetSubscriber(); + var msg = JsonConvert.SerializeObject(data); + + await sub.PublishAsync(Credentials.RedisKey() + "_shardcoord_send", msg).ConfigureAwait(false); await Task.Delay(5000); } }); @@ -139,35 +131,64 @@ namespace NadekoBot IBotConfigProvider botConfigProvider = new BotConfigProvider(_db, _botConfig); - //var localization = new Localization(_botConfig.Locale, AllGuildConfigs.ToDictionary(x => x.GuildId, x => x.Locale), Db); - //initialize Services - Services = new NServiceProvider.ServiceProviderBuilder() + Services = new NServiceProvider() .AddManual(Credentials) .AddManual(_db) .AddManual(Client) .AddManual(CommandService) .AddManual(botConfigProvider) - //.AddManual(localization) - .AddManual>(AllGuildConfigs) //todo wrap this .AddManual(this) .AddManual(uow) - .AddManual(new RedisCache(Client.CurrentUser.Id)) - .LoadFrom(Assembly.GetEntryAssembly()) - .Build(); + .AddManual(Cache); + + Services.LoadFrom(Assembly.GetAssembly(typeof(CommandHandler))); var commandHandler = Services.GetService(); commandHandler.AddServices(Services); - //setup typereaders - CommandService.AddTypeReader(new PermissionActionTypeReader()); - CommandService.AddTypeReader(new CommandTypeReader()); - CommandService.AddTypeReader(new CommandOrCrTypeReader()); - CommandService.AddTypeReader(new ModuleTypeReader(CommandService)); - CommandService.AddTypeReader(new ModuleOrCrTypeReader(CommandService)); - CommandService.AddTypeReader(new GuildTypeReader(Client)); - CommandService.AddTypeReader(new GuildDateTimeTypeReader()); + LoadTypeReaders(typeof(NadekoBot).Assembly); } + Services.Unload(typeof(IUnitOfWork)); // unload it after the startup + } + + private IEnumerable LoadTypeReaders(Assembly assembly) + { + Type[] allTypes; + try + { + allTypes = assembly.GetTypes(); + } + catch (ReflectionTypeLoadException ex) + { + Console.WriteLine(ex.LoaderExceptions[0]); + return Enumerable.Empty(); + } + var filteredTypes = allTypes + .Where(x => x.IsSubclassOf(typeof(TypeReader)) + && x.BaseType.GetGenericArguments().Length > 0 + && !x.IsAbstract); + + var toReturn = new List(); + foreach (var ft in filteredTypes) + { + var x = (TypeReader)Activator.CreateInstance(ft, Client, CommandService); + var baseType = ft.BaseType; + var typeArgs = baseType.GetGenericArguments(); + try + { + CommandService.AddTypeReader(typeArgs[0], x); + } + catch (Exception ex) + { + _log.Error(ex); + throw; + } + toReturn.Add(x); + //_log.Info("Loaded {0} typereader.", x.GetType().Name); + } + + return toReturn; } private async Task LoginAsync(string token) @@ -192,7 +213,7 @@ namespace NadekoBot } finally { - + } }); return Task.CompletedTask; @@ -224,15 +245,20 @@ namespace NadekoBot public async Task RunAsync(params string[] args) { - if(Client.ShardId == 0) - _log.Info("Starting NadekoBot v" + StatsService.BotVersion); - var sw = Stopwatch.StartNew(); await LoginAsync(Credentials.Token).ConfigureAwait(false); _log.Info($"Shard {Client.ShardId} loading services..."); - AddServices(); + try + { + AddServices(); + } + catch (Exception ex) + { + _log.Error(ex); + throw; + } sw.Stop(); _log.Info($"Shard {Client.ShardId} connected in {sw.Elapsed.TotalSeconds:F2}s"); @@ -254,7 +280,7 @@ namespace NadekoBot #endif //unload modules which are not available on the public bot - if(isPublicNadeko) + if (isPublicNadeko) CommandService .Modules .ToArray() @@ -263,8 +289,8 @@ namespace NadekoBot Ready.TrySetResult(true); HandleStatusChanges(); + StartSendingData(); _log.Info($"Shard {Client.ShardId} ready."); - //_log.Info(await stats.Print().ConfigureAwait(false)); } private Task Client_Log(LogMessage arg) @@ -279,13 +305,7 @@ namespace NadekoBot public async Task RunAndBlockAsync(params string[] args) { await RunAsync(args).ConfigureAwait(false); - StartSendingData(); - if (ShardCoord != null) - await ShardCoord.RunAndBlockAsync(); - else - { - await Task.Delay(-1).ConfigureAwait(false); - } + await Task.Delay(-1).ConfigureAwait(false); } private void TerribleElevatedPermissionCheck() @@ -303,13 +323,8 @@ namespace NadekoBot } } - private void SetupShard(int parentProcessId, int port) + private void SetupShard(int parentProcessId) { - if (Client.ShardId == 0) - { - ShardCoord = new ShardsCoordinator(port); - return; - } new Thread(new ThreadStart(() => { try @@ -371,5 +386,114 @@ namespace NadekoBot var sub = Services.GetService().Redis.GetSubscriber(); return sub.PublishAsync(Client.CurrentUser.Id + "_status.game_set", JsonConvert.SerializeObject(obj)); } + + //private readonly Dictionary Modules, IEnumerable Types)> _loadedPackages = new Dictionary, IEnumerable)>(); + //private readonly SemaphoreSlim _packageLocker = new SemaphoreSlim(1, 1); + //public IEnumerable LoadedPackages => _loadedPackages.Keys; + + ///// + ///// Unloads a package + ///// + ///// Package name. Case sensitive. + ///// Whether the unload is successful. + //public async Task UnloadPackage(string name) + //{ + // await _packageLocker.WaitAsync().ConfigureAwait(false); + // try + // { + // if (!_loadedPackages.Remove(name, out var data)) + // return false; + + // var modules = data.Modules; + // var types = data.Types; + + // var i = 0; + // foreach (var m in modules) + // { + // await CommandService.RemoveModuleAsync(m).ConfigureAwait(false); + // i++; + // } + // _log.Info("Unloaded {0} modules.", i); + + // if (types != null && types.Any()) + // { + // i = 0; + // foreach (var t in types) + // { + // var obj = Services.Unload(t); + // if (obj is IUnloadableService s) + // await s.Unload().ConfigureAwait(false); + // i++; + // } + + // _log.Info("Unloaded {0} types.", i); + // } + // using (var uow = _db.UnitOfWork) + // { + // uow.BotConfig.GetOrCreate().LoadedPackages.Remove(new LoadedPackage + // { + // Name = name, + // }); + // } + // return true; + // } + // finally + // { + // _packageLocker.Release(); + // } + //} + ///// + ///// Loads a package + ///// + ///// Name of the package to load. Case sensitive. + ///// Whether the load is successful. + //public async Task LoadPackage(string name) + //{ + // await _packageLocker.WaitAsync().ConfigureAwait(false); + // try + // { + // if (_loadedPackages.ContainsKey(name)) + // return false; + + // var startingGuildIdList = Client.Guilds.Select(x => (long)x.Id).ToList(); + // using (var uow = _db.UnitOfWork) + // { + // AllGuildConfigs = uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList).ToImmutableArray(); + // } + + // var domain = new Context(); + // var package = domain.LoadFromAssemblyPath(Path.Combine(AppContext.BaseDirectory, + // "modules", + // $"NadekoBot.Modules.{name}", + // $"NadekoBot.Modules.{name}.dll")); + // //var package = Assembly.LoadFile(Path.Combine(AppContext.BaseDirectory, + // // "modules", + // // $"NadekoBot.Modules.{name}", + // // $"NadekoBot.Modules.{name}.dll")); + // var types = Services.LoadFrom(package); + // var added = await CommandService.AddModulesAsync(package).ConfigureAwait(false); + // var trs = LoadTypeReaders(package); + // /* i don't have to unload typereaders + // * (and there's no api for it) + // * because they get overwritten anyway, and since + // * the only time I'd unload typereaders, is when unloading a module + // * which means they won't have a chance to be used + // * */ + // _log.Info("Loaded {0} modules and {1} types.", added.Count(), types.Count()); + // _loadedPackages.Add(name, (added, types)); + // using (var uow = _db.UnitOfWork) + // { + // uow.BotConfig.GetOrCreate().LoadedPackages.Add(new LoadedPackage + // { + // Name = name, + // }); + // } + // return true; + // } + // finally + // { + // _packageLocker.Release(); + // } + //} } } diff --git a/src/NadekoBot/Services/ServiceProvider.cs b/NadekoBot.Core/Services/ServiceProvider.cs similarity index 54% rename from src/NadekoBot/Services/ServiceProvider.cs rename to NadekoBot.Core/Services/ServiceProvider.cs index 6efe0a2b..748452c0 100644 --- a/src/NadekoBot/Services/ServiceProvider.cs +++ b/NadekoBot.Core/Services/ServiceProvider.cs @@ -1,6 +1,5 @@ using System; using System.Collections; -using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.Immutable; using System.Reflection; @@ -12,62 +11,98 @@ using NadekoBot.Common; #endif -namespace NadekoBot.Services +namespace NadekoBot.Core.Services { public interface INServiceProvider : IServiceProvider, IEnumerable { T GetService(); + IEnumerable LoadFrom(Assembly assembly); + INServiceProvider AddManual(T obj); + object Unload(Type t); } public class NServiceProvider : INServiceProvider { - public class ServiceProviderBuilder + private readonly object _locker = new object(); + private readonly Logger _log; + + public readonly Dictionary _services = new Dictionary(); + public IReadOnlyDictionary Services => _services; + + public NServiceProvider() { - private ConcurrentDictionary _dict = new ConcurrentDictionary(); - private readonly Logger _log; + _log = LogManager.GetCurrentClassLogger(); + } - public ServiceProviderBuilder() + public T GetService() + { + return (T)((IServiceProvider)(this)).GetService(typeof(T)); + } + + object IServiceProvider.GetService(Type serviceType) + { + _services.TryGetValue(serviceType, out var toReturn); + return toReturn; + } + + public INServiceProvider AddManual(T obj) + { + lock (_locker) { - _log = LogManager.GetCurrentClassLogger(); + _services.TryAdd(typeof(T), obj); } + return this; + } - public ServiceProviderBuilder AddManual(T obj) + public INServiceProvider UpdateManual(T obj) + { + lock (_locker) { - _dict.TryAdd(typeof(T), obj); - return this; + _services.Remove(typeof(T)); + _services.TryAdd(typeof(T), obj); } + return this; + } - public NServiceProvider Build() + public IEnumerable LoadFrom(Assembly assembly) + { + List addedTypes = new List(); + + Type[] allTypes; + try { - return new NServiceProvider(_dict); + allTypes = assembly.GetTypes(); } - - public ServiceProviderBuilder LoadFrom(Assembly assembly) + catch (ReflectionTypeLoadException ex) { - var allTypes = assembly.GetTypes(); - var services = new Queue(allTypes - .Where(x => x.GetInterfaces().Contains(typeof(INService)) - && !x.GetTypeInfo().IsInterface && !x.GetTypeInfo().IsAbstract - + Console.WriteLine(ex.LoaderExceptions[0]); + return Enumerable.Empty(); + } + var services = new Queue(allTypes + .Where(x => x.GetInterfaces().Contains(typeof(INService)) + && !x.GetTypeInfo().IsInterface && !x.GetTypeInfo().IsAbstract #if GLOBAL_NADEKO - && x.GetTypeInfo().GetCustomAttribute() == null + && x.GetTypeInfo().GetCustomAttribute() == null #endif ) - .ToArray()); + .ToArray()); - var interfaces = new HashSet(allTypes - .Where(x => x.GetInterfaces().Contains(typeof(INService)) - && x.GetTypeInfo().IsInterface)); + addedTypes.AddRange(services); - var alreadyFailed = new Dictionary(); + var interfaces = new HashSet(allTypes + .Where(x => x.GetInterfaces().Contains(typeof(INService)) + && x.GetTypeInfo().IsInterface)); + var alreadyFailed = new Dictionary(); + lock (_locker) + { var sw = Stopwatch.StartNew(); var swInstance = new Stopwatch(); while (services.Count > 0) { var type = services.Dequeue(); //get a type i need to make an instance of - if (_dict.TryGetValue(type, out _)) // if that type is already instantiated, skip + if (_services.TryGetValue(type, out _)) // if that type is already instantiated, skip continue; var ctor = type.GetConstructors()[0]; @@ -79,7 +114,7 @@ namespace NadekoBot.Services var args = new List(argTypes.Length); foreach (var arg in argTypes) //get constructor arguments from the dictionary of already instantiated types { - if (_dict.TryGetValue(arg, out var argObj)) //if i got current one, add it to the list of instances and move on + if (_services.TryGetValue(arg, out var argObj)) //if i got current one, add it to the list of instances and move on args.Add(argObj); else //if i failed getting it, add it to the end, and break { @@ -97,7 +132,7 @@ namespace NadekoBot.Services } if (args.Count != argTypes.Length) continue; - // _log.Info("Loading " + type.Name); + swInstance.Restart(); var instance = ctor.Invoke(args.ToArray()); swInstance.Stop(); @@ -105,38 +140,34 @@ namespace NadekoBot.Services _log.Info($"{type.Name} took {swInstance.Elapsed.TotalSeconds:F2}s to load."); var interfaceType = interfaces.FirstOrDefault(x => instance.GetType().GetInterfaces().Contains(x)); if (interfaceType != null) - _dict.TryAdd(interfaceType, instance); + { + addedTypes.Add(interfaceType); + _services.TryAdd(interfaceType, instance); + } - _dict.TryAdd(type, instance); + _services.TryAdd(type, instance); } sw.Stop(); _log.Info($"All services loaded in {sw.Elapsed.TotalSeconds:F2}s"); - - return this; } + return addedTypes; } - private readonly ImmutableDictionary _services; - - private NServiceProvider() { } - public NServiceProvider(IDictionary services) + public object Unload(Type t) { - this._services = services.ToImmutableDictionary(); - } - - public T GetService() - { - return (T)((IServiceProvider)(this)).GetService(typeof(T)); - } - - object IServiceProvider.GetService(Type serviceType) - { - _services.TryGetValue(serviceType, out var toReturn); - return toReturn; + lock (_locker) + { + if (_services.TryGetValue(t, out var obj)) + { + _services.Remove(t); + return obj; + } + } + return null; } IEnumerator IEnumerable.GetEnumerator() => _services.Values.GetEnumerator(); public IEnumerator GetEnumerator() => _services.Values.GetEnumerator(); } -} +} \ No newline at end of file diff --git a/NadekoBot.Core/Services/ShardsCoordinator.cs b/NadekoBot.Core/Services/ShardsCoordinator.cs new file mode 100644 index 00000000..645bff1f --- /dev/null +++ b/NadekoBot.Core/Services/ShardsCoordinator.cs @@ -0,0 +1,157 @@ +using NadekoBot.Core.Services.Impl; +using NLog; +using System; +using System.Diagnostics; +using System.Threading.Tasks; +using NadekoBot.Common.ShardCom; +using StackExchange.Redis; +using Newtonsoft.Json; +using NadekoBot.Extensions; + +namespace NadekoBot.Core.Services +{ + public class ShardsCoordinator + { + private readonly BotCredentials _creds; + private readonly string _key; + private readonly Process[] _shardProcesses; + + private readonly Logger _log; + private readonly int _curProcessId; + private readonly ConnectionMultiplexer _redis; + private ShardComMessage _defaultShardState; + + public ShardsCoordinator() + { + //load main stuff + LogSetup.SetupLogger(); + _log = LogManager.GetCurrentClassLogger(); + _creds = new BotCredentials(); + + _log.Info("Starting NadekoBot v" + StatsService.BotVersion); + + _key = _creds.RedisKey(); + _redis = ConnectionMultiplexer.Connect("127.0.0.1"); + + //setup initial shard statuses + _defaultShardState = new ShardComMessage() + { + ConnectionState = Discord.ConnectionState.Disconnected, + Guilds = 0, + Time = DateTime.Now - TimeSpan.FromMinutes(1) + }; + var db = _redis.GetDatabase(); + _shardProcesses = new Process[_creds.TotalShards]; + for (int i = 0; i < _creds.TotalShards; i++) + { + _defaultShardState.ShardId = i; + db.ListRightPush(_key + "_shardstats", + JsonConvert.SerializeObject(_defaultShardState), + flags: CommandFlags.FireAndForget); + } + + _curProcessId = Process.GetCurrentProcess().Id; + + _redis = ConnectionMultiplexer.Connect("127.0.0.1"); + var sub = _redis.GetSubscriber(); + sub.Subscribe(_key + "_shardcoord_send", + OnDataReceived, + CommandFlags.FireAndForget); + + sub.Subscribe(_key + "_shardcoord_restart", + OnRestart, + CommandFlags.FireAndForget); + + sub.Subscribe(_key + "_shardcoord_stop", + OnStop, + CommandFlags.FireAndForget); + } + + private void OnStop(RedisChannel ch, RedisValue data) + { + var shardId = JsonConvert.DeserializeObject(data); + var db = _redis.GetDatabase(); + _defaultShardState.ShardId = shardId; + db.ListSetByIndex(_key + "_shardstats", + shardId, + JsonConvert.SerializeObject(_defaultShardState), + CommandFlags.FireAndForget); + var p = _shardProcesses[shardId]; + _shardProcesses[shardId] = null; + try { p?.Kill(); } catch { } + try { p?.Dispose(); } catch { } + } + + private void OnRestart(RedisChannel ch, RedisValue data) + { + OnStop(ch, data); + var shardId = JsonConvert.DeserializeObject(data); + _shardProcesses[shardId] = StartShard(shardId); + } + + private void OnDataReceived(RedisChannel ch, RedisValue data) + { + var msg = JsonConvert.DeserializeObject(data); + if (msg == null) + return; + var db = _redis.GetDatabase(); + db.ListSetByIndex(_key + "_shardstats", + msg.ShardId, + data, + CommandFlags.FireAndForget); + if (msg.ConnectionState == Discord.ConnectionState.Disconnected + || msg.ConnectionState == Discord.ConnectionState.Disconnecting) + { + _log.Error("!!! SHARD {0} IS IN {1} STATE !!!", msg.ShardId, msg.ConnectionState.ToString()); + } + return; + } + + public async Task RunAsync() + { + int i = 0; +#if DEBUG + i = 1; +#endif + + for (; i < _creds.TotalShards; i++) + { + var p = StartShard(i); + + _shardProcesses[i] = p; + await Task.Delay(6000); + } + } + + private Process StartShard(int shardId) + { + return Process.Start(new ProcessStartInfo() + { + FileName = _creds.ShardRunCommand, + Arguments = string.Format(_creds.ShardRunArguments, shardId, _curProcessId, "") + }); + // last "" in format is for backwards compatibility + // because current startup commands have {2} in them probably + } + + public async Task RunAndBlockAsync() + { + try + { + await RunAsync().ConfigureAwait(false); + } + catch (Exception ex) + { + _log.Error(ex); + foreach (var p in _shardProcesses) + { + try { p.Kill(); } catch { } + try { p.Dispose(); } catch { } + } + return; + } + + await Task.Delay(-1); + } + } +} diff --git a/NadekoBot.Core/Services/StandardConversions.cs b/NadekoBot.Core/Services/StandardConversions.cs new file mode 100644 index 00000000..77662da7 --- /dev/null +++ b/NadekoBot.Core/Services/StandardConversions.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NadekoBot.Core.Services +{ + public class StandardConversions + { + public static double CelsiusToFahrenheit(double cel) + { + return cel * 1.8f + 32; + } + } +} diff --git a/src/NadekoBot/_Extensions/Extensions.cs b/NadekoBot.Core/_Extensions/Extensions.cs similarity index 78% rename from src/NadekoBot/_Extensions/Extensions.cs rename to NadekoBot.Core/_Extensions/Extensions.cs index d1bd796b..ff22382a 100644 --- a/src/NadekoBot/_Extensions/Extensions.cs +++ b/NadekoBot.Core/_Extensions/Extensions.cs @@ -2,7 +2,6 @@ using Discord.Commands; using Discord.WebSocket; using ImageSharp; -using NadekoBot.Services.Discord; using Newtonsoft.Json; using System; using System.Collections.Concurrent; @@ -16,11 +15,54 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using NadekoBot.Common.Collections; using SixLabors.Primitives; +using NadekoBot.Common; +using NadekoBot.Core.Services; +using SixLabors.Shapes; +using System.Numerics; namespace NadekoBot.Extensions { public static class Extensions { + // https://github.com/SixLabors/ImageSharp/tree/master/samples/AvatarWithRoundedCorner + public static void ApplyRoundedCorners(this Image img, float cornerRadius) + { + var corners = BuildCorners(img.Width, img.Height, cornerRadius); + // now we have our corners time to draw them + img.Fill(Rgba32.Transparent, corners, new GraphicsOptions(true) + { + BlenderMode = ImageSharp.PixelFormats.PixelBlenderMode.Src // enforces that any part of this shape that has color is punched out of the background + }); + } + + public static IPathCollection BuildCorners(int imageWidth, int imageHeight, float cornerRadius) + { + // first create a square + var rect = new RectangularePolygon(-0.5f, -0.5f, cornerRadius, cornerRadius); + + // then cut out of the square a circle so we are left with a corner + var cornerToptLeft = rect.Clip(new EllipsePolygon(cornerRadius - 0.5f, cornerRadius - 0.5f, cornerRadius)); + + // corner is now a corner shape positions top left + //lets make 3 more positioned correctly, we can do that by translating the orgional around the center of the image + var center = new Vector2(imageWidth / 2, imageHeight / 2); + + float rightPos = imageWidth - cornerToptLeft.Bounds.Width + 1; + float bottomPos = imageHeight - cornerToptLeft.Bounds.Height + 1; + + // move it across the width of the image - the width of the shape + var cornerTopRight = cornerToptLeft.RotateDegree(90).Translate(rightPos, 0); + var cornerBottomLeft = cornerToptLeft.RotateDegree(-90).Translate(0, bottomPos); + var cornerBottomRight = cornerToptLeft.RotateDegree(180).Translate(rightPos, bottomPos); + + return new PathCollection(cornerToptLeft, cornerBottomLeft, cornerTopRight, cornerBottomRight); + } + + public static string RedisKey(this IBotCredentials bc) + { + return bc.Token.Substring(0, 10); + } + public static async Task ReplaceAsync(this Regex regex, string input, Func> replacementFn) { var sb = new StringBuilder(); @@ -208,7 +250,7 @@ namespace NadekoBot.Extensions var xOffset = 0; for (int i = 0; i < imgs.Length; i++) { - canvas.DrawImage(imgs[i], 100, default(Size), new Point(xOffset, 0)); + canvas.DrawImage(imgs[i], 100, default, new Point(xOffset, 0)); xOffset += imgs[i].Bounds.Width; } diff --git a/src/NadekoBot/_Extensions/IEnumerableExtensions.cs b/NadekoBot.Core/_Extensions/IEnumerableExtensions.cs similarity index 100% rename from src/NadekoBot/_Extensions/IEnumerableExtensions.cs rename to NadekoBot.Core/_Extensions/IEnumerableExtensions.cs diff --git a/src/NadekoBot/_Extensions/IMessageChannelExtensions.cs b/NadekoBot.Core/_Extensions/IMessageChannelExtensions.cs similarity index 92% rename from src/NadekoBot/_Extensions/IMessageChannelExtensions.cs rename to NadekoBot.Core/_Extensions/IMessageChannelExtensions.cs index 992d7453..343dbfed 100644 --- a/src/NadekoBot/_Extensions/IMessageChannelExtensions.cs +++ b/NadekoBot.Core/_Extensions/IMessageChannelExtensions.cs @@ -55,15 +55,17 @@ namespace NadekoBot.Extensions private static readonly IEmote arrow_left = new Emoji("⬅"); private static readonly IEmote arrow_right = new Emoji("➡"); - public static Task SendPaginatedConfirmAsync(this IMessageChannel channel, DiscordSocketClient client, int currentPage, Func pageFunc, int? lastPage = null, bool addPaginatedFooter = true) => - channel.SendPaginatedConfirmAsync(client, currentPage, (x) => Task.FromResult(pageFunc(x)), lastPage, addPaginatedFooter); + public static Task SendPaginatedConfirmAsync(this IMessageChannel channel, DiscordSocketClient client, int currentPage, Func pageFunc, int totalElements, int itemsPerPage, bool addPaginatedFooter = true) => + channel.SendPaginatedConfirmAsync(client, currentPage, (x) => Task.FromResult(pageFunc(x)), totalElements, itemsPerPage, addPaginatedFooter); /// /// danny kamisama /// - public static async Task SendPaginatedConfirmAsync(this IMessageChannel channel, DiscordSocketClient client, int currentPage, Func> pageFunc, int? lastPage = null, bool addPaginatedFooter = true) + public static async Task SendPaginatedConfirmAsync(this IMessageChannel channel, DiscordSocketClient client, int currentPage, Func> pageFunc, int totalElements, int itemsPerPage, bool addPaginatedFooter = true) { var embed = await pageFunc(currentPage).ConfigureAwait(false); + var lastPage = (totalElements - 1) / itemsPerPage; + if (addPaginatedFooter) embed.AddPaginatedFooter(currentPage, lastPage); @@ -72,7 +74,6 @@ namespace NadekoBot.Extensions if (lastPage == 0) return; - await msg.AddReactionAsync(arrow_left).ConfigureAwait(false); await msg.AddReactionAsync(arrow_right).ConfigureAwait(false); @@ -93,7 +94,7 @@ namespace NadekoBot.Extensions } else if (r.Emote.Name == arrow_right.Name) { - if (lastPage == null || lastPage > currentPage) + if (lastPage > currentPage) { var toSend = await pageFunc(++currentPage).ConfigureAwait(false); if (addPaginatedFooter) diff --git a/src/NadekoBot/_Extensions/IUserExtensions.cs b/NadekoBot.Core/_Extensions/IUserExtensions.cs similarity index 95% rename from src/NadekoBot/_Extensions/IUserExtensions.cs rename to NadekoBot.Core/_Extensions/IUserExtensions.cs index 89650f21..36a7f9e5 100644 --- a/src/NadekoBot/_Extensions/IUserExtensions.cs +++ b/NadekoBot.Core/_Extensions/IUserExtensions.cs @@ -1,5 +1,5 @@ using Discord; -using NadekoBot.Services.Database.Models; +using NadekoBot.Core.Services.Database.Models; using System; using System.IO; using System.Threading.Tasks; @@ -44,6 +44,6 @@ namespace NadekoBot.Extensions public static string RealAvatarUrl(this DiscordUser usr) => usr.AvatarId.StartsWith("a_") ? $"{DiscordConfig.CDNUrl}avatars/{usr.UserId}/{usr.AvatarId}.gif" - : $"{DiscordConfig.CDNUrl}avatars/{usr.UserId}/{usr.AvatarId}.png"; + : ((IUser)usr).GetAvatarUrl(ImageFormat.Auto); } } diff --git a/src/NadekoBot/_Extensions/MusicExtensions.cs b/NadekoBot.Core/_Extensions/MusicExtensions.cs similarity index 100% rename from src/NadekoBot/_Extensions/MusicExtensions.cs rename to NadekoBot.Core/_Extensions/MusicExtensions.cs diff --git a/src/NadekoBot/_Extensions/NumberExtensions.cs b/NadekoBot.Core/_Extensions/NumberExtensions.cs similarity index 100% rename from src/NadekoBot/_Extensions/NumberExtensions.cs rename to NadekoBot.Core/_Extensions/NumberExtensions.cs diff --git a/src/NadekoBot/_Extensions/StringExtensions.cs b/NadekoBot.Core/_Extensions/StringExtensions.cs similarity index 97% rename from src/NadekoBot/_Extensions/StringExtensions.cs rename to NadekoBot.Core/_Extensions/StringExtensions.cs index 0b7adf65..0f4edc5d 100644 --- a/src/NadekoBot/_Extensions/StringExtensions.cs +++ b/NadekoBot.Core/_Extensions/StringExtensions.cs @@ -1,4 +1,5 @@ -using System; +using Newtonsoft.Json; +using System; using System.IO; using System.Linq; using System.Text; @@ -9,6 +10,9 @@ namespace NadekoBot.Extensions { public static class StringExtensions { + public static T MapJson(this string str) + => JsonConvert.DeserializeObject(str); + public static string StripHTML(this string input) { return Regex.Replace(input, "<.*?>", String.Empty); diff --git a/src/NadekoBot/_libs/32/libsodium.dll b/NadekoBot.Core/_libs/32/libsodium.dll similarity index 100% rename from src/NadekoBot/_libs/32/libsodium.dll rename to NadekoBot.Core/_libs/32/libsodium.dll diff --git a/src/NadekoBot/_libs/32/opus.dll b/NadekoBot.Core/_libs/32/opus.dll similarity index 100% rename from src/NadekoBot/_libs/32/opus.dll rename to NadekoBot.Core/_libs/32/opus.dll diff --git a/src/NadekoBot/_libs/64/libsodium.dll b/NadekoBot.Core/_libs/64/libsodium.dll similarity index 100% rename from src/NadekoBot/_libs/64/libsodium.dll rename to NadekoBot.Core/_libs/64/libsodium.dll diff --git a/src/NadekoBot/_libs/64/opus.dll b/NadekoBot.Core/_libs/64/opus.dll similarity index 100% rename from src/NadekoBot/_libs/64/opus.dll rename to NadekoBot.Core/_libs/64/opus.dll diff --git a/NadekoBot.sln b/NadekoBot.sln index 42b343e5..ea86b972 100644 --- a/NadekoBot.sln +++ b/NadekoBot.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26730.3 +VisualStudioVersion = 15.0.26730.16 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{04929013-5BAB-42B0-B9B2-8F2BB8F16AF2}" EndProject @@ -13,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot", "src\NadekoBot\NadekoBot.csproj", "{45EC1473-C678-4857-A544-07DFE0D0B478}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot.Core", "NadekoBot.Core\NadekoBot.Core.csproj", "{A6CCEFBD-DCF2-482C-9643-47664683548F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -26,12 +28,19 @@ Global {45EC1473-C678-4857-A544-07DFE0D0B478}.GlobalNadeko|Any CPU.Build.0 = Release|Any CPU {45EC1473-C678-4857-A544-07DFE0D0B478}.Release|Any CPU.ActiveCfg = Release|Any CPU {45EC1473-C678-4857-A544-07DFE0D0B478}.Release|Any CPU.Build.0 = Release|Any CPU + {A6CCEFBD-DCF2-482C-9643-47664683548F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6CCEFBD-DCF2-482C-9643-47664683548F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6CCEFBD-DCF2-482C-9643-47664683548F}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU + {A6CCEFBD-DCF2-482C-9643-47664683548F}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU + {A6CCEFBD-DCF2-482C-9643-47664683548F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6CCEFBD-DCF2-482C-9643-47664683548F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {45EC1473-C678-4857-A544-07DFE0D0B478} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} + {A6CCEFBD-DCF2-482C-9643-47664683548F} = {04929013-5BAB-42B0-B9B2-8F2BB8F16AF2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5F3F555C-855F-4BE8-B526-D062D3E8ACA4} diff --git a/docs/Commands List.md b/docs/Commands List.md index c6f13267..d000b511 100644 --- a/docs/Commands List.md +++ b/docs/Commands List.md @@ -38,6 +38,11 @@ Commands and aliases | Description | Usage `.donators` | List of the lovely people who donated to keep this project alive. | `.donators` `.donadd` | Add a donator to the database. **Bot owner only** | `.donadd Donate Amount` `.autoassignrole` `.aar` | Automaticaly assigns a specified role to every user who joins the server. **Requires ManageRoles server permission.** | `.aar to disable` or `.aar Role Name to enable` +`.execsql` | Executes an sql command and returns the number of affected rows. Dangerous. **Bot owner only** | `.execsql UPDATE Currency SET Amount=Amount+1234` +`.deletewaifus` | Deletes everything from WaifuUpdates and WaifuInfo tables. **Bot owner only** | `.deletewaifus` +`.deletecurrency` | Deletes everything from Currency and CurrencyTransactions. **Bot owner only** | `.deletecurrency` +`.deleteplaylists` | Deletes everything from MusicPlaylists. **Bot owner only** | `.deleteplaylists` +`.deleteexp` | deleteexp **Bot owner only** | `deleteexp` `.gvc` | 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. **Requires Administrator server permission.** | `.gvc` `.languageset` `.langset` | 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 arguments to see currently set language. | `.langset de-DE ` or `.langset default` `.langsetdefault` `.langsetd` | 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 arguments to see currently set language. | `.langsetd en-US` or `.langsetd default` @@ -46,7 +51,6 @@ Commands and aliases | Description | Usage `.logignore` | Toggles whether the `.logserver` command ignores this channel. Useful if you have hidden admin channel and public log channel. **Requires Administrator server permission.** **Bot owner only** | `.logignore` `.logevents` | Shows a list of all events you can subscribe to with `.log` **Requires Administrator server permission.** **Bot owner only** | `.logevents` `.log` | 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. **Requires Administrator server permission.** **Bot owner only** | `.log userpresence` or `.log userbanned` -`.migratedata` | Migrate data from old bot configuration **Bot owner only** | `.migratedata` `.setmuterole` | Sets a name of the role which will be assigned to people who should be muted. Default is nadeko-mute. **Requires ManageRoles server permission.** | `.setmuterole Silenced` `.mute` | Mutes a mentioned user both from speaking and chatting. You can also specify time in minutes (up to 1440) for how long the user should be muted. **Requires ManageRoles server permission.** **Requires MuteMembers server permission.** | `.mute @Someone` or `.mute 30 @Someone` `.unmute` | Unmutes a mentioned user previously muted with `.mute` command. **Requires ManageRoles server permission.** **Requires MuteMembers server permission.** | `.unmute @Someone` @@ -61,17 +65,17 @@ Commands and aliases | Description | Usage `.prefix` | Sets this server's prefix for all bot commands. Provide no arguments to see the current server prefix. | `.prefix +` `.defprefix` | Sets bot's default prefix for all bot commands. Provide no arguments to see the current default prefix. This will not change this server's current prefix. **Bot owner only** | `.defprefix +` `.antiraid` | Sets an anti-raid protection on the server. First argument is number of people which will trigger the protection. Second one is a time interval in which that number of people needs to join in order to trigger the protection, and third argument is punishment for those people (Kick, Ban, Mute) **Requires Administrator server permission.** | `.antiraid 5 20 Kick` -`.antispam` | Stops people from repeating same message X times in a row. You can specify to either mute, kick or ban the offenders. Max message count is 10. **Requires Administrator server permission.** | `.antispam 3 Mute` or `.antispam 4 Kick` or `.antispam 6 Ban` +`.antispam` | Stops people from repeating same message X times in a row. You can specify to either mute, kick or ban the offenders. If you're using mute, you can add a number of seconds at the end to use a timed mute. Max message count is 10. **Requires Administrator server permission.** | `.antispam 3 Mute` or `.antispam 4 Kick` or `.antispam 6 Ban` `.antispamignore` | Toggles whether antispam ignores current channel. Antispam must be enabled. **Requires Administrator server permission.** | `.antispamignore` `.antilist` `.antilst` | Shows currently enabled protection features. | `.antilist` `.prune` `.clear` | `.prune` removes all Nadeko'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. | `.prune` or `.prune 5` or `.prune @Someone` or `.prune @Someone X` `.slowmode` | Toggles slowmode. Disable by specifying no parameters. To enable, specify a number of messages each user can send, and an interval in seconds. For example 1 message every 5 seconds. **Requires ManageMessages server permission.** | `.slowmode 1 5` or `.slowmode` `.slowmodewl` | Ignores a role or a user from the slowmode feature. **Requires ManageMessages server permission.** | `.slowmodewl SomeRole` or `.slowmodewl AdminDude` `.adsarm` | Toggles the automatic deletion of confirmations for `.iam` and `.iamn` commands. **Requires ManageMessages server permission.** | `.adsarm` -`.asar` | Adds a role to the list of self-assignable roles. **Requires ManageRoles server permission.** | `.asar Gamer` +`.asar` | Adds a role to the list of self-assignable roles. You can also specify a group. If 'Exclusive self-assignable roles' feature is enabled, users will be able to pick one role per group. **Requires ManageRoles server permission.** | `.asar Gamer` or `.asar 1 Alliance` or `.asar 1 Horde` `.rsar` | Removes a specified role from the list of self-assignable roles. **Requires ManageRoles server permission.** | `.rsar` `.lsar` | Lists all self-assignable roles. | `.lsar` -`.togglexclsar` `.tesar` | Toggles whether the self-assigned roles are exclusive. (So that any person can have only one of the self assignable roles) **Requires ManageRoles server permission.** | `.tesar` +`.togglexclsar` `.tesar` | Toggles whether the self-assigned roles are exclusive. While enabled, users can only have one self-assignable role per group. **Requires ManageRoles server permission.** | `.tesar` `.iam` | Adds a role to you that you choose. Role must be on a list of self-assignable roles. | `.iam Gamer` `.iamnot` `.iamn` | Removes a specified role from you. Role must be on a list of self-assignable roles. | `.iamn Gamer` `.scadd` | 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. **Bot owner only** | `.scadd .stats` @@ -81,8 +85,11 @@ Commands and aliases | Description | Usage `.scclr` | Removes all startup commands. **Bot owner only** | `.scclr` `.fwmsgs` | Toggles forwarding of non-command messages sent to bot's DM to the bot owners **Bot owner only** | `.fwmsgs` `.fwtoall` | Toggles whether messages will be forwarded to all bot owners or only to the first one specified in the credentials.json file **Bot owner only** | `.fwtoall` +`.shardstats` | Stats for shards. Paginated with 25 shards per page. | `.shardstats` or `.shardstats 2` +`.restartshard` | 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. **Bot owner only** | `.restartshard 2` `.leave` | Makes Nadeko leave the server. Either server name or server ID is required. **Bot owner only** | `.leave 123123123331` `.die` | Shuts the bot down. **Bot owner only** | `.die` +`.restart` | Restarts the bot. Might not work. **Bot owner only** | `.restart` `.setname` `.newnm` | Gives the bot a new name. **Bot owner only** | `.newnm BotName` `.setnick` | Changes the nickname of the bot on this server. You can also target other users to change their nickname. **Requires ManageNicknames server permission.** | `.setnick BotNickname` or `.setnick @SomeUser New Nickname` `.setstatus` | Sets the bot's status. (Online/Idle/Dnd/Invisible) **Bot owner only** | `.setstatus Idle` @@ -122,6 +129,7 @@ Commands and aliases | Description | Usage Commands and aliases | Description | Usage ----------------|--------------|------- `.addcustreact` `.acr` | Add a custom reaction with a trigger and a response. Running this command in server requires the Administration permission. Running this command in DM is Bot Owner only and adds a new global custom reaction. Guide here: | `.acr "hello" Hi there %user%` +`.editcustreact` `.ecr` | Edits the custom reaction's response given its ID. | `.ecr 123 I'm a magical girl` `.listcustreact` `.lcr` | Lists global or server custom reactions (20 commands per page). Running the command in DM will list global custom reactions, while running it in server will list that server's custom reactions. Specifying `all` argument instead of the number will DM you a text file with a list of all custom reactions. | `.lcr 1` or `.lcr all` `.listcustreactg` `.lcrg` | Lists global or server custom reactions (20 commands per page) grouped by trigger, and show a number of responses for each. Running the command in DM will list global custom reactions, while running it in server will list that server's custom reactions. | `.lcrg 1` `.showcustreact` `.scr` | Shows a custom reaction's response on a given ID. | `.scr 1` @@ -147,9 +155,10 @@ Commands and aliases | Description | Usage `.race` | Starts a new animal race. | `.race` `.joinrace` `.jr` | Joins a new race. You can specify an amount of currency for betting (optional). You will get YourBet*(participants-1) back if you win. | `.jr` or `.jr 5` `.startevent` | Starts one of the events seen on public nadeko. `reaction` and `sneakygamestatus` are the only 2 available now. **Bot owner only** | `.startevent reaction` +`.rafflecur` | 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. | `.rafflecur 20` or `.rafflecur mixed 15` `.roll` | 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. | `.roll` or `.roll 7` or `.roll 3d5` or `.roll 5dF` `.rolluo` | 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`. | `.rolluo` or `.rolluo 7` or `.rolluo 3d5` -`.nroll` | Rolls in a given range. | `.nroll 5` (rolls 0-5)` or `.nroll 5-15` +`.nroll` | Rolls in a given range. If you specify just one number instead of the range, it will role from 0 to that number. | `.nroll 5` or `.nroll 5-15` `.draw` | Draws a card from this server's deck. You can draw up to 10 cards by supplying a number of cards to draw. | `.draw` or `.draw 5` `.drawnew` | Draws a card from the NEW deck of cards. You can draw up to 10 cards by supplying a number of cards to draw. | `.drawnew` or `.drawnew 5` `.deckshuffle` `.dsh` | Reshuffles all cards back into the deck. | `.dsh` @@ -235,7 +244,7 @@ Commands and aliases | Description | Usage `.defvol` `.dv` | Sets the default music volume when music playback is started (0-100). Persists through restarts. | `.dv 80` `.songremove` `.srm` | Remove a song by its # in the queue, or 'all' to remove all songs from the queue and reset the song index. | `.srm 5` `.playlists` `.pls` | Lists all playlists. Paginated, 20 per page. Default page is 0. | `.pls 1` -`.deleteplaylist` `.delpls` | Deletes a saved playlist. Works only if you made it or if you are the bot owner. | `.delpls animu-5` +`.deleteplaylist` `.delpls` | Deletes a saved playlist using its id. Works only if you made it or if you are the bot owner. | `.delpls 5` `.save` | Saves a playlist under a certain name. Playlist name must be no longer than 20 characters and must not contain dashes. | `.save classical1` `.load` | Loads a saved playlist using its ID. Use `.pls` to list all saved playlists and `.save` to save new ones. | `.load 5` `.fairplay` `.fp` | Toggles fairplay. While enabled, the bot will prioritize songs from users who didn't have their song recently played instead of the song's position in the queue. | `.fp` @@ -334,6 +343,8 @@ Commands and aliases | Description | Usage Commands and aliases | Description | Usage ----------------|--------------|------- `.lolban` | Shows top banned champions ordered by ban rate. | `.lolban` +`.rip` | rip | `rip` +`.say` | Bot will send the message you typed in this channel. Supports embeds. **Requires ManageMessages server permission.** | `.say hi` `.weather` `.we` | Shows weather data for a specified city. You can also specify a country after a comma. | `.we Moscow, RU` `.time` | Shows the current time and timezone in the specified location. | `.time London, UK` `.youtube` `.yt` | Searches youtubes and shows the first result | `.yt query` @@ -408,7 +419,6 @@ Commands and aliases | Description | Usage `.roles` | List roles on this server or a roles of a specific user if specified. Paginated, 20 roles per page. | `.roles 2` or `.roles @Someone` `.channeltopic` `.ct` | Sends current channel's topic as a message. | `.ct` `.createinvite` `.crinv` | Creates a new invite which has infinite max uses and never expires. **Requires CreateInstantInvite channel permission.** | `.crinv` -`.shardstats` | Stats for shards. Paginated with 25 shards per page. | `.shardstats` or `.shardstats 2` `.stats` | Shows some basic stats for Nadeko. | `.stats` `.showemojis` `.se` | Shows a name and a link to every SPECIAL emoji in the message. | `.se A message full of SPECIAL emojis` `.listservers` | Lists servers the bot is on with some basic info. 15 per page. **Bot owner only** | `.listservers 3` @@ -423,7 +433,7 @@ Commands and aliases | Description | Usage `.channelinfo` `.cinfo` | Shows info about the channel. If no channel is supplied, it defaults to current one. | `.cinfo #some-channel` `.userinfo` `.uinfo` | Shows info about the user. If no user is supplied, it defaults a user running the command. | `.uinfo @SomeUser` `.activity` | Checks for spammers. **Bot owner only** | `.activity` -`.parewrel` | Forces the update of the list of patrons who are eligible for the reward. **Bot owner only** | `.parewrel` +`.parewrel` | Forces the update of the list of patrons who are eligible for the reward. | `.parewrel` `.clparew` | Claim patreon rewards. If you're subscribed to bot owner's patreon you can use this command to claim your rewards - assuming bot owner did setup has their patreon key. | `.clparew` `.listquotes` `.liqu` | Lists all quotes on the server ordered alphabetically. 15 Per page. | `.liqu` or `.liqu 3` `...` | Shows a random quote with a specified name. | `... abc` @@ -461,7 +471,7 @@ Commands and aliases | Description | Usage `.xpgleaderboard` `.xpglb` | Shows the global xp leaderboard. | `.xpglb` `.xpadd` | Adds xp to a user on the server. This does not affect their global ranking. You can use negative values. **Requires Administrator server permission.** | `.xpadd 100 @b1nzy` `.clubadmin` | Assigns (or unassigns) staff role to the member of the club. Admins can ban, kick and accept applications. | `.clubadmin` -`.clubcreate` | Creates a club. You must be atleast level 5 and not be in the club already. | `.clubcreate b1nzy's friends` +`.clubcreate` | Creates a club. You must be at least level 5 and not be in the club already. | `.clubcreate b1nzy's friends` `.clubicon` | Sets the club icon. | `.clubicon https://i.imgur.com/htfDMfU.png` `.clubinfo` | Shows information about the club. | `.clubinfo b1nzy's friends#123` `.clubbans` | Shows the list of users who have banned from your club. Paginated. You must be club owner to use this command. | `.clubbans 2` diff --git a/docs/Placeholders.md b/docs/Placeholders.md index a698d175..605d6093 100644 --- a/docs/Placeholders.md +++ b/docs/Placeholders.md @@ -19,6 +19,7 @@ Some features have their own specific placeholders which are noted in that featu - `%rngX-Y%` - Replace X and Y with the range (for example `%rng5-10%` - random between 5 and 10) - `%time%` - Bot time - `%server_time%` - Time on this server, set with `.timezone` command +- `%target%` - Used only in custom reactions, it shows the part of the message after the trigger **If you're using placeholders in embeds, don't use %user% and %mention% in titles, footers and field names. They will not show properly.** diff --git a/docs/guides/Upgrading Guide.md b/docs/guides/Upgrading Guide.md deleted file mode 100644 index afc0ac01..00000000 --- a/docs/guides/Upgrading Guide.md +++ /dev/null @@ -1,26 +0,0 @@ -# This section is for users who are upgrading from versions older than 1.4 to 1.4+ - -#### If you have NadekoBot 1.x on Windows - -- Go to `NadekoBot\src\NadekoBot` and backup your `credentials.json` file; then go to `NadekoBot\src\NadekoBot\bin\Release\netcoreapp1.0` and backup your `data` folder. -- Follow the [Windows Guide](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/) and install the latest version of **NadekoBot**. -- Paste your `credentials.json` file into the `C:\Program Files\NadekoBot\system` folder. -- Paste your `data` folder into `C:\Program Files\NadekoBot\system` folder. -- If it asks you to overwrite files, it is fine to do so. -- Next launch your **new** Nadeko as the guide describes, if it is not already running. - - -#### If you are running Dockerised Nadeko - -- There is an updating section in the docker guide. - -#### If you have NadekoBot 1.x on Linux or macOS - -- Backup the `NadekoBot.db` from `NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.0/data` -- Backup the `credentials.json` from `NadekoBot/src/NadekoBot/` -- **For MacOS Users Only:** download and install the latest version of [.NET Core SDK](https://www.microsoft.com/net/core#macos) -- Next, use the command `cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.9/linuxAIO.sh && bash linuxAIO.sh` -- **For Ubuntu, Debian and CentOS Users Only:** use the option `4. Auto-Install Prerequisites` to install the latest version of .NET Core SDK. -- Use option `1. Download NadekoBot` to update your NadekoBot to 1.9.x. -- Next, just [run your NadekoBot.](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#running-nadekobot) -- *NOTE: 1.9.x uses `NadekoBot.db` file from `NadekoBot/src/NadekoBot/bin/Release/netcoreapp2.0/data` folder.* diff --git a/docs/guides/Windows Guide.md b/docs/guides/Windows Guide.md index fe344a96..c426d981 100644 --- a/docs/guides/Windows Guide.md +++ b/docs/guides/Windows Guide.md @@ -7,7 +7,8 @@ #### Guide - Download and run the [NadekoBot Updater.][Updater] -- Press **`Install ffmpeg`** and **`Install youtube-dl`** if you want music features. +- Press **`Install Redis`** then +- Press **`Install ffmpeg`** and **`Install youtube-dl`** if you want music features. ***NOTE:** RESTART YOUR PC IF YOU DO.* - Press **`Update`** and go through the installation wizard. ***NOTE:** If you're upgrading from 1.3, DO NOT select your old nadekobot folder. Install it in a separate directory and read the [upgrading guide](http://nadekobot.readthedocs.io/en/latest/guides/Upgrading%20Guide/).* diff --git a/docs/index.md b/docs/index.md index 65005bb9..52dd5ef0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,7 +20,6 @@ If you want to contribute, be sure to PR on the current **[default][repo]** bran - [OSX Guide](guides/OSX Guide.md) - [Docker Guide](guides/Docker Guide.md) - [From Source](guides/From Source.md) - - [Upgrading Guide](guides/Upgrading Guide.md) - Commands - [Readme](Readme.md) - [Commands List](Commands List.md) diff --git a/mkdocs.yml b/mkdocs.yml index 0ab5e11b..d11fdc76 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -9,7 +9,6 @@ pages: - OSX Guide: guides/OSX Guide.md - Docker Guide: guides/Docker Guide.md - From Source: guides/From Source.md - - Upgrading Guide: guides/Upgrading Guide.md - Commands: - Readme: Readme.md - Commands List: Commands List.md diff --git a/src/NadekoBot/Common/Shard0Precondition.cs b/src/NadekoBot/Common/Shard0Precondition.cs deleted file mode 100644 index 965101a3..00000000 --- a/src/NadekoBot/Common/Shard0Precondition.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Threading.Tasks; -using Discord.Commands; -using Discord.WebSocket; - -namespace NadekoBot.Common -{ - public class Shard0Precondition : PreconditionAttribute - { - public override Task CheckPermissions(ICommandContext context, CommandInfo command, IServiceProvider services) - { - var c = (DiscordSocketClient)context.Client; - if (c.ShardId != 0) - return Task.FromResult(PreconditionResult.FromError("Must be ran from shard #0")); - - return Task.FromResult(PreconditionResult.FromSuccess()); - } - } -} diff --git a/src/NadekoBot/Common/ShardCom/ShardComClient.cs b/src/NadekoBot/Common/ShardCom/ShardComClient.cs deleted file mode 100644 index 9c10a11d..00000000 --- a/src/NadekoBot/Common/ShardCom/ShardComClient.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Net; -using System.Net.Sockets; -using System.Text; -using System.Threading.Tasks; -using Newtonsoft.Json; - -namespace NadekoBot.Common.ShardCom -{ - public class ShardComClient - { - private int port; - - public ShardComClient(int port) - { - this.port = port; - } - - public async Task Send(ShardComMessage data) - { - var msg = JsonConvert.SerializeObject(data); - using (var client = new UdpClient()) - { - var bytes = Encoding.UTF8.GetBytes(msg); - await client.SendAsync(bytes, bytes.Length, IPAddress.Loopback.ToString(), port).ConfigureAwait(false); - } - } - } -} diff --git a/src/NadekoBot/Common/ShardCom/ShardComServer.cs b/src/NadekoBot/Common/ShardCom/ShardComServer.cs deleted file mode 100644 index b6b5a0ba..00000000 --- a/src/NadekoBot/Common/ShardCom/ShardComServer.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Net; -using System.Net.Sockets; -using System.Text; -using System.Threading.Tasks; -using Newtonsoft.Json; - -namespace NadekoBot.Common.ShardCom -{ - public class ShardComServer : IDisposable - { - private readonly UdpClient _client; - - public ShardComServer(int port) - { - _client = new UdpClient(port); - } - - public void Start() - { - Task.Run(async () => - { - var ip = new IPEndPoint(IPAddress.Any, 0); - while (true) - { - var recv = await _client.ReceiveAsync(); - var data = Encoding.UTF8.GetString(recv.Buffer); - var _ = OnDataReceived(JsonConvert.DeserializeObject(data)); - } - }); - } - - public void Dispose() - { - _client.Dispose(); - } - - public event Func OnDataReceived = delegate { return Task.CompletedTask; }; - } -} diff --git a/src/NadekoBot/Modules/Administration/Common/Migration/0_9..cs b/src/NadekoBot/Modules/Administration/Common/Migration/0_9..cs deleted file mode 100644 index b7e2bc0a..00000000 --- a/src/NadekoBot/Modules/Administration/Common/Migration/0_9..cs +++ /dev/null @@ -1,195 +0,0 @@ -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; - -namespace NadekoBot.Modules.Administration.Common.Migration -{ - public class CommandPrefixes0_9 - { - public string Administration { get; set; } - public string Searches { get; set; } - public string NSFW { get; set; } - public string Conversations { get; set; } - public string ClashOfClans { get; set; } - public string Help { get; set; } - public string Music { get; set; } - public string Trello { get; set; } - public string Games { get; set; } - public string Gambling { get; set; } - public string Permissions { get; set; } - public string Programming { get; set; } - public string Pokemon { get; set; } - public string Utility { get; set; } - } - - public class Config0_9 - { - public bool DontJoinServers { get; set; } - public bool ForwardMessages { get; set; } - public bool ForwardToAllOwners { get; set; } - public bool IsRotatingStatus { get; set; } - public int BufferSize { get; set; } - public List RaceAnimals { get; set; } - public string RemindMessageFormat { get; set; } - public Dictionary> CustomReactions { get; set; } - public List RotatingStatuses { get; set; } - public CommandPrefixes0_9 CommandPrefixes { get; set; } - public List ServerBlacklist { get; set; } - public List ChannelBlacklist { get; set; } - public List UserBlacklist { get; set; } - public List _8BallResponses { get; set; } - public string CurrencySign { get; set; } - public string CurrencyName { get; set; } - public string DMHelpString { get; set; } - public string HelpString { get; set; } - } - - /// - /// Holds a permission list - /// - public class Permissions - { - /// - /// Name of the parent object whose permissions these are - /// - public string Name { get; set; } - /// - /// Module name with allowed/disallowed - /// - public ConcurrentDictionary Modules { get; set; } - /// - /// Command name with allowed/disallowed - /// - public ConcurrentDictionary Commands { get; set; } - /// - /// Should the bot filter invites to other discord servers (and ref links in the future) - /// - public bool FilterInvites { get; set; } - /// - /// Should the bot filter words which are specified in the Words hashset - /// - public bool FilterWords { get; set; } - - public Permissions(string name) - { - Name = name; - Modules = new ConcurrentDictionary(); - Commands = new ConcurrentDictionary(); - FilterInvites = false; - FilterWords = false; - } - - public void CopyFrom(Permissions other) - { - Modules.Clear(); - foreach (var mp in other.Modules) - Modules.AddOrUpdate(mp.Key, mp.Value, (s, b) => mp.Value); - Commands.Clear(); - foreach (var cp in other.Commands) - Commands.AddOrUpdate(cp.Key, cp.Value, (s, b) => cp.Value); - FilterInvites = other.FilterInvites; - FilterWords = other.FilterWords; - } - - public override string ToString() - { - var toReturn = ""; - var bannedModules = Modules.Where(kvp => kvp.Value == false); - var bannedModulesArray = bannedModules as KeyValuePair[] ?? bannedModules.ToArray(); - if (bannedModulesArray.Any()) - { - toReturn += "`Banned Modules:`\n"; - toReturn = bannedModulesArray.Aggregate(toReturn, (current, m) => current + $"\t`[x] {m.Key}`\n"); - } - var bannedCommands = Commands.Where(kvp => kvp.Value == false); - var bannedCommandsArr = bannedCommands as KeyValuePair[] ?? bannedCommands.ToArray(); - if (bannedCommandsArr.Any()) - { - toReturn += "`Banned Commands:`\n"; - toReturn = bannedCommandsArr.Aggregate(toReturn, (current, c) => current + $"\t`[x] {c.Key}`\n"); - } - return toReturn; - } - } - - public class ServerPermissions0_9 - { - /// - /// The guy who can edit the permissions - /// - public string PermissionsControllerRole { get; set; } - /// - /// Does it print the error when a restriction occurs - /// - public bool Verbose { get; set; } - /// - /// The id of the thing (user/server/channel) - /// - public ulong Id { get; set; } //a string because of the role name. - /// - /// Permission object bound to the id of something/role name - /// - public Permissions Permissions { get; set; } - /// - /// Banned words, usually profanities, like word "java" - /// - public HashSet Words { get; set; } - - public Dictionary UserPermissions { get; set; } - public Dictionary ChannelPermissions { get; set; } - public Dictionary RolePermissions { get; set; } - /// - /// Dictionary of command names with their respective cooldowns - /// - public ConcurrentDictionary CommandCooldowns { get; set; } - - public ServerPermissions0_9(ulong id, string name) - { - Id = id; - PermissionsControllerRole = "Nadeko"; - Verbose = true; - - Permissions = new Permissions(name); - Permissions.Modules.TryAdd("NSFW", false); - UserPermissions = new Dictionary(); - ChannelPermissions = new Dictionary(); - RolePermissions = new Dictionary(); - CommandCooldowns = new ConcurrentDictionary(); - Words = new HashSet(); - } - } - - public class ServerSpecificConfig - { - public bool VoicePlusTextEnabled { get; set; } - public bool SendPrivateMessageOnMention { get; set; } - public ulong? LogChannel { get; set; } = null; - public ulong? LogPresenceChannel { get; set; } = null; - public HashSet LogserverIgnoreChannels { get; set; } - public ConcurrentDictionary VoiceChannelLog { get; set; } - public HashSet ListOfSelfAssignableRoles { get; set; } - public ulong AutoAssignedRole { get; set; } - public ConcurrentDictionary GenerateCurrencyChannels { get; set; } - public bool AutoDeleteMessagesOnCommand { get; set; } - public bool ExclusiveSelfAssignedRoles { get; set; } - public float DefaultMusicVolume { get; set; } - public HashSet ObservingStreams { get; set; } - } - - public class StreamNotificationConfig0_9 - { - public string Username { get; set; } - public StreamType Type { get; set; } - public ulong ServerId { get; set; } - public ulong ChannelId { get; set; } - public bool LastStatus { get; set; } - - public enum StreamType - { - Twitch, - Beam, - Hitbox, - YoutubeGaming - } - } -} \ No newline at end of file diff --git a/src/NadekoBot/Modules/Administration/Common/Migration/MigrationException.cs b/src/NadekoBot/Modules/Administration/Common/Migration/MigrationException.cs deleted file mode 100644 index 639ff5bc..00000000 --- a/src/NadekoBot/Modules/Administration/Common/Migration/MigrationException.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace NadekoBot.Modules.Administration.Common.Migration -{ - public class MigrationException : Exception - { - - } -} diff --git a/src/NadekoBot/Modules/Administration/MigrationCommands.cs b/src/NadekoBot/Modules/Administration/MigrationCommands.cs deleted file mode 100644 index 5c9b4a70..00000000 --- a/src/NadekoBot/Modules/Administration/MigrationCommands.cs +++ /dev/null @@ -1,381 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Discord.Commands; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using Newtonsoft.Json; -using System.Collections.Concurrent; -using NadekoBot.Extensions; -using NadekoBot.Services.Database; -using Microsoft.Data.Sqlite; -using NadekoBot.Common.Attributes; -using NadekoBot.Common.Collections; -using NadekoBot.Modules.Administration.Common.Migration; - -namespace NadekoBot.Modules.Administration -{ - public partial class Administration - { - [Group] - public class MigrationCommands : NadekoSubmodule - { - private const int CURRENT_VERSION = 1; - private readonly DbService _db; - - public MigrationCommands(DbService db) - { - _db = db; - } - - [NadekoCommand, Usage, Description, Aliases] - [OwnerOnly] - public async Task MigrateData() - { - var version = 0; - using (var uow = _db.UnitOfWork) - { - version = uow.BotConfig.GetOrCreate().MigrationVersion; - } - try - { - for (var i = version; i < CURRENT_VERSION; i++) - { - switch (i) - { - case 0: - Migrate0_9To1_0(); - break; - } - } - await ReplyConfirmLocalized("migration_done").ConfigureAwait(false); - } - catch (Exception ex) - { - _log.Error(ex); - await ReplyErrorLocalized("migration_error").ConfigureAwait(false); - } - } - - private void Migrate0_9To1_0() - { - using (var uow = _db.UnitOfWork) - { - var botConfig = uow.BotConfig.GetOrCreate(); - MigrateConfig0_9(uow, botConfig); - MigratePermissions0_9(uow); - MigrateServerSpecificConfigs0_9(uow); - MigrateDb0_9(uow); - - //NOW save it - _log.Warn("Writing to disc"); - uow.Complete(); - botConfig.MigrationVersion = 1; - } - } - - private void MigrateDb0_9(IUnitOfWork uow) - { - var db = new SqliteConnection("Data Source=data/nadekobot.sqlite"); - - if (!File.Exists("data/nadekobot.sqlite")) - { - _log.Warn("No data from the old database will be migrated."); - return; - } - db.Open(); - - var com = db.CreateCommand(); - var i = 0; - try - { - com.CommandText = "SELECT * FROM Announcement"; - - var reader = com.ExecuteReader(); - while (reader.Read()) - { - var gid = (ulong)(long)reader["ServerId"]; - var greet = (long)reader["Greet"] == 1; - var greetDM = (long)reader["GreetPM"] == 1; - var greetChannel = (ulong)(long)reader["GreetChannelId"]; - var greetMsg = (string)reader["GreetText"]; - var bye = (long)reader["Bye"] == 1; - var byeChannel = (ulong)(long)reader["ByeChannelId"]; - var byeMsg = (string)reader["ByeText"]; - var gc = uow.GuildConfigs.For(gid, set => set); - - if (greetDM) - gc.SendDmGreetMessage = greet; - else - gc.SendChannelGreetMessage = greet; - gc.GreetMessageChannelId = greetChannel; - gc.ChannelGreetMessageText = greetMsg; - - gc.SendChannelByeMessage = bye; - gc.ByeMessageChannelId = byeChannel; - gc.ChannelByeMessageText = byeMsg; - - _log.Info(++i); - } - } - catch { - _log.Warn("Greet/bye messages won't be migrated"); - } - var com2 = db.CreateCommand(); - com2.CommandText = "SELECT * FROM CurrencyState GROUP BY UserId"; - - i = 0; - try - { - var reader2 = com2.ExecuteReader(); - while (reader2.Read()) - { - _log.Info(++i); - var curr = new Currency() - { - Amount = (long)reader2["Value"], - UserId = (ulong)(long)reader2["UserId"] - }; - uow.Currency.Add(curr); - } - } - catch - { - _log.Warn("Currency won't be migrated"); - } - db.Close(); - try { File.Move("data/nadekobot.sqlite", "data/DELETE_ME_nadekobot.sqlite"); } catch { } - } - - private void MigrateServerSpecificConfigs0_9(IUnitOfWork uow) - { - const string specificConfigsPath = "data/ServerSpecificConfigs.json"; - - if (!File.Exists(specificConfigsPath)) - { - _log.Warn($"No data from {specificConfigsPath} will be migrated."); - return; - } - - var configs = new ConcurrentDictionary(); - try - { - configs = JsonConvert - .DeserializeObject>( - File.ReadAllText(specificConfigsPath), new JsonSerializerSettings() - { - Error = (s, e) => - { - if (e.ErrorContext.Member.ToString() == "GenerateCurrencyChannels") - { - e.ErrorContext.Handled = true; - } - } - }); - } - catch (Exception ex) - { - _log.Warn(ex, "ServerSpecificConfig deserialization failed"); - return; - } - var i = 0; - var selfAssRoles = new ConcurrentHashSet(); - configs - .Select(p => new { data = p.Value, gconfig = uow.GuildConfigs.For(p.Key) }) - .AsParallel() - .ForAll(config => - { - try - { - var guildConfig = config.gconfig; - var data = config.data; - - guildConfig.AutoAssignRoleId = data.AutoAssignedRole; - guildConfig.DeleteMessageOnCommand = data.AutoDeleteMessagesOnCommand; - guildConfig.DefaultMusicVolume = data.DefaultMusicVolume; - guildConfig.ExclusiveSelfAssignedRoles = data.ExclusiveSelfAssignedRoles; - guildConfig.GenerateCurrencyChannelIds = new HashSet(data.GenerateCurrencyChannels.Select(gc => new GCChannelId() { ChannelId = gc.Key })); - selfAssRoles.AddRange(data.ListOfSelfAssignableRoles.Select(r => new SelfAssignedRole() { GuildId = guildConfig.GuildId, RoleId = r }).ToArray()); - guildConfig.LogSetting.IgnoredChannels = new HashSet(data.LogserverIgnoreChannels.Select(id => new IgnoredLogChannel() { ChannelId = id })); - - guildConfig.LogSetting.LogUserPresenceId = data.LogPresenceChannel; - - - guildConfig.FollowedStreams = new HashSet(data.ObservingStreams.Select(x => - { - FollowedStream.FollowedStreamType type = FollowedStream.FollowedStreamType.Twitch; - switch (x.Type) - { - case StreamNotificationConfig0_9.StreamType.Twitch: - type = FollowedStream.FollowedStreamType.Twitch; - break; - case StreamNotificationConfig0_9.StreamType.Beam: - type = FollowedStream.FollowedStreamType.Mixer; - break; - case StreamNotificationConfig0_9.StreamType.Hitbox: - type = FollowedStream.FollowedStreamType.Smashcast; - break; - default: - break; - } - - return new FollowedStream() - { - ChannelId = x.ChannelId, - GuildId = guildConfig.GuildId, - Username = x.Username.ToLowerInvariant(), - Type = type - }; - })); - guildConfig.VoicePlusTextEnabled = data.VoicePlusTextEnabled; - _log.Info("Migrating SpecificConfig for {0} done ({1})", guildConfig.GuildId, ++i); - } - catch (Exception ex) - { - _log.Error(ex); - } - }); - uow.SelfAssignedRoles.AddRange(selfAssRoles.ToArray()); - try { File.Move("data/ServerSpecificConfigs.json", "data/DELETE_ME_ServerSpecificCOnfigs.json"); } catch { } - } - - private void MigratePermissions0_9(IUnitOfWork uow) - { - var permissionsDict = new ConcurrentDictionary(); - if (!Directory.Exists("data/permissions/")) - { - _log.Warn("No data from permissions will be migrated."); - return; - } - foreach (var file in Directory.EnumerateFiles("data/permissions/")) - { - try - { - var strippedFileName = Path.GetFileNameWithoutExtension(file); - if (string.IsNullOrWhiteSpace(strippedFileName)) continue; - var id = ulong.Parse(strippedFileName); - var data = JsonConvert.DeserializeObject(File.ReadAllText(file)); - permissionsDict.TryAdd(id, data); - } - catch - { - // ignored - } - } - var i = 0; - permissionsDict - .Select(p => new { data = p.Value, gconfig = uow.GuildConfigs.For(p.Key) }) - .AsParallel() - .ForAll(perms => - { - try - { - var data = perms.data; - var gconfig = perms.gconfig; - - gconfig.PermissionRole = data.PermissionsControllerRole; - gconfig.VerbosePermissions = data.Verbose; - gconfig.FilteredWords = new HashSet(data.Words.Select(w => w.ToLowerInvariant()) - .Distinct() - .Select(w => new FilteredWord() { Word = w })); - gconfig.FilterWords = data.Permissions.FilterWords; - gconfig.FilterInvites = data.Permissions.FilterInvites; - - gconfig.FilterInvitesChannelIds = new HashSet(); - gconfig.FilterInvitesChannelIds.AddRange(data.ChannelPermissions.Where(kvp => kvp.Value.FilterInvites) - .Select(cp => new FilterChannelId() - { - ChannelId = cp.Key - })); - - gconfig.FilterWordsChannelIds = new HashSet(); - gconfig.FilterWordsChannelIds.AddRange(data.ChannelPermissions.Where(kvp => kvp.Value.FilterWords) - .Select(cp => new FilterChannelId() - { - ChannelId = cp.Key - })); - - gconfig.CommandCooldowns = new HashSet(data.CommandCooldowns - .Where(cc => !string.IsNullOrWhiteSpace(cc.Key) && cc.Value > 0) - .Select(cc => new CommandCooldown() - { - CommandName = cc.Key, - Seconds = cc.Value - })); - _log.Info("Migrating data from permissions folder for {0} done ({1})", gconfig.GuildId, ++i); - } - catch (Exception ex) - { - _log.Error(ex); - } - }); - - try { Directory.Move("data/permissions", "data/DELETE_ME_permissions"); } catch { } - - } - - private void MigrateConfig0_9(IUnitOfWork uow, BotConfig botConfig) - { - Config0_9 oldConfig; - const string configPath = "data/config.json"; - try - { - oldConfig = JsonConvert.DeserializeObject(File.ReadAllText(configPath)); - } - catch (FileNotFoundException) - { - _log.Warn("config.json not found"); - return; - } - catch (Exception) - { - _log.Error("Unknown error while deserializing file config.json, pls check its integrity, aborting migration"); - throw new MigrationException(); - } - - //Basic - botConfig.ForwardMessages = oldConfig.ForwardMessages; - botConfig.ForwardToAllOwners = oldConfig.ForwardToAllOwners; - botConfig.BufferSize = (ulong)oldConfig.BufferSize; - botConfig.RemindMessageFormat = oldConfig.RemindMessageFormat; - botConfig.CurrencySign = oldConfig.CurrencySign; - botConfig.CurrencyName = oldConfig.CurrencyName; - botConfig.DMHelpString = oldConfig.DMHelpString; - botConfig.HelpString = oldConfig.HelpString; - - //messages - botConfig.RotatingStatuses = oldConfig.IsRotatingStatus; - var messages = new List(); - - oldConfig.RotatingStatuses.ForEach(i => messages.Add(new PlayingStatus { Status = i })); - botConfig.RotatingStatusMessages = messages; - - //Blacklist - var blacklist = new HashSet(oldConfig.ServerBlacklist.Select(server => new BlacklistItem() { ItemId = server, Type = BlacklistType.Server })); - blacklist.AddRange(oldConfig.ChannelBlacklist.Select(channel => new BlacklistItem() { ItemId = channel, Type = BlacklistType.Channel })); - blacklist.AddRange(oldConfig.UserBlacklist.Select(user => new BlacklistItem() { ItemId = user, Type = BlacklistType.User })); - botConfig.Blacklist = blacklist; - - //Eightball - botConfig.EightBallResponses = new HashSet(oldConfig._8BallResponses.Select(response => new EightBallResponse() { Text = response })); - - //customreactions - uow.CustomReactions.AddRange(oldConfig.CustomReactions.SelectMany(cr => - { - return cr.Value.Select(res => new CustomReaction() - { - GuildId = null, - IsRegex = false, - OwnerOnly = false, - Response = res, - Trigger = cr.Key.ToLowerInvariant(), - }); - }).ToArray()); - - try { File.Move(configPath, "./data/DELETE_ME_config.json"); } catch { } - } - } - } -} diff --git a/src/NadekoBot/Modules/Gambling/CurrencyEventsCommands.cs b/src/NadekoBot/Modules/Gambling/CurrencyEventsCommands.cs deleted file mode 100644 index 2ebaba46..00000000 --- a/src/NadekoBot/Modules/Gambling/CurrencyEventsCommands.cs +++ /dev/null @@ -1,281 +0,0 @@ -using Discord; -using Discord.Commands; -using NadekoBot.Extensions; -using NadekoBot.Services; -using System; -using System.Linq; -using System.Threading.Tasks; -using Discord.WebSocket; -using System.Threading; -using NadekoBot.Common; -using NadekoBot.Common.Attributes; -using NadekoBot.Common.Collections; -using NLog; -using System.Collections.Concurrent; -using System.Collections.Generic; -using NadekoBot.Services.Database.Models; - -namespace NadekoBot.Modules.Gambling -{ - public partial class Gambling - { - [Group] - public class CurrencyEventsCommands : NadekoSubmodule - { - public enum CurrencyEvent - { - Reaction, - SneakyGameStatus - } - //flower reaction event - private static readonly ConcurrentHashSet _sneakyGameAwardedUsers = new ConcurrentHashSet(); - - private static readonly char[] _sneakyGameStatusChars = Enumerable.Range(48, 10) - .Concat(Enumerable.Range(65, 26)) - .Concat(Enumerable.Range(97, 26)) - .Select(x => (char)x) - .ToArray(); - - private string _secretCode = string.Empty; - private readonly DiscordSocketClient _client; - private readonly IBotConfigProvider _bc; - private readonly CurrencyService _cs; - - public CurrencyEventsCommands(DiscordSocketClient client, IBotConfigProvider bc, CurrencyService cs) - { - _client = client; - _bc = bc; - _cs = cs; - } - - [NadekoCommand, Usage, Description, Aliases] - [RequireContext(ContextType.Guild)] - [OwnerOnly] - public async Task StartEvent(CurrencyEvent e, int arg = -1) - { - switch (e) - { - case CurrencyEvent.Reaction: - await ReactionEvent(Context, arg).ConfigureAwait(false); - break; - case CurrencyEvent.SneakyGameStatus: - await SneakyGameStatusEvent(Context, arg).ConfigureAwait(false); - break; - } - } - - public async Task SneakyGameStatusEvent(ICommandContext context, int? arg) - { - int num; - if (arg == null || arg < 5) - num = 60; - else - num = arg.Value; - - if (_secretCode != string.Empty) - return; - var rng = new NadekoRandom(); - - for (var i = 0; i < 5; i++) - { - _secretCode += _sneakyGameStatusChars[rng.Next(0, _sneakyGameStatusChars.Length)]; - } - - await _client.SetGameAsync($"type {_secretCode} for " + _bc.BotConfig.CurrencyPluralName) - .ConfigureAwait(false); - try - { - var title = GetText("sneakygamestatus_title"); - var desc = GetText("sneakygamestatus_desc", Format.Bold(100.ToString()) + _bc.BotConfig.CurrencySign, Format.Bold(num.ToString())); - await context.Channel.SendConfirmAsync(title, desc).ConfigureAwait(false); - } - catch - { - // ignored - } - - - _client.MessageReceived += SneakyGameMessageReceivedEventHandler; - await Task.Delay(num * 1000); - _client.MessageReceived -= SneakyGameMessageReceivedEventHandler; - - var cnt = _sneakyGameAwardedUsers.Count; - _sneakyGameAwardedUsers.Clear(); - _secretCode = string.Empty; - - await _client.SetGameAsync(GetText("sneakygamestatus_end", cnt)) - .ConfigureAwait(false); - } - - private Task SneakyGameMessageReceivedEventHandler(SocketMessage arg) - { - if (arg.Content == _secretCode && - _sneakyGameAwardedUsers.Add(arg.Author.Id)) - { - var _ = Task.Run(async () => - { - await _cs.AddAsync(arg.Author, "Sneaky Game Event", 100, false) - .ConfigureAwait(false); - - try { await arg.DeleteAsync(new RequestOptions() { RetryMode = RetryMode.AlwaysFail }).ConfigureAwait(false); } - catch - { - // ignored - } - }); - } - - return Task.CompletedTask; - } - - public async Task ReactionEvent(ICommandContext context, int amount) - { - if (amount <= 0) - amount = 100; - - var title = GetText("reaction_title"); - var desc = GetText("reaction_desc", _bc.BotConfig.CurrencySign, Format.Bold(amount.ToString()) + _bc.BotConfig.CurrencySign); - var footer = GetText("reaction_footer", 24); - var msg = await context.Channel.SendConfirmAsync(title, - desc, footer: footer) - .ConfigureAwait(false); - - await new ReactionEvent(_bc.BotConfig, _client, _cs, amount).Start(msg, context); - } - } - } - - public abstract class CurrencyEvent - { - public abstract Task Start(IUserMessage msg, ICommandContext channel); - } - - public class ReactionEvent : CurrencyEvent - { - private readonly ConcurrentHashSet _reactionAwardedUsers = new ConcurrentHashSet(); - private readonly BotConfig _bc; - private readonly Logger _log; - private readonly DiscordSocketClient _client; - private readonly CurrencyService _cs; - private readonly SocketSelfUser _botUser; - - private IUserMessage StartingMessage { get; set; } - - private CancellationTokenSource Source { get; } - private CancellationToken CancelToken { get; } - - private readonly ConcurrentQueue _toGiveTo = new ConcurrentQueue(); - private readonly int _amount; - - public ReactionEvent(BotConfig bc, DiscordSocketClient client, CurrencyService cs, int amount) - { - _bc = bc; - _log = LogManager.GetCurrentClassLogger(); - _client = client; - _cs = cs; - _botUser = client.CurrentUser; - _amount = amount; - Source = new CancellationTokenSource(); - CancelToken = Source.Token; - - var _ = Task.Run(async () => - { - - var users = new List(); - while (!CancelToken.IsCancellationRequested) - { - await Task.Delay(1000).ConfigureAwait(false); - while (_toGiveTo.TryDequeue(out var usrId)) - { - users.Add(usrId); - } - - if (users.Count > 0) - { - await _cs.AddToManyAsync("Reaction Event", _amount, users.ToArray()).ConfigureAwait(false); - } - - users.Clear(); - } - }, CancelToken); - } - - private async Task End() - { - if(StartingMessage != null) - await StartingMessage.DeleteAsync().ConfigureAwait(false); - - if(!Source.IsCancellationRequested) - Source.Cancel(); - - _client.MessageDeleted -= MessageDeletedEventHandler; - } - - private Task MessageDeletedEventHandler(Cacheable msg, ISocketMessageChannel channel) { - if (StartingMessage?.Id == msg.Id) - { - _log.Warn("Stopping flower reaction event because message is deleted."); - var __ = Task.Run(End); - } - - return Task.CompletedTask; - } - - public override async Task Start(IUserMessage umsg, ICommandContext context) - { - StartingMessage = umsg; - _client.MessageDeleted += MessageDeletedEventHandler; - - IEmote iemote; - if (Emote.TryParse(_bc.CurrencySign, out var emote)) - { - iemote = emote; - } - else - iemote = new Emoji(_bc.CurrencySign); - try { await StartingMessage.AddReactionAsync(iemote).ConfigureAwait(false); } - catch - { - try { await StartingMessage.AddReactionAsync(iemote).ConfigureAwait(false); } - catch - { - try { await StartingMessage.DeleteAsync().ConfigureAwait(false); } - catch { return; } - } - } - using (StartingMessage.OnReaction(_client, (r) => - { - try - { - if (r.UserId == _botUser.Id) - return; - - if (r.Emote.Name == iemote.Name && r.User.IsSpecified && ((DateTime.UtcNow - r.User.Value.CreatedAt).TotalDays > 5) && _reactionAwardedUsers.Add(r.User.Value.Id)) - { - _toGiveTo.Enqueue(r.UserId); - } - } - catch - { - // ignored - } - })) - { - try - { - await Task.Delay(TimeSpan.FromHours(24), CancelToken).ConfigureAwait(false); - } - catch (OperationCanceledException) - { - - } - if (CancelToken.IsCancellationRequested) - return; - - _log.Warn("Stopping flower reaction event because it expired."); - await End(); - - } - } - } -} diff --git a/src/NadekoBot/Modules/Games/TicTacToeCommands.cs b/src/NadekoBot/Modules/Games/TicTacToeCommands.cs deleted file mode 100644 index 539d9cdd..00000000 --- a/src/NadekoBot/Modules/Games/TicTacToeCommands.cs +++ /dev/null @@ -1,330 +0,0 @@ -using Discord; -using Discord.Commands; -using Discord.WebSocket; -using NadekoBot.Extensions; -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using NadekoBot.Common.Attributes; -using NadekoBot.Services.Impl; - -namespace NadekoBot.Modules.Games -{ - public partial class Games - { - [Group] - public class TicTacToeCommands : NadekoSubmodule - { - //channelId/game - private static readonly Dictionary _games = new Dictionary(); - - private readonly SemaphoreSlim _sem = new SemaphoreSlim(1, 1); - private readonly DiscordSocketClient _client; - - public TicTacToeCommands(DiscordSocketClient client) - { - _client = client; - } - - [NadekoCommand, Usage, Description, Aliases] - [RequireContext(ContextType.Guild)] - public async Task TicTacToe() - { - var channel = (ITextChannel)Context.Channel; - - await _sem.WaitAsync(1000); - try - { - if (_games.TryGetValue(channel.Id, out TicTacToe game)) - { - var _ = Task.Run(async () => - { - await game.Start((IGuildUser)Context.User); - }); - return; - } - game = new TicTacToe(base._strings, (DiscordSocketClient)this._client, channel, (IGuildUser)Context.User); - _games.Add(channel.Id, game); - await ReplyConfirmLocalized("ttt_created").ConfigureAwait(false); - - game.OnEnded += (g) => - { - _games.Remove(channel.Id); - }; - } - finally - { - _sem.Release(); - } - } - } - - public class TicTacToe - { - enum Phase - { - Starting, - Started, - Ended - } - - private readonly ITextChannel _channel; - private readonly IGuildUser[] _users; - private readonly int?[,] _state; - private Phase _phase; - private int _curUserIndex; - private readonly SemaphoreSlim _moveLock; - - private IGuildUser _winner; - - private readonly string[] _numbers = { ":one:", ":two:", ":three:", ":four:", ":five:", ":six:", ":seven:", ":eight:", ":nine:" }; - - public Action OnEnded; - - private IUserMessage _previousMessage; - private Timer _timeoutTimer; - private readonly NadekoStrings _strings; - private readonly DiscordSocketClient _client; - - public TicTacToe(NadekoStrings strings, DiscordSocketClient client, ITextChannel channel, IGuildUser firstUser) - { - _channel = channel; - _strings = strings; - _client = client; - - _users = new[] { firstUser, null }; - _state = new int?[,] { - { null, null, null }, - { null, null, null }, - { null, null, null }, - }; - - _phase = Phase.Starting; - _moveLock = new SemaphoreSlim(1, 1); - } - - private string GetText(string key, params object[] replacements) => - _strings.GetText(key, - _channel.GuildId, - typeof(Games).Name.ToLowerInvariant(), - replacements); - - public string GetState() - { - var sb = new StringBuilder(); - for (var i = 0; i < _state.GetLength(0); i++) - { - for (var j = 0; j < _state.GetLength(1); j++) - { - sb.Append(_state[i, j] == null ? _numbers[i * 3 + j] : GetIcon(_state[i, j])); - if (j < _state.GetLength(1) - 1) - sb.Append("┃"); - } - if (i < _state.GetLength(0) - 1) - sb.AppendLine("\n──────────"); - } - - return sb.ToString(); - } - - public EmbedBuilder GetEmbed(string title = null) - { - var embed = new EmbedBuilder() - .WithOkColor() - .WithDescription(Environment.NewLine + GetState()) - .WithAuthor(eab => eab.WithName(GetText("vs", _users[0], _users[1]))); - - if (!string.IsNullOrWhiteSpace(title)) - embed.WithTitle(title); - - if (_winner == null) - { - if (_phase == Phase.Ended) - embed.WithFooter(efb => efb.WithText(GetText("ttt_no_moves"))); - else - embed.WithFooter(efb => efb.WithText(GetText("ttt_users_move", _users[_curUserIndex]))); - } - else - embed.WithFooter(efb => efb.WithText(GetText("ttt_has_won", _winner))); - - return embed; - } - - private static string GetIcon(int? val) - { - switch (val) - { - case 0: - return "❌"; - case 1: - return "⭕"; - case 2: - return "❎"; - case 3: - return "🅾"; - default: - return "⬛"; - } - } - - public async Task Start(IGuildUser user) - { - if (_phase == Phase.Started || _phase == Phase.Ended) - { - await _channel.SendErrorAsync(user.Mention + GetText("ttt_already_running")).ConfigureAwait(false); - return; - } - else if (_users[0] == user) - { - await _channel.SendErrorAsync(user.Mention + GetText("ttt_against_yourself")).ConfigureAwait(false); - return; - } - - _users[1] = user; - - _phase = Phase.Started; - - _timeoutTimer = new Timer(async (_) => - { - await _moveLock.WaitAsync(); - try - { - if (_phase == Phase.Ended) - return; - - _phase = Phase.Ended; - if (_users[1] != null) - { - _winner = _users[_curUserIndex ^= 1]; - var del = _previousMessage?.DeleteAsync(); - try - { - await _channel.EmbedAsync(GetEmbed(GetText("ttt_time_expired"))).ConfigureAwait(false); - if (del != null) - await del.ConfigureAwait(false); - } - catch { } - } - - OnEnded?.Invoke(this); - } - catch { } - finally - { - _moveLock.Release(); - } - }, null, 15000, Timeout.Infinite); - - _client.MessageReceived += Client_MessageReceived; - - - _previousMessage = await _channel.EmbedAsync(GetEmbed(GetText("game_started"))).ConfigureAwait(false); - } - - private bool IsDraw() - { - for (var i = 0; i < 3; i++) - { - for (var j = 0; j < 3; j++) - { - if (_state[i, j] == null) - return false; - } - } - return true; - } - - private Task Client_MessageReceived(SocketMessage msg) - { - var _ = Task.Run(async () => - { - await _moveLock.WaitAsync().ConfigureAwait(false); - try - { - var curUser = _users[_curUserIndex]; - if (_phase == Phase.Ended || msg.Author?.Id != curUser.Id) - return; - - if (int.TryParse(msg.Content, out var index) && - --index >= 0 && - index <= 9 && - _state[index / 3, index % 3] == null) - { - _state[index / 3, index % 3] = _curUserIndex; - - // i'm lazy - if (_state[index / 3, 0] == _state[index / 3, 1] && _state[index / 3, 1] == _state[index / 3, 2]) - { - _state[index / 3, 0] = _curUserIndex + 2; - _state[index / 3, 1] = _curUserIndex + 2; - _state[index / 3, 2] = _curUserIndex + 2; - - _phase = Phase.Ended; - } - else if (_state[0, index % 3] == _state[1, index % 3] && _state[1, index % 3] == _state[2, index % 3]) - { - _state[0, index % 3] = _curUserIndex + 2; - _state[1, index % 3] = _curUserIndex + 2; - _state[2, index % 3] = _curUserIndex + 2; - - _phase = Phase.Ended; - } - else if (_curUserIndex == _state[0, 0] && _state[0, 0] == _state[1, 1] && _state[1, 1] == _state[2, 2]) - { - _state[0, 0] = _curUserIndex + 2; - _state[1, 1] = _curUserIndex + 2; - _state[2, 2] = _curUserIndex + 2; - - _phase = Phase.Ended; - } - else if (_curUserIndex == _state[0, 2] && _state[0, 2] == _state[1, 1] && _state[1, 1] == _state[2, 0]) - { - _state[0, 2] = _curUserIndex + 2; - _state[1, 1] = _curUserIndex + 2; - _state[2, 0] = _curUserIndex + 2; - - _phase = Phase.Ended; - } - var reason = ""; - - if (_phase == Phase.Ended) // if user won, stop receiving moves - { - reason = GetText("ttt_matched_three"); - _winner = _users[_curUserIndex]; - _client.MessageReceived -= Client_MessageReceived; - OnEnded?.Invoke(this); - } - else if (IsDraw()) - { - reason = GetText("ttt_a_draw"); - _phase = Phase.Ended; - _client.MessageReceived -= Client_MessageReceived; - OnEnded?.Invoke(this); - } - - var sendstate = Task.Run(async () => - { - var del1 = msg.DeleteAsync(); - var del2 = _previousMessage?.DeleteAsync(); - try { _previousMessage = await _channel.EmbedAsync(GetEmbed(reason)); } catch { } - try { await del1; } catch { } - try { if (del2 != null) await del2; } catch { } - }); - _curUserIndex ^= 1; - - _timeoutTimer.Change(15000, Timeout.Infinite); - } - } - finally - { - _moveLock.Release(); - } - }); - - return Task.CompletedTask; - } - } - } -} \ No newline at end of file diff --git a/src/NadekoBot/Modules/Utility/Services/ConverterService.cs b/src/NadekoBot/Modules/Utility/Services/ConverterService.cs deleted file mode 100644 index 49bfd43e..00000000 --- a/src/NadekoBot/Modules/Utility/Services/ConverterService.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Discord.WebSocket; -using NadekoBot.Services; -using NadekoBot.Services.Database.Models; -using Newtonsoft.Json; -using NLog; - -namespace NadekoBot.Modules.Utility.Services -{ - public class ConverterService : INService - { - public List Units { get; } = new List(); - private readonly Logger _log; - private readonly Timer _currencyUpdater; - private readonly TimeSpan _updateInterval = new TimeSpan(12, 0, 0); - private readonly DbService _db; - private readonly ConvertUnit[] fileData; - - public ConverterService(DiscordSocketClient client, DbService db) - { - _log = LogManager.GetCurrentClassLogger(); - _db = db; - - if (client.ShardId == 0) - { - try - { - fileData = JsonConvert.DeserializeObject>( - File.ReadAllText("data/units.json")) - .Select(u => new ConvertUnit() - { - Modifier = u.Modifier, - UnitType = u.UnitType, - InternalTrigger = string.Join("|", u.Triggers) - }).ToArray(); - - using (var uow = _db.UnitOfWork) - { - if (uow.ConverterUnits.Empty()) - { - uow.ConverterUnits.AddRange(fileData); - - Units = uow.ConverterUnits.GetAll().ToList(); - uow.Complete(); - } - } - } - catch (Exception ex) - { - _log.Warn("Could not load units: " + ex.Message); - } - } - - _currencyUpdater = new Timer(async (shouldLoad) => await UpdateCurrency((bool)shouldLoad), - client.ShardId == 0, - TimeSpan.FromSeconds(1), - _updateInterval); - } - - private async Task GetCurrencyRates() - { - using (var http = new HttpClient()) - { - var res = await http.GetStringAsync("http://api.fixer.io/latest").ConfigureAwait(false); - return JsonConvert.DeserializeObject(res); - } - } - - private async Task UpdateCurrency(bool shouldLoad) - { - try - { - var unitTypeString = "currency"; - if (shouldLoad) - { - var currencyRates = await GetCurrencyRates(); - var baseType = new ConvertUnit() - { - Triggers = new[] { currencyRates.Base }, - Modifier = decimal.One, - UnitType = unitTypeString - }; - var range = currencyRates.ConversionRates.Select(u => new ConvertUnit() - { - InternalTrigger = u.Key, - Modifier = u.Value, - UnitType = unitTypeString - }).ToArray(); - var toRemove = Units.Where(u => u.UnitType == unitTypeString); - - using (var uow = _db.UnitOfWork) - { - if(toRemove.Any()) - uow.ConverterUnits.RemoveRange(toRemove.ToArray()); - uow.ConverterUnits.Add(baseType); - uow.ConverterUnits.AddRange(range); - - await uow.CompleteAsync().ConfigureAwait(false); - } - Units.RemoveAll(u => u.UnitType == unitTypeString); - Units.Add(baseType); - Units.AddRange(range); - Units.AddRange(fileData); - } - else - { - using (var uow = _db.UnitOfWork) - { - Units.RemoveAll(u => u.UnitType == unitTypeString); - Units.AddRange(uow.ConverterUnits.GetAll().ToArray()); - } - } - } - catch - { - _log.Warn("Failed updating currency. Ignore this."); - } - } - } - - public class MeasurementUnit - { - public List Triggers { get; set; } - public string UnitType { get; set; } - public decimal Modifier { get; set; } - } - - public class Rates - { - public string Base { get; set; } - public DateTime Date { get; set; } - [JsonProperty("rates")] - public Dictionary ConversionRates { get; set; } - } -} diff --git a/src/NadekoBot/NadekoBot.csproj b/src/NadekoBot/NadekoBot.csproj index 816e2916..c8516bae 100644 --- a/src/NadekoBot/NadekoBot.csproj +++ b/src/NadekoBot/NadekoBot.csproj @@ -4,33 +4,27 @@ netcoreapp2.0 2.0.0 exe - $(AssetTargetFallback);dnxcore50;portable-net45+win8+wpa81 nadeko_icon.ico - win7-x64 - Debug;Release;global_nadeko latest true - 1.9.1 + 2.0.0 $(VersionPrefix).$(VersionSuffix) $(VersionPrefix) - - - - - - - + Always - - Always + + PreserveNewest + + + PreserveNewest PreserveNewest @@ -38,16 +32,10 @@ PreserveNewest - - PreserveNewest - - - Never - - + @@ -75,7 +63,10 @@ - + + + + diff --git a/src/NadekoBot/Program.cs b/src/NadekoBot/Program.cs index 09e53142..86349dac 100644 --- a/src/NadekoBot/Program.cs +++ b/src/NadekoBot/Program.cs @@ -1,18 +1,29 @@ -namespace NadekoBot +using NadekoBot.Core.Services; +using System.Diagnostics; +using System.Threading.Tasks; + +namespace NadekoBot { public class Program { - public static void Main(string[] args) + public static Task Main(string[] args) { - if (args.Length == 3 && int.TryParse(args[0], out int shardId) && int.TryParse(args[1], out int parentProcessId)) + if (args.Length == 2 + && int.TryParse(args[0], out int shardId) + && int.TryParse(args[1], out int parentProcessId)) { - int? port = null; - if (int.TryParse(args[2], out var outPort)) - port = outPort; - new NadekoBot(shardId, parentProcessId, outPort).RunAndBlockAsync(args).GetAwaiter().GetResult(); + return new NadekoBot(shardId, parentProcessId) + .RunAndBlockAsync(args); } else - new NadekoBot(0, 0).RunAndBlockAsync(args).GetAwaiter().GetResult(); + { +#if DEBUG + var _ = new NadekoBot(0, Process.GetCurrentProcess().Id) + .RunAsync(args); +#endif + return new ShardsCoordinator() + .RunAndBlockAsync(); + } } } } diff --git a/src/NadekoBot/Services/Database/Models/ClashCaller.cs b/src/NadekoBot/Services/Database/Models/ClashCaller.cs deleted file mode 100644 index 88ad4b78..00000000 --- a/src/NadekoBot/Services/Database/Models/ClashCaller.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations.Schema; - -namespace NadekoBot.Services.Database.Models -{ - public class ClashCaller : DbEntity - { - public int? SequenceNumber { get; set; } = null; - public string CallUser { get; set; } - - public DateTime TimeAdded { get; set; } - - public bool BaseDestroyed { get; set; } - - public int Stars { get; set; } = 3; - - public int ClashWarId { get; set; } - - [ForeignKey(nameof(ClashWarId))] - public ClashWar ClashWar { get; set; } - } -} diff --git a/src/NadekoBot/Services/Database/Models/ClashWar.cs b/src/NadekoBot/Services/Database/Models/ClashWar.cs deleted file mode 100644 index aa1baca1..00000000 --- a/src/NadekoBot/Services/Database/Models/ClashWar.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Discord; -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; - -namespace NadekoBot.Services.Database.Models -{ - public class ClashWar : DbEntity - { - public string EnemyClan { get; set; } - public int Size { get; set; } - public StateOfWar WarState { get; set; } = StateOfWar.Created; - public DateTime StartedAt { get; set; } - - public ulong GuildId { get; set; } - public ulong ChannelId { get; set; } - - [NotMapped] - public ITextChannel Channel { get; set; } - - public List Bases { get; set; } = new List(); - } - - public enum DestroyStars - { - One, Two, Three - } - public enum StateOfWar - { - Started, Ended, Created - } -} diff --git a/src/NadekoBot/Services/Database/Models/ConvertUnit.cs b/src/NadekoBot/Services/Database/Models/ConvertUnit.cs deleted file mode 100644 index f31c4ad3..00000000 --- a/src/NadekoBot/Services/Database/Models/ConvertUnit.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.ComponentModel; -using System.ComponentModel.DataAnnotations.Schema; - -namespace NadekoBot.Services.Database.Models -{ - public class ConvertUnit : DbEntity - { - public ConvertUnit() { } - [NotMapped] - private string[] _triggersValue; - [NotMapped] - public string[] Triggers - { - get - { - return _triggersValue ?? (_triggersValue = InternalTrigger.Split('|')); - } - set - { - _triggersValue = value; - InternalTrigger = string.Join("|", _triggersValue); - } - } - //protected or private? - /// - /// DO NOT CALL THIS - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public string InternalTrigger { get; set; } - public string UnitType { get; set; } - public decimal Modifier { get; set; } - - public override bool Equals(object obj) - { - var cu = obj as ConvertUnit; - if (cu == null) - return false; - return cu.UnitType == this.UnitType; - } - - public override int GetHashCode() - { - return this.UnitType.GetHashCode(); - } - } - -} diff --git a/src/NadekoBot/Services/Database/Repositories/IClashOfClansRepository.cs b/src/NadekoBot/Services/Database/Repositories/IClashOfClansRepository.cs deleted file mode 100644 index 14edcea8..00000000 --- a/src/NadekoBot/Services/Database/Repositories/IClashOfClansRepository.cs +++ /dev/null @@ -1,10 +0,0 @@ -using NadekoBot.Services.Database.Models; -using System.Collections.Generic; - -namespace NadekoBot.Services.Database.Repositories -{ - public interface IClashOfClansRepository : IRepository - { - IEnumerable GetAllWars(List guilds); - } -} diff --git a/src/NadekoBot/Services/Database/Repositories/ICurrencyTransactionsRepository.cs b/src/NadekoBot/Services/Database/Repositories/ICurrencyTransactionsRepository.cs deleted file mode 100644 index dd583ed9..00000000 --- a/src/NadekoBot/Services/Database/Repositories/ICurrencyTransactionsRepository.cs +++ /dev/null @@ -1,8 +0,0 @@ -using NadekoBot.Services.Database.Models; - -namespace NadekoBot.Services.Database.Repositories -{ - public interface ICurrencyTransactionsRepository : IRepository - { - } -} diff --git a/src/NadekoBot/Services/Database/Repositories/ICustomReactionRepository.cs b/src/NadekoBot/Services/Database/Repositories/ICustomReactionRepository.cs deleted file mode 100644 index 83d10990..00000000 --- a/src/NadekoBot/Services/Database/Repositories/ICustomReactionRepository.cs +++ /dev/null @@ -1,9 +0,0 @@ -using NadekoBot.Services.Database.Models; - -namespace NadekoBot.Services.Database.Repositories -{ - public interface ICustomReactionRepository : IRepository - { - - } -} diff --git a/src/NadekoBot/Services/Database/Repositories/ISelfAssignedRolesRepository.cs b/src/NadekoBot/Services/Database/Repositories/ISelfAssignedRolesRepository.cs deleted file mode 100644 index 249ece0a..00000000 --- a/src/NadekoBot/Services/Database/Repositories/ISelfAssignedRolesRepository.cs +++ /dev/null @@ -1,11 +0,0 @@ -using NadekoBot.Services.Database.Models; -using System.Collections.Generic; - -namespace NadekoBot.Services.Database.Repositories -{ - public interface ISelfAssignedRolesRepository : IRepository - { - bool DeleteByGuildAndRoleId(ulong guildId, ulong roleId); - IEnumerable GetFromGuild(ulong guildId); - } -} diff --git a/src/NadekoBot/Services/Database/Repositories/IUnitConverterRepository.cs b/src/NadekoBot/Services/Database/Repositories/IUnitConverterRepository.cs deleted file mode 100644 index 527f0de1..00000000 --- a/src/NadekoBot/Services/Database/Repositories/IUnitConverterRepository.cs +++ /dev/null @@ -1,11 +0,0 @@ -using NadekoBot.Services.Database.Models; -using System; - -namespace NadekoBot.Services.Database.Repositories -{ - public interface IUnitConverterRepository : IRepository - { - void AddOrUpdate(Func check, ConvertUnit toAdd, Func toUpdate); - bool Empty(); - } -} diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/ClashOfClansRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/ClashOfClansRepository.cs deleted file mode 100644 index 828c4bce..00000000 --- a/src/NadekoBot/Services/Database/Repositories/Impl/ClashOfClansRepository.cs +++ /dev/null @@ -1,24 +0,0 @@ -using NadekoBot.Services.Database.Models; -using System.Collections.Generic; -using System.Linq; -using Microsoft.EntityFrameworkCore; - -namespace NadekoBot.Services.Database.Repositories.Impl -{ - public class ClashOfClansRepository : Repository, IClashOfClansRepository - { - public ClashOfClansRepository(DbContext context) : base(context) - { - } - - public IEnumerable GetAllWars(List guilds) - { - var toReturn = _set - .Where(cw => guilds.Contains((long)cw.GuildId)) - .Include(cw => cw.Bases) - .ToList(); - toReturn.ForEach(cw => cw.Bases = cw.Bases.Where(w => w.SequenceNumber != null).OrderBy(w => w.SequenceNumber).ToList()); - return toReturn; - } - } -} diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs deleted file mode 100644 index 2e3caa50..00000000 --- a/src/NadekoBot/Services/Database/Repositories/Impl/UnitCOnverterRepository.cs +++ /dev/null @@ -1,26 +0,0 @@ -using NadekoBot.Services.Database.Models; -using System; -using System.Linq; -using Microsoft.EntityFrameworkCore; - -namespace NadekoBot.Services.Database.Repositories.Impl -{ - public class UnitConverterRepository : Repository, IUnitConverterRepository - { - public UnitConverterRepository(DbContext context) : base(context) - { - } - - public void AddOrUpdate(Func check, ConvertUnit toAdd, Func toUpdate) - { - var existing = _set.FirstOrDefault(check); - if (existing != null) - { - existing = toUpdate.Invoke(existing); - } - else _set.Add(toAdd); - } - - public bool Empty() => !_set.Any(); - } -} diff --git a/src/NadekoBot/Services/INService.cs b/src/NadekoBot/Services/INService.cs deleted file mode 100644 index 13bbbeea..00000000 --- a/src/NadekoBot/Services/INService.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace NadekoBot.Services -{ - /// - /// All services must implement this interface in order to be auto-discovered by the DI system - /// - public interface INService - { - - } -} diff --git a/src/NadekoBot/ShardsCoordinator.cs b/src/NadekoBot/ShardsCoordinator.cs deleted file mode 100644 index 72ed349c..00000000 --- a/src/NadekoBot/ShardsCoordinator.cs +++ /dev/null @@ -1,84 +0,0 @@ -using NadekoBot.Services; -using NadekoBot.Services.Impl; -using NLog; -using System; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; -using NadekoBot.Common.ShardCom; - -namespace NadekoBot -{ - public class ShardsCoordinator - { - private readonly BotCredentials _creds; - private readonly Process[] _shardProcesses; - public ShardComMessage[] Statuses { get; } - public int GuildCount => Statuses.ToArray() - .Where(x => x != null) - .Sum(x => x.Guilds); - - private readonly Logger _log; - private readonly ShardComServer _comServer; - private readonly int _port; - private readonly int _curProcessId; - - public ShardsCoordinator(int port) - { - LogSetup.SetupLogger(); - _creds = new BotCredentials(); - _shardProcesses = new Process[_creds.TotalShards]; - Statuses = new ShardComMessage[_creds.TotalShards]; - _log = LogManager.GetCurrentClassLogger(); - _port = port; - - _comServer = new ShardComServer(port); - _comServer.Start(); - - _comServer.OnDataReceived += _comServer_OnDataReceived; - - _curProcessId = Process.GetCurrentProcess().Id; - } - - private Task _comServer_OnDataReceived(ShardComMessage msg) - { - Statuses[msg.ShardId] = msg; - - if (msg.ConnectionState == Discord.ConnectionState.Disconnected || msg.ConnectionState == Discord.ConnectionState.Disconnecting) - _log.Error("!!! SHARD {0} IS IN {1} STATE", msg.ShardId, msg.ConnectionState.ToString()); - return Task.CompletedTask; - } - - public async Task RunAsync() - { - for (int i = 1; i < _creds.TotalShards; i++) - { - var p = Process.Start(new ProcessStartInfo() - { - FileName = _creds.ShardRunCommand, - Arguments = string.Format(_creds.ShardRunArguments, i, _curProcessId, _port) - }); - await Task.Delay(5000); - } - } - - public async Task RunAndBlockAsync() - { - try - { - await RunAsync().ConfigureAwait(false); - } - catch (Exception ex) - { - _log.Error(ex); - } - - await Task.Delay(-1); - foreach (var p in _shardProcesses) - { - try { p.Kill(); } catch { } - try { p.Dispose(); } catch { } - } - } - } -} diff --git a/src/NadekoBot/_strings/ResponseStrings.en-US.json b/src/NadekoBot/_strings/ResponseStrings.en-US.json index d1c2e022..c54f272b 100644 --- a/src/NadekoBot/_strings/ResponseStrings.en-US.json +++ b/src/NadekoBot/_strings/ResponseStrings.en-US.json @@ -157,7 +157,7 @@ "administration_renrole_err": "Failed to rename role. I have insufficient permissions.", "administration_renrole_perms": "You can't edit roles higher than your highest role.", "administration_reprm": "Removed the playing message: {0}", - "administration_role_added": "Role {0} has been added to the list.", + "administration_role_added": "Role {0} has been added to the list in group {1}.", "administration_role_clean": "{0} not found.Cleaned up.", "administration_role_in_list": "Role {0} is already in the list.", "administration_ropl_added": "Added.", @@ -166,6 +166,8 @@ "administration_ropl_list": "Here is a list of rotating statuses:\n{0}", "administration_ropl_not_set": "No rotating playing statuses set.", "administration_self_assign_already": "You already have {0} role.", + "administration_self_assign_are_exclusive": "You can only choose 1 role from each group.", + "administration_self_assign_are_not_exclusive": "You can choose any number of roles from any group.", "administration_self_assign_already_excl": "You already have {0} exclusive self-assigned role.", "administration_self_assign_excl": "Self assigned roles are now exclusive!", "administration_self_assign_list": "There are {0} self assignable roles", @@ -176,6 +178,7 @@ "administration_self_assign_rem": "{0} has been removed from the list of self-assignable roles.", "administration_self_assign_remove": "You no longer have {0} role.", "administration_self_assign_success": "You now have {0} role.", + "administration_self_assign_group": "Group {0}", "administration_setrole": "Successfully added role {0} to user {1}", "administration_setrole_err": "Failed to add role. I have insufficient permissions.", "administration_set_avatar": "New avatar set!", @@ -660,7 +663,7 @@ "utility_nobody_playing_game": "Nobody is playing that game.", "utility_no_active_repeaters": "No active repeaters.", "utility_no_roles_on_page": "No roles on this page.", - "utility_no_shards_on_page": "No shards on this page.", + "administration_no_shards_on_page": "No shards on this page.", "utility_no_topic_set": "No topic set.", "utility_owner": "Owner", "utility_owner_ids": "Owner IDs", @@ -693,8 +696,8 @@ "utility_serverid": "{0} of this server is {1}", "utility_server_info": "Server info", "utility_shard": "Shard", - "utility_shard_stats": "Shard stats", - "utility_shard_stats_txt": "Shard **#{0}** is in {1} state with {2} servers - {3} ago", + "administration_shard_stats": "Shard stats", + "administration_shard_stats_txt": "Shard **#{0}** is in {1} state with {2} servers - {3} ago", "utility_showemojis": "**Name:** {0} **Link:** {1}", "utility_showemojis_none": "No special emojis found.", "utility_stats_songs": "Playing {0} songs, {1} queued.", @@ -884,5 +887,9 @@ "administration_restarting": "Restarting.", "customreactions_edit_fail": "Custom reaction with that ID does not exist.", "searches_streaming": "Streaming", - "searches_followers": "Followers" + "searches_followers": "Followers", + "gambling_rafflecur": "{0} Currency Raffle", + "gambling_rafflecur_joined": "User {0} joined the raffle", + "gambling_rafflecur_already_joined": "You have already joined this raffle or the value you used is not valid.", + "gambling_rafflecur_ended": "{0} raffle ended. {1} won {2}!" } \ No newline at end of file diff --git a/src/NadekoBot/data/command_strings.json b/src/NadekoBot/data/command_strings.json index eda80535..2b0dbce4 100644 --- a/src/NadekoBot/data/command_strings.json +++ b/src/NadekoBot/data/command_strings.json @@ -204,9 +204,11 @@ }, "asar": { "Cmd": "asar", - "Desc": "Adds a role to the list of self-assignable roles.", + "Desc": "Adds a role to the list of self-assignable roles. You can also specify a group. If 'Exclusive self-assignable roles' feature is enabled, users will be able to pick one role per group.", "Usage": [ - "{0}asar Gamer" + "{0}asar Gamer", + "{0}asar 1 Alliance", + "{0}asar 1 Horde" ] }, "rsar": { @@ -225,7 +227,7 @@ }, "tesar": { "Cmd": "togglexclsar tesar", - "Desc": "Toggles whether the self-assigned roles are exclusive. (So that any person can have only one of the self assignable roles)", + "Desc": "Toggles whether the self-assigned roles are exclusive. While enabled, users can only have one self-assignable role per group.", "Usage": [ "{0}tesar" ] @@ -1311,9 +1313,9 @@ }, "deleteplaylist": { "Cmd": "deleteplaylist delpls", - "Desc": "Deletes a saved playlist. Works only if you made it or if you are the bot owner.", + "Desc": "Deletes a saved playlist using its id. Works only if you made it or if you are the bot owner.", "Usage": [ - "{0}delpls animu-5" + "{0}delpls 5" ] }, "goto": { @@ -1836,7 +1838,7 @@ }, "antispam": { "Cmd": "antispam", - "Desc": "Stops people from repeating same message X times in a row. You can specify to either mute, kick or ban the offenders. Max message count is 10.", + "Desc": "Stops people from repeating same message X times in a row. You can specify to either mute, kick or ban the offenders. If you're using mute, you can add a number of seconds at the end to use a timed mute. Max message count is 10.", "Usage": [ "{0}antispam 3 Mute", "{0}antispam 4 Kick", @@ -2991,7 +2993,7 @@ }, "editcustreact": { "cmd": "editcustreact ecr", - "desc": "Edits the custom reaction's response given it's ID.", + "desc": "Edits the custom reaction's response given its ID.", "usage": [ "{0}ecr 123 I'm a magical girl" ] @@ -3002,5 +3004,48 @@ "usage": [ "{0}say hi" ] + }, + "execsql": { + "cmd": "execsql", + "desc": "Executes an sql command and returns the number of affected rows. Dangerous.", + "usage": [ + "{0}execsql UPDATE Currency SET Amount=Amount+1234" + ] + }, + "deletewaifus": { + "cmd": "deletewaifus", + "desc": "Deletes everything from WaifuUpdates and WaifuInfo tables.", + "usage": [ + "{0}deletewaifus" + ] + }, + "deletecurrency": { + "cmd": "deletecurrency", + "desc": "Deletes everything from Currency and CurrencyTransactions.", + "usage": [ + "{0}deletecurrency" + ] + }, + "deleteplaylists": { + "cmd": "deleteplaylists", + "desc": "Deletes everything from MusicPlaylists.", + "usage": [ + "{0}deleteplaylists" + ] + }, + "deletexp": { + "cmd": "deletexp", + "desc": "Deletes everything from UserXpStats, Clubs and sets users' TotalXP to 0.", + "usage": [ + "{0}execsql UPDATE Currency SET Amount=Amount+1234" + ] + }, + "rafflecur": { + "cmd": "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.", + "usage": [ + "{0}rafflecur 20", + "{0}rafflecur mixed 15" + ] } } \ No newline at end of file