using System.ComponentModel.DataAnnotations.Schema;
namespace RegexBot.Data;
///
/// Represents an item in the guild user cache.
///
[Table("cache_usersinguild")]
public class CachedGuildUser {
///
public long UserId { get; set; }
///
/// Gets the associated guild's snowflake ID.
///
public long GuildId { get; set; }
///
public DateTimeOffset GULastUpdateTime { get; set; }
///
/// Gets the timestamp showing when this cache entry was first added into the database.
///
public DateTimeOffset FirstSeenTime { get; set; }
///
/// Gets the user's cached nickname in the guild.
///
public string? Nickname { get; set; }
///
/// If included in the query, references the associated for this entry.
///
[ForeignKey(nameof(UserId))]
[InverseProperty(nameof(CachedUser.Guilds))]
public CachedUser User { get; set; } = null!;
}