GGMM/GrossesMitaines/GrossesMitainesAPI/Data/InventoryUser.cs
MarcEricMartel 107c68eb4e eh lala
2022-11-06 09:10:41 -08:00

25 lines
817 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() { }
public InventoryUser(SignUpUserModel sign) {
FirstName = sign.FirstName;
LastName = sign.LastName;
UserName = sign.FirstName + sign.LastName;
NormalizedUserName = (sign.FirstName + sign.LastName).ToUpper();
NormalizedEmail = sign.Email.ToUpper();
Email = sign.Email;
PhoneNumber = sign.Phone;
}
}