GGMM/GrossesMitaines/GrossesMitainesAPI/Data/InventoryUser.cs
MarcEricMartel c59c7ee9f1 CONTROLLERS.
2022-11-02 18:00:48 -07:00

25 lines
797 B
C#

using Microsoft.AspNetCore.Identity;
using System.ComponentModel.DataAnnotations;
using GrossesMitainesAPI.Models;
namespace GrossesMitainesAPI.Data;
public class InventoryUser : IdentityUser {
[Required, MinLength(2), MaxLength(30)]
public string FirstName { get; set; }
[Required, MinLength(1), MaxLength(30)]
public string LastName { get; set; }
public List<AddressModel> Adresses { get; set; }
public InventoryUser(SignUpUserModel sign) {
FirstName = sign.FirstName;
LastName = sign.LastName;
UserName = sign.FirstName + " " + sign.LastName;
NormalizedUserName = UserName.ToUpper();
NormalizedEmail = Email.ToUpper();
Email = sign.Email;
PhoneNumber = sign.Phone;
Adresses = sign.Adresses;
}
}