BotSharp/src/Infrastructure/BotSharp.OpenAPI/ViewModels/Users/UserCreationModel.cs

26 lines
685 B
C#
Raw Normal View History

2023-11-14 05:37:04 +00:00
using BotSharp.Abstraction.Users.Enums;
2023-08-19 00:15:02 +00:00
using BotSharp.Abstraction.Users.Models;
namespace BotSharp.OpenAPI.ViewModels.Users;
public class UserCreationModel
{
public string FirstName { get; set; } = string.Empty;
public string LastName { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
2023-11-14 05:37:04 +00:00
public string Role { get; set; } = UserRole.Client;
2023-08-19 00:15:02 +00:00
public User ToUser()
{
return new User
{
FirstName = FirstName,
LastName = LastName,
Email = Email,
2023-11-14 05:37:04 +00:00
Password = Password,
Role = Role
2023-08-19 00:15:02 +00:00
};
}
}