using System; using System.ComponentModel.DataAnnotations; namespace Yavsc.Model.FrontOffice.Catalog { /// /// Brand. /// public class Brand { /// /// Initializes a new instance of the class. /// public Brand () { } /// /// Gets or sets the name. /// /// The name. [Required] public string Name { get; set; } /// /// Gets or sets the slogan. /// /// The slogan. public string Slogan { get; set; } /// /// Gets or sets the logo. /// /// The logo. public ProductImage Logo { get; set; } /// /// Gets or sets the categories. /// /// The categories. public ProductCategory[] Categories { get; set; } /// /// Gets or sets the default form. /// /// The default form. public SaleForm DefaultForm { get; set; } /// /// Gets the product category. /// /// The product category. /// Reference. public ProductCategory GetProductCategory(string reference) { return Array.Find(Categories, c => c.Reference == reference); } /// /// Gets the name of the product category by. /// /// The product category by name. /// Cat name. public ProductCategory GetProductCategoryByName(string catName) { return Array.Find(Categories, c => c.Name == catName); } } }