feat(core): add models for institution
This commit is contained in:
@@ -2,15 +2,17 @@ namespace FiscalOS.Core.Identity;
|
||||
|
||||
public sealed class User : Entity
|
||||
{
|
||||
private readonly List<RefreshToken> _refreshTokens = [];
|
||||
|
||||
public string Username { get; init; } = string.Empty;
|
||||
public string HashedPassword { get; init; } = string.Empty;
|
||||
public string EncryptionKeyId { get; init; } = string.Empty;
|
||||
public string EncryptedDataKey { get; init; } = string.Empty;
|
||||
|
||||
private readonly List<RefreshToken> _refreshTokens = [];
|
||||
public IEnumerable<RefreshToken> RefreshTokens => _refreshTokens;
|
||||
|
||||
private readonly List<Institution> _institutions = [];
|
||||
public IEnumerable<Institution> Institutions => _institutions;
|
||||
|
||||
private User()
|
||||
{
|
||||
}
|
||||
@@ -41,4 +43,11 @@ public sealed class User : Entity
|
||||
|
||||
_refreshTokens.Add(refreshToken);
|
||||
}
|
||||
|
||||
public void AddInstitution(Institution institution)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(institution);
|
||||
|
||||
_institutions.Add(institution);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user