using System; using System.ComponentModel.DataAnnotations; namespace Yavsc.Model.FrontOffice { /// /// Product. /// Crucial object in the catalog, /// being at each origin of form display /// its properties may be used to fill some form input values or other form element. /// in text values, within {} ex: {Name} : {Price} ({stockStatus}) ($description) . /// public abstract class Product { /// /// Gets or sets the product name. /// /// The name. [Required] [StringLength(1024)] public string Name { get; set; } /// /// Gets or sets the product description. /// /// The description. public string Description { get; set; } /// /// Gets or sets the images. /// /// The images. public ProductImage[] Images { get; set; } /// /// Gets or sets the command form. /// /// The command form. public SaleForm CommandForm { get; set; } /// /// Gets or sets the reference. /// /// The reference. [Required] [StringLength(255)] public string Reference { get; set; } /// /// Gets or sets the command validity dates. /// /// The command validity dates. public Period CommandValidityDates { get; set; } /// /// Gets the sales conditions. /// /// The sales conditions. public abstract string[] GetSalesConditions(); /// /// Gets the type. /// /// The type. public virtual string Type { get { return GetType().Name; } } } }