UserSession namespace was changed

This commit is contained in:
Artemy
2025-07-24 21:37:12 +07:00
parent 5a734ecbdc
commit e9eee5bfec
14 changed files with 85 additions and 72 deletions
+25
View File
@@ -0,0 +1,25 @@
namespace Govor.Core.Models.Users;
public class UserSession
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid UserId { get; set; }
public string RefreshToken { get; set; } = string.Empty;
public string DeviceInfo { get; set; } = string.Empty; // "Chrome on Windows"
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime ExpiresAt { get; set; }
public bool IsRevoked { get; set; } = false;
public override bool Equals(object? obj)
{
UserSession? userSession = obj as UserSession;
return Id == userSession.Id &&
UserId == userSession.UserId &&
RefreshToken == userSession.RefreshToken &&
DeviceInfo == userSession.DeviceInfo &&
CreatedAt == userSession.CreatedAt &&
ExpiresAt == userSession.ExpiresAt &&
IsRevoked == userSession.IsRevoked;
}
}