autobus-api_old/AutobusApi.Infrastructure/Identity/RefreshToken.cs
2023-11-15 19:00:34 +02:00

23 lines
588 B
C#

namespace AutobusApi.Infrastructure.Identity;
public class RefreshToken
{
public int Id { get; set; }
public string Value { get; set; } = null!;
public DateTime CreationDateTimeUtc { get; set; }
public DateTime ExpirationDateTimeUtc { get; set; }
public DateTime? RevokationDateTimeUtc { get; set; }
public bool IsExpired => DateTime.UtcNow >= ExpirationDateTimeUtc;
public bool IsActive => RevokationDateTimeUtc is null && !IsExpired;
public int ApplicationUserId { get; set; }
public ApplicationUser ApplicationUser { get; set; } = null!;
}