40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
10 years ago
|
using System;
|
||
|
using System.ComponentModel.DataAnnotations;
|
||
|
|
||
10 years ago
|
namespace Yavsc.Model.FrontOffice
|
||
10 years ago
|
{
|
||
|
/// <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();
|
||
|
|
||
10 years ago
|
public virtual string Type { get { return GetType().Name; }
|
||
|
}
|
||
10 years ago
|
}
|
||
|
}
|
||
|
|