步步为盈
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.9 KiB

using System;
namespace BBWY.Client.Models
{
/// <summary>
/// 采购商品的Sku
/// </summary>
public class PurchaseSchemeProductSku : NotifyObject
{
public PurchaseSchemeProductSku()
{
QuantityRatio = 1;
}
/// <summary>
/// 采购商品的SKU和采购方案的关系Id
/// </summary>
public long Id { get; set; }
private bool isSelected;
public bool IsSelected { get => isSelected; set { Set(ref isSelected, value); } }
public decimal Price { get; set; }
/// <summary>
/// Sku标题
/// </summary>
public string Title { get; set; }
/// <summary>
/// Sku图片
/// </summary>
public string Logo { get; set; }
public string SkuId { get; set; }
public string ProductId { get; set; }
public string PurchaseProductId { get; set; }
public string PurchaseSkuId { get; set; }
public string PurchaseSkuSpecId { get; set; }
public long SkuPurchaseSchemeId { get; set; }
public long UserId { get; set; }
public int ItemTotal
{
get => itemTotal; set
{
if (Set(ref itemTotal, value))
{
SkuAmount = value * Price;
OnItemTotalChanged?.Invoke(value);
}
}
}
public decimal SkuAmount { get => skuAmount; set { Set(ref skuAmount, value); } }
private int itemTotal;
private decimal skuAmount;
private int quantityRatio;
public Action<int> OnItemTotalChanged { get; set; }
/// <summary>
/// 组成一件sku所需的数量
/// </summary>
public int QuantityRatio
{
get => quantityRatio; set { Set(ref quantityRatio, value); }
}
}
}