Init Commit

This commit is contained in:
2026-01-29 13:43:44 -03:00
commit b9aa8478db
126 changed files with 20649 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
using System.ComponentModel.DataAnnotations;
namespace MotoresArgentinosV2.Core.Entities;
public class RefreshToken
{
[Key]
public int Id { get; set; }
public string Token { get; set; } = string.Empty;
public DateTime Expires { get; set; }
public DateTime Created { get; set; } = DateTime.UtcNow;
public string? CreatedByIp { get; set; }
public DateTime? Revoked { get; set; }
public string? RevokedByIp { get; set; }
public string? ReplacedByToken { get; set; }
public bool IsActive => Revoked == null && !IsExpired;
public bool IsExpired => DateTime.UtcNow >= Expires;
public int UserId { get; set; }
public User User { get; set; } = null!;
}