Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

ProductAttributeValue.cs

using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using Nop.Core.Domain.Localization;

namespace Nop.Core.Domain.Catalog;

/// 
/// Represents a product attribute value
/// 
public partial class ProductAttributeValue : BaseEntity, ILocalizedEntity
{
    /// 
    /// Gets or sets the product attribute mapping identifier
    /// 
    public int ProductAttributeMappingId { get; set; }

    /// 
    /// Gets or sets the attribute value type identifier
    /// 
    public int AttributeValueTypeId { get; set; }

    /// 
    /// Gets or sets the associated product identifier (used only with AttributeValueType.AssociatedToProduct)
    /// 
    public int AssociatedProductId { get; set; }

    /// 
    /// Gets or sets the product attribute name
    /// 
    public string Name { get; set; }

    /// 
    /// Gets or sets the color RGB value (used with "Color squares" attribute type)
    /// 
    public string ColorSquaresRgb { get; set; }

    /// 
    /// Gets or sets the picture ID for image square (used with "Image squares" attribute type)
    /// 
    public int ImageSquaresPictureId { get; set; }

    /// 
    /// Gets or sets the price adjustment (used only with AttributeValueType.Simple)
    /// 
    public decimal PriceAdjustment { get; set; }

    /// 
    /// Gets or sets a value indicating whether "price adjustment" is specified as percentage (used only with AttributeValueType.Simple)
    /// 
    public bool PriceAdjustmentUsePercentage { get; set; }

    /// 
    /// Gets or sets the weight adjustment (used only with AttributeValueType.Simple)
    /// 
    public decimal WeightAdjustment { get; set; }

    /// 
    /// Gets or sets the attribute value cost (used only with AttributeValueType.Simple)
    /// 
    public decimal Cost { get; set; }

    /// 
    /// Gets or sets a value indicating whether the customer can enter the quantity of associated product (used only with AttributeValueType.AssociatedToProduct)
    /// 
    public bool CustomerEntersQty { get; set; }

    /// 
    /// Gets or sets the quantity of associated product (used only with AttributeValueType.AssociatedToProduct)
    /// 
    public int Quantity { get; set; }

    /// 
    /// Gets or sets a value indicating whether the value is pre-selected
    /// 
    public bool IsPreSelected { get; set; }

    /// 
    /// Gets or sets the display order
    /// 
    public int DisplayOrder { get; set; }

    /// 
    /// Gets or sets the attribute value type
    /// 
    public AttributeValueType AttributeValueType
    {
        get => (AttributeValueType)AttributeValueTypeId;
        set => AttributeValueTypeId = (int)value;
    }

    /// 
    /// The field is not used since 4.70 and is left only for the update process
    /// use the  instead
    /// 
    [EditorBrowsable(EditorBrowsableState.Never)]
    [Browsable(false)]
    [Obsolete("The field is not used since 4.70 and is left only for the update process use the ProductAttributeValuePicture instead")]
    public int? PictureId { get; set; }
}