Created
July 3, 2019 12:55
-
-
Save miceiken/57a1c9e27a3d4d1d0548d342c0684d31 to your computer and use it in GitHub Desktop.
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
using System; | |
namespace Identity.Models | |
{ | |
public abstract class Identifier | |
{ | |
public DateTime CreationTime { get; set; } | |
} | |
public abstract class ContactableIdentifier : Identifier | |
{ | |
public bool Verified { get; set; } | |
} | |
public class UsernameIdentifier : Identifier | |
{ | |
public UsernameIdentifier(string username) | |
{ | |
Username = username; | |
} | |
public string Username { get; set; } | |
public override string ToString() => Username; | |
} | |
public class EmailIdentifier : ContactableIdentifier | |
{ | |
public EmailIdentifier(string email) | |
{ | |
Email = email; | |
} | |
public string Email { get; set; } | |
public override string ToString() => Email; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment