mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
Implicit usings and more global usings
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using Discord;
|
||||
|
||||
namespace NadekoBot.Services.Database.Models;
|
||||
namespace NadekoBot.Services.Database.Models;
|
||||
|
||||
public class DiscordPermOverride : DbEntity
|
||||
{
|
||||
|
@@ -4,15 +4,26 @@ public class FilterChannelId : DbEntity
|
||||
{
|
||||
public ulong ChannelId { get; set; }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is FilterChannelId f
|
||||
? f.ChannelId == ChannelId
|
||||
: false;
|
||||
}
|
||||
public bool Equals(FilterChannelId other)
|
||||
=> ChannelId == other.ChannelId;
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return ChannelId.GetHashCode();
|
||||
}
|
||||
public override bool Equals(object obj)
|
||||
=> obj is FilterChannelId fci && Equals(fci);
|
||||
|
||||
public override int GetHashCode()
|
||||
=> ChannelId.GetHashCode();
|
||||
}
|
||||
|
||||
public class FilterInvitesChannelId : DbEntity
|
||||
{
|
||||
public ulong ChannelId { get; set; }
|
||||
|
||||
public bool Equals(FilterInvitesChannelId other)
|
||||
=> ChannelId == other.ChannelId;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
=> obj is FilterInvitesChannelId fci && Equals(fci);
|
||||
|
||||
public override int GetHashCode()
|
||||
=> ChannelId.GetHashCode();
|
||||
}
|
@@ -5,14 +5,9 @@ public class FilterLinksChannelId : DbEntity
|
||||
public ulong ChannelId { get; set; }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is FilterLinksChannelId f
|
||||
? f.ChannelId == ChannelId
|
||||
: false;
|
||||
}
|
||||
=> obj is FilterLinksChannelId f
|
||||
&& f.ChannelId == ChannelId;
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return ChannelId.GetHashCode();
|
||||
}
|
||||
public override int GetHashCode()
|
||||
=> ChannelId.GetHashCode();
|
||||
}
|
@@ -1,6 +1,4 @@
|
||||
using Discord;
|
||||
|
||||
namespace NadekoBot.Services.Database.Models;
|
||||
namespace NadekoBot.Services.Database.Models;
|
||||
|
||||
public class RotatingPlayingStatus : DbEntity
|
||||
{
|
||||
|
Reference in New Issue
Block a user