the Catalog manager and model into the Yavsc.Model.FrontOffice namespace * Web.config: * Catalog.xml: * MyClass.cs: * Note.cs: * Euro.cs: * Unit.cs: * Text.cs: * Link.cs: * Price.cs: * Label.cs: * Brand.cs: * Scalar.cs: * Option.cs: * Period.cs: * YavscModel.csproj: * Catalog.cs: * Service.cs: * Product.cs: * YavscClient.csproj: * CatalogManager.cs: * Currency.cs: * CheckBox.cs: * SaleForm.cs: * FormInput.cs: * CatalogProvider.cs: * TextInput.cs: * SelectItem.cs: * SalesCatalog.csproj: * FilesInput.cs: * FormElement.cs: * SelectInput.cs: * IValueProvider.cs: * StockStatus.cs: * RadioButton.cs: * Commande.cs: * ProductImage.cs: * WebCatalogExtensions.cs: * TemplateException.cs: * ProductCategory.cs: * PhysicalProduct.cs: * Note.cs: * Link.cs: * Text.cs: * Euro.cs: * Unit.cs: * WorkFlowManager.cs: * Brand.cs: * Label.cs: * Price.cs: * Scalar.cs: * FrontOfficeController.cs: * Period.cs: * Option.cs: * Product.cs: * Service.cs: * Catalog.cs: * SaleForm.cs: * Currency.cs: * CheckBox.cs: * TextInput.cs: * FrontOfficeApiController.cs: * FormInput.cs: * SelectItem.cs: * FilesInput.cs: * XmlCatalog.cs: * FormElement.cs: * SelectInput.cs: * RadioButton.cs: * StockStatus.cs: * ProductImage.cs: * CatalogHelper.cs: * CatalogManager.cs: * CatalogProvider.cs: * ProductCategory.cs: * PhysicalProduct.cs: * XmlCatalogProvider.cs: * CatalogProviderConfigurationElement.cs: * CatalogProvidersConfigurationSection.cs: * CatalogProvidersConfigurationCollection.cs: * CatalogProviderConfigurationElement.cs: * CatalogProvidersConfigurationSection.cs: * CatalogProvidersConfigurationCollection.cs: * CatalogHelper.cs:
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Yavsc.Model.FrontOffice
|
|
{
|
|
/// <summary>
|
|
/// 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.
|
|
/// <c>in text values, within {} ex: {Name} : {Price} ({stockStatus}) ($description) </c>.
|
|
/// </summary>
|
|
public abstract class Product
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the product name.
|
|
/// </summary>
|
|
/// <value>The name.</value>
|
|
[Required]
|
|
[StringLength(1024)]
|
|
public string Name { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the product description.
|
|
/// </summary>
|
|
/// <value>The description.</value>
|
|
public string Description { get; set; }
|
|
public ProductImage[] Images { get; set; }
|
|
public SaleForm CommandForm { get; set; }
|
|
[Required]
|
|
[StringLength(255)]
|
|
public string Reference { get; set; }
|
|
public Period CommandValidityDates { get; set; }
|
|
public abstract string[] GetSalesConditions();
|
|
|
|
public virtual string Type { get { return GetType().Name; }
|
|
}
|
|
}
|
|
}
|
|
|