auto.bus_api/Server/Models/RefreshToken.cs
cuqmbr 95028ed18b feat: many thing
- Database model
- Data transfer objects
- Country management controller
2022-10-10 20:34:09 +03:00

14 lines
391 B
C#

using Microsoft.EntityFrameworkCore;
namespace Server.Models;
[Owned]
public class RefreshToken
{
public string Token { get; set; } = null!;
public DateTime Expires { get; set; }
public bool IsExpired => DateTime.UtcNow >= Expires;
public DateTime Created { get; set; }
public DateTime? Revoked { get; set; }
public bool IsActive => Revoked == null && !IsExpired;
}