namespace Azaion.Common.Entities; /// /// AZ-531 — refresh-token session row. One row per issued refresh token. A /// "session family" is the chain of rotated sessions that all share the same /// ; reuse-detection keys off it. /// public class Session { public Guid Id { get; set; } public Guid UserId { get; set; } public string RefreshHash { get; set; } = null!; public Guid FamilyId { get; set; } public DateTime IssuedAt { get; set; } public DateTime LastUsedAt { get; set; } public DateTime ExpiresAt { get; set; } public DateTime? RevokedAt { get; set; } public string? RevokedReason { get; set; } public Guid? ParentSessionId { get; set; } public DateTime FamilyStartedAt { get; set; } } public static class SessionRevokedReasons { public const string Rotated = "rotated"; public const string ReuseDetected = "reuse_detected"; public const string LoggedOut = "logged_out"; public const string FamilyRevoked = "family_revoked"; }