using CommunityToolkit.Mvvm.ComponentModel; using System.Collections.Generic; using System.Collections.ObjectModel; namespace BBWYB.Client.Models { public class Product : ObservableObject { public Product() { PurchaserList = new ObservableCollection(); PurchasePlatformList = new List(); } /// /// 品牌 /// public string BrandName { get; set; } private Platform 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 Platform SelectedPurchasePlatformModel { get => selectedPurchasePlatformModel; set { SetProperty(ref selectedPurchasePlatformModel, value); } } public void CreatePlatformList() { PurchasePlatformList.Add(Platform.阿里巴巴); //PurchasePlatformList.Add(Platform.拳探); SelectedPurchasePlatformModel = PurchasePlatformList[0]; } } }