using FreeSql.DataAnnotations;
namespace SiNan.Model.Db
{
///
/// 订单表
///
[Table(Name = "order", DisableSyncStructure = true)]
public partial class Order
{
[Column(StringLength = 50, IsPrimary = true, IsNullable = false)]
public string Id { get; set; }
///
/// 买家备注
///
public string BuyerRemark { get; set; }
///
/// 结束时间
///
[Column(DbType = "datetime")]
public DateTime? EndTime { get; set; }
///
/// 商品运费(用户承担)
///
[Column(DbType = "decimal(20,2)")]
public decimal FreightPrice { get; set; } = 0.00M;
///
/// 修改时间
///
[Column(DbType = "datetime")]
public DateTime? ModifyTime { get; set; }
///
/// 用户应付金额
///
[Column(DbType = "decimal(20,2)")]
public decimal OrderPayment { get; set; } = 0.00M;
///
/// 订单货款金额
///
[Column(DbType = "decimal(20,2)")]
public decimal OrderSellerPrice { get; set; } = 0.00M;
///
/// 平台补贴
///
[Column(DbType = "decimal(20,2)")]
public decimal PreferentialAmount { get; set; } = 0.00M;
///
/// 商家优惠金额(商家承担)
///
[Column(DbType = "decimal(20,2)")]
public decimal SellerPreferentialAmount { get; set; } = 0.00M;
///
/// 订单状态
///
[Column(DbType = "int(1)", MapType = typeof(int?))]
public Enums.OrderState? OrderState { get; set; }
///
/// 订单总价
///
[Column(DbType = "decimal(20,2)")]
public decimal OrderTotalPrice { get; set; } = 0.00M;
///
/// 订单类型
///
[Column(DbType = "int(1)", MapType = typeof(int?))]
public Enums.OrderType? OrderType { get; set; }
///
/// 支付方式
///
[Column(DbType = "int(1)", MapType = typeof(int?))]
public Enums.PayType? PayType { get; set; }
///
/// 订单平台
///
[Column(DbType = "int(1)", MapType = typeof(int?))]
public Enums.Platform? Platform { get; set; }
///
/// 开始时间
///
[Column(DbType = "datetime")]
public DateTime? StartTime { get; set; }
///
/// 仓储类型
///
[Column(DbType = "int(1)", MapType = typeof(int?))]
public Enums.StorageType? StorageType { get; set; }
///
/// 入仓订单标识
///
[Column(StringLength = 50)]
public string StoreOrder { get; set; }
///
/// 商家Id
///
public long ShopId { get; set; }
///
/// 商家备注
///
public string VenderRemark { get; set; }
public string PurchaseRemark { get; set; }
///
/// 仓库Id
///
[Column(StringLength = 50)]
public string StoreId { get; set; }
///
/// 运单号
///
[Column(StringLength = 200)]
public string WaybillNo { get; set; }
///
/// 订单旗帜
///
[Column(StringLength = 10)]
public string Flag { get; set; }
///
/// 刷单类型
///
[Column(MapType = (typeof(int?)))]
public Enums.SDType? SDType { get; set; }
///
/// 刷单关键词
///
[Column(StringLength = 50)]
public string SDKey { get; set; }
///
/// 刷单支付渠道
///
[Column(MapType = (typeof(int?)))]
public Enums.PayChannelType? SDPayChannel { get; set; }
///
/// 刷单交易账单号
///
[Column(StringLength = 50)]
public string SDPayBillNo { get; set; }
///
/// 刷单人
///
[Column(StringLength = 20)]
public string SDOperator { get; set; }
///
/// 是否为售后订单
///
[Column(DbType = "bit")]
public bool IsAfterSaleOrder { get; set; } = false;
///
/// 是否为赠品
///
[Column(DbType = "bit")]
public bool IsGift { get; set; } = false;
#region 订单成本
///
/// 平台扣点金额
///
[Column(IsIgnore = true)]
public decimal? PlatformCommissionAmount { get; set; }
///
/// 平台扣点百分比
///
[Column(IsIgnore = true)]
public decimal? PlatformCommissionRatio { get; set; }
///
/// 利润
///
[Column(IsIgnore = true)]
public decimal? Profit { get; set; }
///
/// 采购金额
///
[Column(IsIgnore = true)]
public decimal? PurchaseAmount { get; set; } = 0.00M;
///
/// 刷单佣金
///
[Column(IsIgnore = true)]
public decimal? SDCommissionAmount { get; set; } = 0.00M;
///
/// 刷单号费
///
[Column(IsIgnore = true)]
public decimal? SDOrderAmount { get; set; } = 0.00M;
///
/// 发货快递费
///
[Column(IsIgnore = true)]
public decimal? DeliveryExpressFreight { get; set; } = 0.00M;
///
/// 是否手动编辑过成本
///
[Column(IsIgnore = true)]
public bool IsManualEdited { get; set; } = false;
///
/// 退款金额
///
[Column(IsIgnore = true)]
public decimal RefundAmount { get; set; } = 0.00M;
///
/// 退款采购金额
///
[Column(IsIgnore = true)]
public decimal RefundPurchaseAmount { get; set; } = 0.0M;
///
/// 所有服务单的售后成本(不含退款采购成本)
///
[Column(IsIgnore = true)]
public decimal AfterTotalCost { get; set; } = 0.0M;
#endregion
#region 收货人信息
[Column(IsIgnore = true)]
public string Address { get; set; }
[Column(IsIgnore = true)]
public string City { get; set; }
[Column(IsIgnore = true)]
public string ContactName { get; set; }
[Column(IsIgnore = true)]
public string County { get; set; }
[Column(IsIgnore = true)]
public string Mobile { get; set; }
[Column(IsIgnore = true)]
public string Province { get; set; }
[Column(IsIgnore = true)]
public string TelePhone { get; set; }
[Column(IsIgnore = true)]
public string Town { get; set; }
[Column(IsIgnore = true)]
public bool? IsDecode { get; set; }
#endregion
#region 仓库
[Column(IsIgnore = true)]
public string StoreName { get; set; }
#endregion
}
}