using ZR.Mall.Model.Dto;
namespace ZR.Mall.Model
{
///
/// 商品库存
///
[SugarTable("mms_skus", "商品库存sku")]
[Tenant("1")]
public class Skus
{
///
/// SkuId
///
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public long SkuId { get; set; }
///
/// 商品ID
///
[SugarColumn(ExtendedAttribute = ProteryConstant.NOTNULL)]
public long ProductId { get; set; }
///
/// 售卖价格
///
[SugarColumn(ExtendedAttribute = ProteryConstant.NOTNULL)]
public decimal Price { get; set; }
///
/// 库存
///
[SugarColumn(DefaultValue = "0")]
public int Stock { get; set; }
///
/// 销量
///
[SugarColumn(DefaultValue = "0")]
public int SalesVolume { get; set; }
///
/// 缩略图片
///
public string ImageUrl { get; set; }
///
/// 规格值id
///
public string SpecIds { get; set; }
///
/// 快照存储,规格 如 "颜色:红;尺寸:XL"
///
public string SpecCombination { get; set; }
///
/// 添加时间
///
[SugarColumn(InsertServerTime = true, IsOnlyIgnoreUpdate = true)]
public DateTime AddTime { get; set; }
///
/// 更新时间
///
[SugarColumn(UpdateServerTime = true, IsOnlyIgnoreInsert = true)]
public DateTime UpdateTime { get; set; }
///
/// 是否删除
///
[SugarColumn(DefaultValue = "0")]
public int IsDelete { get; set; }
///
/// 排序id
///
[SugarColumn(DefaultValue = "0")]
public int SortId { get; set; }
///
/// 重量(千克 (Kg))
///
[SugarColumn(DefaultValue = "0")]
public decimal Weight { get; set; }
///
/// 版本号(防止并发更新)
///
[SugarColumn(DefaultValue = "0")]
public int Version { get; set; }
///
/// 规格
///
[SugarColumn(IsJson = true)]
public List Specs { get; set; }
}
}