Files
GGMM/GrossesMitaines/GrossesMitainesAPI/Models/ReturnUserViewModel.cs

28 lines
926 B
C#

using GrossesMitainesAPI.Data;
using Microsoft.AspNetCore.Identity;
namespace GrossesMitainesAPI.Models;
public class ReturnUserViewModel {
public string Username { get; set; }
public string Email { get; set; }
public string Phone { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public bool EmailConfirmed { get; set; }
public bool PhoneConfirmed { get; set; }
public bool TwoFactorEnable { get; set; }
public string Role { get; set; }
public ReturnUserViewModel(InventoryUser user, string role) {
Username = user.UserName;
Email = user.Email;
Phone = user.PhoneNumber;
EmailConfirmed = user.EmailConfirmed;
PhoneConfirmed = user.PhoneNumberConfirmed;
TwoFactorEnable = user.TwoFactorEnabled;
FirstName = user.FirstName;
LastName = user.LastName;
Role = role;
}
}