namespace API.Models.Internal.User;

public class RegistrationKey
{
    public string Id { get; set; } = Ulid.NewUlid().ToString();
    public string? LinkedRole { get; set; }
    public DateTime Created { get; set; } = DateTime.UtcNow;
}

public class RegistrationKeyIngoing
{
    public string? LinkedRole { get; set; }
}

public static class RegistrationKeyMapper
{
    public static RegistrationKey ToInternalFromIngoing(this RegistrationKeyIngoing key)
    {
        return new RegistrationKey
        {
            LinkedRole = key.LinkedRole,
        };
    }
}