2017-09-10 01:52:34 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
2017-10-13 04:14:54 +00:00
|
|
|
|
namespace NadekoBot.Core.Services.Database.Models
|
2017-01-22 20:06:10 +00:00
|
|
|
|
{
|
|
|
|
|
public class DiscordUser : DbEntity
|
|
|
|
|
{
|
|
|
|
|
public ulong UserId { get; set; }
|
|
|
|
|
public string Username { get; set; }
|
|
|
|
|
public string Discriminator { get; set; }
|
|
|
|
|
public string AvatarId { get; set; }
|
2017-09-10 01:52:34 +00:00
|
|
|
|
|
|
|
|
|
public ClubInfo Club { get; set; }
|
2017-09-15 20:17:31 +00:00
|
|
|
|
public bool IsClubAdmin { get; set; }
|
2017-09-13 03:10:26 +00:00
|
|
|
|
|
|
|
|
|
public int TotalXp { get; set; }
|
2017-09-10 01:52:34 +00:00
|
|
|
|
public DateTime LastLevelUp { get; set; } = DateTime.UtcNow;
|
2017-09-11 20:43:32 +00:00
|
|
|
|
public DateTime LastXpGain { get; set; } = DateTime.MinValue;
|
2017-09-10 01:52:34 +00:00
|
|
|
|
public XpNotificationType NotifyOnLevelUp { get; set; }
|
|
|
|
|
|
|
|
|
|
public override bool Equals(object obj)
|
|
|
|
|
{
|
|
|
|
|
return obj is DiscordUser du
|
|
|
|
|
? du.UserId == UserId
|
|
|
|
|
: false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override int GetHashCode()
|
|
|
|
|
{
|
|
|
|
|
return UserId.GetHashCode();
|
|
|
|
|
}
|
2017-01-22 20:06:10 +00:00
|
|
|
|
|
|
|
|
|
public override string ToString() =>
|
|
|
|
|
Username + "#" + Discriminator;
|
|
|
|
|
}
|
|
|
|
|
}
|