Added Db stuff

This commit is contained in:
Toastie 2024-05-14 23:08:36 +12:00
parent 545786e23e
commit 9fff64f951
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
87 changed files with 2881 additions and 0 deletions
src/EllieBot/Db/Models

View file

@ -0,0 +1,19 @@
#nullable disable
namespace EllieBot.Db.Models;
public class FeedSub : DbEntity
{
public int GuildConfigId { get; set; }
public GuildConfig GuildConfig { get; set; }
public ulong ChannelId { get; set; }
public string Url { get; set; }
public string Message { get; set; }
public override int GetHashCode()
=> Url.GetHashCode(StringComparison.InvariantCulture) ^ GuildConfigId.GetHashCode();
public override bool Equals(object obj)
=> obj is FeedSub s && s.Url.ToLower() == Url.ToLower() && s.GuildConfigId == GuildConfigId;
}