using FreeSql.DataAnnotations; namespace MAX.Framework.Security; /// 持久化登录会话;每次登录拥有独立 jti,不保存完整 JWT。 [Table(Name = "wxxd.auth_login_session")] public class OnlineUserInfo { [Column(IsPrimary = true, StringLength = 32)] public string Jti { get; set; } = string.Empty; [Column(StringLength = 255)] public string UserName { get; set; } = string.Empty; [Column(StringLength = 255)] public string NickName { get; set; } = string.Empty; /// 服务端观察到的客户端 IP;反向代理需配置受信任的转发头。 [Column(StringLength = 45)] public string LoginIp { get; set; } = string.Empty; /// UTC 登录时间。 public DateTime LoginTime { get; set; } /// UTC 到期时间,与 JWT exp 对齐。 public DateTime ExpiresAt { get; set; } /// UTC 撤销时间;保留记录供后续面板查询。 public DateTime? RevokedAt { get; set; } }