using Galaeth.Core.Attributes.EntityAnnotation; using Galaeth.Core.Constants; using MyCSharp.HttpUserAgentParser; namespace Galaeth.Core.Entities; /// /// Entity representing a refresh token. /// [TableMapping("refreshTokens")] public class RefreshToken { /// /// The token. /// [ColumnMapping("token")] [PrimaryKey] public string Token { get; set; } /// /// Token context. /// [ColumnMapping("tokenContext")] public RefreshTokenContext TokenContext { get; set; } /// /// The owner user's id. /// [ColumnMapping("userId")] public Guid UserId { get; set; } /// /// When the token expires. /// [ColumnMapping("expires")] public DateTime Expires { get; set; } /// /// The user agent this refresh token belongs to. /// [ColumnMapping("userAgent")] public string UserAgent { get; set; } /// /// User agent type. /// [ColumnMapping("userAgentType")] public HttpUserAgentType UserAgentType { get; set; } /// /// The ip address this refresh token belongs to. /// [ColumnMapping("ipAddress")] public string IpAddress { get; set; } /// /// When the token was created. /// [ColumnMapping("createdAt")] public DateTime CreatedAt { get; set; } }