namespace CalledIt.DataAccess.Entities;

public class RefreshTokenEntity
{
    public Guid Id { get; set; }

    public int UserId { get; set; }

#pragma warning disable CA1819 // EF Core maps byte[] directly to bytea
    public byte[] TokenHash { get; set; } = Array.Empty<byte>();
#pragma warning restore CA1819

    public DateTime CreatedAtUtc { get; set; }

    public DateTime ExpiresAtUtc { get; set; }

    public DateTime? RevokedAtUtc { get; set; }

    public Guid? ReplacedByTokenId { get; set; }

    public UserEntity? User { get; set; }
}
