2022-10-30 16:58:47 -04:00
|
|
|
|
using Microsoft.AspNetCore.Identity;
|
2022-11-01 12:24:04 -04:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2022-11-01 13:33:08 -04:00
|
|
|
|
using GrossesMitainesAPI.Models;
|
2022-10-30 16:58:47 -04:00
|
|
|
|
|
|
|
|
|
namespace GrossesMitainesAPI.Data;
|
2022-11-01 13:33:08 -04:00
|
|
|
|
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; }
|
2022-11-02 21:00:48 -04:00
|
|
|
|
|
2022-11-03 12:45:59 -04:00
|
|
|
|
public InventoryUser() { }
|
2022-11-02 21:00:48 -04:00
|
|
|
|
public InventoryUser(SignUpUserModel sign) {
|
|
|
|
|
FirstName = sign.FirstName;
|
|
|
|
|
LastName = sign.LastName;
|
2022-11-03 12:45:59 -04:00
|
|
|
|
UserName = sign.FirstName + sign.LastName;
|
|
|
|
|
NormalizedUserName = (sign.FirstName + sign.LastName).ToUpper();
|
|
|
|
|
NormalizedEmail = sign.Email.ToUpper();
|
2022-11-02 21:00:48 -04:00
|
|
|
|
Email = sign.Email;
|
|
|
|
|
PhoneNumber = sign.Phone;
|
|
|
|
|
Adresses = sign.Adresses;
|
|
|
|
|
}
|
2022-10-30 16:58:47 -04:00
|
|
|
|
}
|
|
|
|
|
|