17 lines
565 B
C#
17 lines
565 B
C#
|
|
using System;
|
|||
|
|
|
|||
|
|
namespace OnlineSalesAutoCrop.CoreAPI.Models.Objects.Systems;
|
|||
|
|
|
|||
|
|
public class RefreshToken
|
|||
|
|
{
|
|||
|
|
public int Id { get; set; }
|
|||
|
|
public int UserId { get; set; }
|
|||
|
|
public string TokenHash { get; set; } = string.Empty;
|
|||
|
|
public string DeviceInfo { get; set; } = string.Empty;
|
|||
|
|
public string IpAddress { get; set; } = string.Empty;
|
|||
|
|
public DateTime CreatedAt { get; set; }
|
|||
|
|
public DateTime ExpiresAt { get; set; }
|
|||
|
|
public DateTime? RevokedAt { get; set; }
|
|||
|
|
public bool IsActive => RevokedAt == null && ExpiresAt > DateTime.UtcNow;
|
|||
|
|
}
|