Skip to content

Instantly share code, notes, and snippets.

@miceiken
Created July 3, 2019 12:55
Show Gist options
  • Save miceiken/57a1c9e27a3d4d1d0548d342c0684d31 to your computer and use it in GitHub Desktop.
Save miceiken/57a1c9e27a3d4d1d0548d342c0684d31 to your computer and use it in GitHub Desktop.
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