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

29 lines
755 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
namespace BotSharp.OpenAPI.ViewModels.Users;
public class UserCreationModel
{
2024-05-31 03:24:34 +00:00
public string? UserName { get; set; }
public string FirstName { get; set; } = string.Empty;
2024-05-31 03:24:34 +00:00
public string? LastName { get; set; }
public string? Email { get; set; }
public string? Phone { get; set; }
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
{
2024-01-05 03:20:50 +00:00
UserName = UserName,
2023-08-19 00:15:02 +00:00
FirstName = FirstName,
LastName = LastName,
Email = Email,
2024-05-31 03:24:34 +00:00
Phone = Phone,
2023-11-14 05:37:04 +00:00
Password = Password,
Role = Role
2023-08-19 00:15:02 +00:00
};
}
}