|
|
|
using FreeSql.DataAnnotations;
|
|
|
|
using System;
|
|
|
|
|
|
|
|
namespace BBWY.Server.Model.Db
|
|
|
|
{
|
|
|
|
|
|
|
|
[Table(Name = "ordercostdetail", DisableSyncStructure = true)]
|
|
|
|
public partial class OrderCostDetail
|
|
|
|
{
|
|
|
|
|
|
|
|
[Column(DbType = "bigint(1)", IsPrimary = true)]
|
|
|
|
public long Id { get; set; }
|
|
|
|
|
|
|
|
[Column(DbType = "datetime")]
|
|
|
|
public DateTime? CreateTime { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 扣减数量
|
|
|
|
/// </summary>
|
|
|
|
[Column(DbType = "int(1)")]
|
|
|
|
public int DeductionQuantity { get; set; } = 0;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 发货运费
|
|
|
|
/// </summary>
|
|
|
|
[Column(DbType = "decimal(20,2)")]
|
|
|
|
public decimal DeliveryExpressFreight { get; set; } = 0.00M;
|
|
|
|
|
|
|
|
[Column(StringLength = 50)]
|
|
|
|
public string OrderId { get; set; }
|
|
|
|
|
|
|
|
[Column(StringLength = 50)]
|
|
|
|
public string ProductId { get; set; }
|
|
|
|
|
|
|
|
/*/// <summary>
|
|
|
|
/// 单件成本
|
|
|
|
/// </summary>*/
|
|
|
|
//[Column(DbType = "decimal(20,2)")]
|
|
|
|
//public decimal UnitCost { get; set; } = 0.00M;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 采购单流水Id
|
|
|
|
/// </summary>
|
|
|
|
[Column(DbType = "bigint(1)")]
|
|
|
|
public long PurchaseOrderPKId { get; set; }
|
|
|
|
|
|
|
|
[Column(StringLength = 50)]
|
|
|
|
public string SkuId { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Sku成本(商品成本)
|
|
|
|
/// </summary>
|
|
|
|
[Column(DbType = "decimal(20,2)")]
|
|
|
|
public decimal SkuAmount { get; set; } = 0.00M;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 采购运费
|
|
|
|
/// </summary>
|
|
|
|
[Column(DbType = "decimal(20,2)")]
|
|
|
|
public decimal PurchaseFreight { get; set; } = 0.00M;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 头程运费
|
|
|
|
/// </summary>
|
|
|
|
[Column(DbType = "decimal(20,2)")]
|
|
|
|
public decimal FirstFreight { get; set; } = 0.00M;
|
|
|
|
|
|
|
|
///// <summary>
|
|
|
|
///// 操作费
|
|
|
|
///// </summary>
|
|
|
|
//[Column(DbType = "decimal(20,2)")]
|
|
|
|
//public decimal OperationAmount { get; set; } = 0.00M;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 入仓操作费
|
|
|
|
/// </summary>
|
|
|
|
[Column(DbType = "decimal(20,2)")]
|
|
|
|
public decimal InStorageAmount { get; set; } = 0.00M;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 出仓操作费
|
|
|
|
/// </summary>
|
|
|
|
[Column(DbType = "decimal(20,2)")]
|
|
|
|
public decimal OutStorageAmount { get; set; } = 0.00M;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 耗材费
|
|
|
|
/// </summary>
|
|
|
|
[Column(DbType = "decimal(20,2)")]
|
|
|
|
public decimal ConsumableAmount { get; set; } = 0.00M;
|
|
|
|
|
|
|
|
///// <summary>
|
|
|
|
///// 仓储费
|
|
|
|
///// </summary>
|
|
|
|
//[Column(DbType = "decimal(20,2)")]
|
|
|
|
//public decimal StorageAmount { get; set; } = 0.00M;
|
|
|
|
|
|
|
|
[Column(DbType = "bit")]
|
|
|
|
public bool IsEnabled { get; set; } = true;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// sku毛利
|
|
|
|
/// </summary>
|
|
|
|
[Column(DbType = "decimal(20,2)")]
|
|
|
|
public decimal SkuGrossProfit { get; set; } = 0.00M;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 包装人工费
|
|
|
|
/// </summary>
|
|
|
|
[Column(DbType = "decimal(20,2)")]
|
|
|
|
public decimal PackagingLaborAmount { get; set; } = 0.00M;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 总计(不含发货运费)
|
|
|
|
/// </summary>
|
|
|
|
[Column(IsIgnore = true)]
|
|
|
|
public decimal TotalCost
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return SkuAmount + PurchaseFreight + FirstFreight + InStorageAmount + OutStorageAmount + PackagingLaborAmount + ConsumableAmount;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 是否为预估成本
|
|
|
|
/// </summary>
|
|
|
|
[Column(DbType = "bit")]
|
|
|
|
public bool IsEstimateCost { get; set; } = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|