using System.Collections.Generic; using System.Collections.ObjectModel; namespace BBWY.Client.Models { public class Product : NotifyObject { public Product() { PurchaserList = new ObservableCollection(); PurchasePlatformList = new List(); } private PurchasePlatformModel selectedPurchasePlatformModel; /// /// 商品Id /// public string Id { get; set; } /// /// 商品货号 /// public string ProductItemNum { get; set; } /// /// 商品标题 /// public string Title { get; set; } /// /// Sku列表 /// public IList SkuList { get; set; } /// /// 采购商集合 /// public IList PurchaserList { get; set; } /// /// 采购平台集合 /// public IList PurchasePlatformList { get; set; } /// /// 选中的采购平台 /// public PurchasePlatformModel SelectedPurchasePlatformModel { get => selectedPurchasePlatformModel; set { Set(ref selectedPurchasePlatformModel, value); } } public void CreatePlatformList() { PurchasePlatformList.Add(new PurchasePlatformModel() { ProductId = this.Id, PurchasePlatform = Platform.阿里巴巴 }); PurchasePlatformList.Add(new PurchasePlatformModel() { ProductId = this.Id, PurchasePlatform = Platform.拳探 }); SelectedPurchasePlatformModel = PurchasePlatformList[0]; } } }