26 lines
851 B
C#
26 lines
851 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;
|
|
Adresses = sign.Adresses;
|
|
}
|
|
}
|
|
|