1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-04 20:50:21 -05:00
bitwarden/src/Api/Models/Request/Accounts/RegisterRequestModel.cs
2015-12-08 22:57:38 -05:00

30 lines
709 B
C#

using System.ComponentModel.DataAnnotations;
using Bit.Core.Domains;
namespace Bit.Api.Models
{
public class RegisterRequestModel
{
[Required]
public string Token { get; set; }
[Required]
public string Name { get; set; }
[Required]
[EmailAddress]
public string Email { get; set; }
[Required]
public string MasterPasswordHash { get; set; }
public string MasterPasswordHint { get; set; }
public User ToUser()
{
return new User
{
Name = Name,
Email = Email,
MasterPasswordHint = MasterPasswordHint
};
}
}
}