mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
UserSession namespace was changed
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user