Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
using Grand.Domain.Catalog;
using Grand.Domain.Localization;
using Grand.Domain.Stores;
namespace Grand.Domain.Customers;
/// <summary>
/// Represents a customer attribute
/// </summary>
public class CustomerAttribute : BaseEntity, ITranslationEntity, IStoreLinkEntity
{
private ICollection<CustomerAttributeValue> _customerAttributeValues;
/// <summary>
/// Gets or sets the name
/// </summary>
public string Name { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the attribute is required
/// </summary>
public bool IsRequired { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the attribute is read only
/// </summary>
public bool IsReadOnly { get; set; }
/// <summary>
/// Gets or sets the attribute control type identifier
/// </summary>
public AttributeControlType AttributeControlTypeId { get; set; }
/// <summary>
/// Gets or sets the display order
/// </summary>
public int DisplayOrder { get; set; }
/// <summary>
/// Gets the customer attribute values
/// </summary>
public virtual ICollection<CustomerAttributeValue> CustomerAttributeValues {
get => _customerAttributeValues ??= new List<CustomerAttributeValue>();
protected set => _customerAttributeValues = value;
}
/// <summary>
/// Gets or sets the collection of locales
/// </summary>
public IList<TranslationEntity> Locales { get; set; } = new List<TranslationEntity>();
/// <summary>
/// Gets or sets a value indicating whether the entity is limited/restricted to certain stores
/// </summary>
public bool LimitedToStores { get; set; }
public IList<string> Stores { get; set; } = new List<string>();
}