Result classes can derive when new instance is created.

This commit is contained in:
max
2024-10-14 03:20:44 +02:00
parent 0fed89e140
commit 17f69824eb
5 changed files with 93 additions and 29 deletions

View File

@@ -1,8 +1,17 @@
using DotBased.ASP.Auth.Domains.Identity;
namespace DotBased.ASP.Auth.Domains.Auth;
public class AuthenticationStateModel
{
public string Id { get; set; } = string.Empty;
public AuthenticationStateModel(UserModel user)
{
UserId = user.Id;
}
public string Id { get; set; } = Guid.NewGuid().ToString();
public string UserId { get; set; }
public DateTime CreationDate { get; set; } = DateTime.Now;
public override bool Equals(object? obj)
{