using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace RegexBot.Data; /// /// Represents an item in the user cache. /// [Table("cache_users")] public class CachedUser { /// /// Gets the associated user's snowflake ID. /// [Key] [DatabaseGenerated(DatabaseGeneratedOption.None)] public ulong UserId { get; set; } /// /// Gets the timestamp showing when this cache entry was last updated. /// public DateTimeOffset ULastUpdateTime { get; set; } /// /// Gets the user's username value, without the discriminator. /// public string Username { get; set; } = null!; /// /// Gets the user's discriminator value. /// public string Discriminator { get; set; } = null!; /// /// Gets the avatar URL, if any, for the associated user. /// public string? AvatarUrl { get; set; } /// /// If included in the query, gets the list of associated entries for this entry. /// [InverseProperty(nameof(CachedGuildUser.User))] public ICollection Guilds { get; set; } = null!; /// /// If included in the query, gets the list of associated entries for this entry. /// [InverseProperty(nameof(CachedGuildMessage.Author))] public ICollection GuildMessages { get; set; } = null!; }