This repository has been archived by the owner on Jul 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implemented user profile. * Removed comments.
- Loading branch information
Showing
6 changed files
with
142 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
backend/src/Logitar.Master.Contracts/Accounts/AccountPhone.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Logitar.Identity.Contracts.Users; | ||
|
||
namespace Logitar.Master.Contracts.Accounts; | ||
|
||
public record AccountPhone | ||
{ | ||
public string? CountryCode { get; set; } | ||
public string Number { get; set; } | ||
|
||
public AccountPhone() : this(string.Empty) | ||
{ | ||
} | ||
|
||
public AccountPhone(IPhone phone) : this(phone.Number, phone.CountryCode) | ||
{ | ||
} | ||
|
||
public AccountPhone(string number, string? countryCode = null) | ||
{ | ||
Number = number; | ||
CountryCode = countryCode; | ||
} | ||
|
||
public static AccountPhone? TryCreate(IPhone? phone) => phone == null ? null : new(phone); | ||
} |
43 changes: 43 additions & 0 deletions
43
backend/src/Logitar.Master.Contracts/Accounts/UserProfile.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using Logitar.Portal.Contracts; | ||
|
||
namespace Logitar.Master.Contracts.Accounts; | ||
|
||
public record UserProfile | ||
{ | ||
public DateTime CreatedOn { get; set; } | ||
public DateTime CompletedOn { get; set; } | ||
public DateTime UpdatedOn { get; set; } | ||
|
||
public DateTime? PasswordChangedOn { get; set; } | ||
public DateTime? AuthenticatedOn { get; set; } | ||
public MultiFactorAuthenticationMode MultiFactorAuthenticationMode { get; set; } | ||
|
||
public string EmailAddress { get; set; } | ||
public AccountPhone? Phone { get; set; } | ||
|
||
public string FirstName { get; set; } | ||
public string? MiddleName { get; set; } | ||
public string LastName { get; set; } | ||
public string FullName { get; set; } | ||
|
||
public DateTime? Birthdate { get; set; } | ||
public string? Gender { get; set; } | ||
public Locale Locale { get; set; } | ||
public string TimeZone { get; set; } | ||
|
||
public UserProfile() : this(string.Empty, string.Empty, string.Empty, string.Empty, new Locale(), string.Empty) | ||
{ | ||
} | ||
|
||
public UserProfile(string emailAddress, string firstName, string lastName, string fullName, Locale locale, string timeZone) | ||
{ | ||
EmailAddress = emailAddress; | ||
|
||
FirstName = firstName; | ||
LastName = lastName; | ||
FullName = fullName; | ||
|
||
Locale = locale; | ||
TimeZone = timeZone; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters