2022-07-21 01:55:08 +00:00
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
|
|
|
namespace RegexBot.Data;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Represents an item in the guild user cache.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Table("cache_usersinguild")]
|
|
|
|
|
public class CachedGuildUser {
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the associated guild's snowflake ID.
|
|
|
|
|
/// </summary>
|
2022-12-04 01:46:26 +00:00
|
|
|
|
public ulong GuildId { get; set; }
|
2022-07-21 01:55:08 +00:00
|
|
|
|
|
2022-08-27 04:42:25 +00:00
|
|
|
|
/// <inheritdoc cref="CachedUser.UserId"/>
|
2022-12-04 01:46:26 +00:00
|
|
|
|
public ulong UserId { get; set; }
|
2022-08-27 04:42:25 +00:00
|
|
|
|
|
2022-07-21 01:55:08 +00:00
|
|
|
|
/// <inheritdoc cref="CachedUser.ULastUpdateTime"/>
|
|
|
|
|
public DateTimeOffset GULastUpdateTime { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the timestamp showing when this cache entry was first added into the database.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DateTimeOffset FirstSeenTime { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the user's cached nickname in the guild.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string? Nickname { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If included in the query, references the associated <seealso cref="CachedUser"/> for this entry.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ForeignKey(nameof(UserId))]
|
|
|
|
|
[InverseProperty(nameof(CachedUser.Guilds))]
|
|
|
|
|
public CachedUser User { get; set; } = null!;
|
2022-08-24 02:57:04 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// If included in the query, references all <seealso cref="ModLogEntry"/> items associated with this entry.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ICollection<ModLogEntry> Logs { get; set; } = null!;
|
2022-07-21 01:55:08 +00:00
|
|
|
|
}
|