using FreeSql.DataAnnotations; using static BBWYB.Server.Model.Enums; namespace BBWYB.Server.Model.Db { /// /// 订单表 /// [Table(Name = "order", DisableSyncStructure = true)] public partial class Order { [Column(StringLength = 50, IsPrimary = true, IsNullable = false)] public string Id { get; set; } /// /// 订单Sn号 /// [Column(StringLength = 100)] public string OrderSn { get; set; } /// /// 买家备注 /// [Column(StringLength = 1000)] public string BuyerRemark { get; set; } /// /// 买家账号 /// public string BuyerAccount { get; set; } /// /// 结束时间 /// [Column(DbType = "datetime")] public DateTime? EndTime { get; set; } /// /// 商品运费(用户承担) /// [Column(DbType = "decimal(20,2)")] public decimal? FreightPrice { get; set; } /// /// 修改时间 /// [Column(DbType = "datetime")] public DateTime? ModifyTime { get; set; } /// /// 支付时间 /// [Column(DbType = "datetime", IsNullable = true)] public DateTime? PayTime { 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? InPackAmount { 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)")] public int? OrderType { get; set; } /// /// 支付方式 /// [Column(DbType = "int(1)")] public int? PayType { get; set; } /// /// 订单平台 /// [Column(DbType = "int(1)", MapType = typeof(int?))] public Enums.Platform? Platform { get; set; } /// /// 平台补贴 /// [Column(DbType = "decimal(20,2)")] public decimal? PreferentialAmount { get; set; } = 0.00M; /// /// 采购备注 /// public string PurchaseRemark { get; set; } /// /// 商家优惠金额(商家承担) /// [Column(DbType = "decimal(20,2)")] public decimal? SellerPreferentialAmount { get; set; } = 0.00M; /// /// 商家Id /// [Column(DbType = "bigint(1)")] public long? ShopId { get; set; } /// /// 开始时间 /// [Column(DbType = "datetime")] public DateTime? StartTime { get; set; } /// /// 商家备注 /// [Column(StringLength = 500)] public string VenderRemark { get; set; } ///// ///// 运单号 ///// //[Column(StringLength = 100)] //public string WaybillNo { get; set; } ///// ///// 快递公司名称 ///// //[Column(StringLength = 100)] //public string ExpressName { get; set; } ///// ///// 来源Sku ///// //[Column(StringLength = 500)] //public string SourceSku { get; set; } /// /// 来源店铺名 /// [Column(StringLength = 100)] public string SourceShopName { get; set; } /// /// 业务端订单号 /// [Column(StringLength = 100)] public string ClientOrderId { get; set; } /// /// 是否采购 /// public bool IsPurchased { get; set; } #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? SkuAmount { get; set; } = 0.00M; [Column(IsIgnore = true)] public decimal? PurchaseFreight { get; set; } = 0.00M; /// /// 发货快递费 /// [Column(IsIgnore = true)] public decimal? DeliveryExpressFreight { get; set; } = 0.00M; /// /// 是否手动编辑过成本 /// [Column(IsIgnore = true)] public bool? IsManualEdited { get; set; } = false; #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; } #endregion [Column(DbType = "int(1)", MapType = typeof(int?))] public PackConfigState? PackConfigState { get; set; } /// /// 是否为待打包 /// [Column(DbType = "bit")] public bool? IsWaitPack { get; set; } = false; [Column(MapType = typeof(int?))] public Enums.IntoStoreType? IntoStoreType { get; set; } /// /// 是否为特殊单 /// [Column(DbType = "int(1)", IsNullable = true)] public int? IsSpecialOrder { get; set; } } }