using FreeSql.DataAnnotations; using System; namespace BBWY.Server.Model.Db { /// /// 采购订单表 /// [Table(Name = "purchaseorder", DisableSyncStructure = true)] public partial class PurchaseOrder { [Column(IsPrimary = true)] public long Id { get; set; } [Column(DbType = "datetime")] public DateTime? CreateTime { get; set; } /// /// 头程运费 /// //[Column(DbType = "decimal(20,2)")] //public decimal FirstFreight { get; set; } = 0.00M; /// /// 采购运费 /// //[Column(DbType = "decimal(20,2)")] //public decimal Freight { get; set; } = 0.00M; /// /// 产品Id /// [Column(StringLength = 50)] public string ProductId { get; set; } /// /// 采购金额 /// //[Column(DbType = "decimal(20,2)")] //public decimal PurchaseAmount { get; set; } = 0.00M; /// /// 采购方式 /// [Column(DbType = "int(1)", MapType = typeof(int?))] public Enums.PurchaseMethod? PurchaseMethod { get; set; } /// /// 采购单号 /// [Column(StringLength = 200, IsNullable = false)] public string PurchaseOrderId { get; set; } /// /// 采购平台 /// [Column(DbType = "int(1)", MapType = (typeof(int?)))] public Enums.Platform? PurchasePlatform { get; set; } /// /// 采购数量 /// [Column(DbType = "int(1)")] public int PurchaseQuantity { get; set; } /// /// 剩余库存 /// [Column(DbType = "int(1)")] public int RemainingQuantity { get; set; } [Column(StringLength = 50)] public string SkuId { get; set; } /// /// 仓储类型 /// [Column(DbType = "int(1)", MapType = typeof(int?))] public Enums.StorageType? StorageType { get; set; } public long? ShopId { get; set; } /// /// 采购商Id /// [Column(StringLength = 20)] public string PurchaserId { get; set; } /// /// 单件Sku成本 /// [Column(DbType = "decimal(20,2)")] public decimal SingleSkuAmount { get; set; } = 0.00M; /// /// 单件采购运费 /// [Column(DbType = "decimal(20,2)")] public decimal SingleFreight { get; set; } = 0.00M; /// /// 单件头程运费 /// [Column(DbType = "decimal(20,2)")] public decimal SingleFirstFreight { get; set; } = 0.00M; /// /// 单件操作费 /// [Column(DbType = "decimal(20,2)")] public decimal SingleOperationAmount { get; set; } = 0.00M; /// /// 单件耗材费 /// [Column(DbType = "decimal(20,2)")] public decimal SingleConsumableAmount { get; set; } = 0.00M; /// /// 单件仓储费 /// [Column(DbType = "decimal(20,2)")] public decimal SingleStorageAmount { get; set; } = 0.00M; /// /// 单件销售运费(不参与均价计算) /// [Column(DbType = "decimal(20,2)")] public decimal SingleDeliveryFreight { get; set; } = 0.00M; /// /// 单件均摊成本 /// [Column(IsIgnore = true)] public decimal UnitCost { get { return SingleSkuAmount + SingleFreight + SingleFirstFreight + SingleOperationAmount + SingleConsumableAmount + SingleStorageAmount; } } } }