using Nop.Core.Domain.Common; using Nop.Core.Domain.Tax; namespace Nop.Core.Domain.Customers; /// /// Represents a customer /// public partial class Customer : BaseEntity, ISoftDeletedEntity { public Customer() { CustomerGuid = Guid.NewGuid(); } /// /// Gets or sets the customer GUID /// public Guid CustomerGuid { get; set; } /// /// Gets or sets the username /// public string Username { get; set; } /// /// Gets or sets the email /// public string Email { get; set; } /// /// Gets or sets the first name /// public string FirstName { get; set; } /// /// Gets or sets the last name /// public string LastName { get; set; } /// /// Gets or sets the gender /// public string Gender { get; set; } /// /// Gets or sets the date of birth /// public DateTime? DateOfBirth { get; set; } /// /// Gets or sets the company /// public string Company { get; set; } /// /// Gets or sets the street address /// public string StreetAddress { get; set; } /// /// Gets or sets the street address 2 /// public string StreetAddress2 { get; set; } /// /// Gets or sets the zip /// public string ZipPostalCode { get; set; } /// /// Gets or sets the city /// public string City { get; set; } /// /// Gets or sets the county /// public string County { get; set; } /// /// Gets or sets the country id /// public int CountryId { get; set; } /// /// Gets or sets the state province id /// public int StateProvinceId { get; set; } /// /// Gets or sets the phone number /// public string Phone { get; set; } /// /// Gets or sets the fax /// public string Fax { get; set; } /// /// Gets or sets the vat number /// public string VatNumber { get; set; } /// /// Gets or sets the vat number status id /// public int VatNumberStatusId { get; set; } /// /// Gets or sets the time zone id /// public string TimeZoneId { get; set; } /// /// Gets or sets the custom attributes /// public string CustomCustomerAttributesXML { get; set; } /// /// Gets or sets the currency id /// public int? CurrencyId { get; set; } /// /// Gets or sets the language id /// public int? LanguageId { get; set; } /// /// Gets or sets the tax display type id /// public int? TaxDisplayTypeId { get; set; } /// /// Gets or sets the email that should be re-validated. Used in scenarios when a customer is already registered and wants to change an email address. /// public string EmailToRevalidate { get; set; } /// /// Gets or sets the admin comment /// public string AdminComment { get; set; } /// /// Gets or sets a value indicating whether the customer is tax exempt /// public bool IsTaxExempt { get; set; } /// /// Gets or sets the affiliate identifier /// public int AffiliateId { get; set; } /// /// Gets or sets the vendor identifier with which this customer is associated (manager) /// public int VendorId { get; set; } /// /// Gets or sets a value indicating whether this customer has some products in the shopping cart /// The same as if we run ShoppingCartItems.Count > 0 /// We use this property for performance optimization: /// if this property is set to false, then we do not need to load "ShoppingCartItems" navigation property for each page load /// It's used only in a couple of places in the presentation layer /// /// public bool HasShoppingCartItems { get; set; } /// /// Gets or sets a value indicating whether the customer is required to re-login /// public bool RequireReLogin { get; set; } /// /// Gets or sets a value indicating number of failed login attempts (wrong password) /// public int FailedLoginAttempts { get; set; } /// /// Gets or sets the date and time until which a customer cannot login (locked out) /// public DateTime? CannotLoginUntilDateUtc { get; set; } /// /// Gets or sets a value indicating whether the customer is active /// public bool Active { get; set; } /// /// Gets or sets a value indicating whether the customer has been deleted /// public bool Deleted { get; set; } /// /// Gets or sets a value indicating whether the customer account is system /// public bool IsSystemAccount { get; set; } /// /// Gets or sets the customer system name /// public string SystemName { get; set; } /// /// Gets or sets the last IP address /// public string LastIpAddress { get; set; } /// /// Gets or sets the date and time of entity creation /// public DateTime CreatedOnUtc { get; set; } /// /// Gets or sets the date and time of last login /// public DateTime? LastLoginDateUtc { get; set; } /// /// Gets or sets the date and time of last activity /// public DateTime LastActivityDateUtc { get; set; } /// /// Gets or sets the store identifier in which customer registered /// public int RegisteredInStoreId { get; set; } /// /// Gets or sets the billing address identifier /// public int? BillingAddressId { get; set; } /// /// Gets or sets the shipping address identifier /// public int? ShippingAddressId { get; set; } #region Custom properties /// /// Gets or sets the vat number status /// public VatNumberStatus VatNumberStatus { get => (VatNumberStatus)VatNumberStatusId; set => VatNumberStatusId = (int)value; } /// /// Gets or sets the tax display type /// public TaxDisplayType? TaxDisplayType { get => TaxDisplayTypeId.HasValue ? (TaxDisplayType)TaxDisplayTypeId : null; set => TaxDisplayTypeId = value.HasValue ? (int)value : null; } #endregion }