mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 18:28:27 -04:00
Restructured the project structure back to the way it was, there's no reasonable way to split the modules
This commit is contained in:
35
src/NadekoBot/Db/Models/FollowedStream.cs
Normal file
35
src/NadekoBot/Db/Models/FollowedStream.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
#nullable disable
|
||||
using Nadeko.Bot.Db.Models;
|
||||
|
||||
namespace NadekoBot.Db.Models;
|
||||
|
||||
public class FollowedStream : DbEntity
|
||||
{
|
||||
public enum FType
|
||||
{
|
||||
Twitch = 0,
|
||||
Picarto = 3,
|
||||
Youtube = 4,
|
||||
Facebook = 5,
|
||||
Trovo = 6
|
||||
}
|
||||
|
||||
public ulong GuildId { get; set; }
|
||||
public ulong ChannelId { get; set; }
|
||||
public string Username { get; set; }
|
||||
public FType Type { get; set; }
|
||||
public string Message { get; set; }
|
||||
|
||||
protected bool Equals(FollowedStream other)
|
||||
=> ChannelId == other.ChannelId
|
||||
&& Username.Trim().ToUpperInvariant() == other.Username.Trim().ToUpperInvariant()
|
||||
&& Type == other.Type;
|
||||
|
||||
public override int GetHashCode()
|
||||
=> HashCode.Combine(ChannelId, Username, (int)Type);
|
||||
|
||||
public override bool Equals(object obj)
|
||||
=> obj is FollowedStream fs && Equals(fs);
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user