elliebot/src/EllieBot/Db/Models/DiscordUser.cs
Toastie 988d8c0250
.savechat no longer owneronly
started implementation of bigwin announcement, but there are problems
2025-03-14 21:03:23 +13:00

27 lines
No EOL
716 B
C#

namespace EllieBot.Db.Models;
public class DiscordUser : DbEntity
{
public const string DEFAULT_USERNAME = "??Unknown";
public ulong UserId { get; set; }
public string? Username { get; set; }
public string? AvatarId { get; set; }
public int? ClubId { get; set; }
public ClubInfo? Club { get; set; }
public bool IsClubAdmin { get; set; }
public long TotalXp { get; set; }
public long CurrencyAmount { get; set; }
public override bool Equals(object? obj)
=> obj is DiscordUser du ? du.UserId == UserId : false;
public override int GetHashCode()
=> UserId.GetHashCode();
public override string ToString()
=> Username ?? DEFAULT_USERNAME;
}