using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Atomx.Common.Entities { /// /// 订单详情数据 /// [Table("OrderItems")] public class OrderItem { /// /// 订单商品明细ID /// [DatabaseGenerated(DatabaseGeneratedOption.None)] [Key] public long Id { get; set; } /// /// 订单ID /// public long OrderId { get; set; } /// /// 平台ID,1自有商城,2淘宝,3天猫,4京东,5拼多多,6抖音,7快手,8小红书等 /// public int PlatformId { get; set; } /// /// 下单购买用户ID /// public long UserId { get; set; } /// /// 仓库ID /// public long WarehouseId { get; set; } /// /// 产品ID /// public long ProductId { get; set; } /// /// 商城产品信息ID /// public long ProductListingId { get; set; } /// /// 销售产品的店铺ID /// public long StoreId { get; set; } /// /// 归属公司ID /// public long CorporationId { get; set; } /// /// SKU ID,0则表示无SKU ID /// public long SkuId { get; set; } /// /// 供应商ID /// public long VendorId { get; set; } /// /// 品牌ID /// public long ManufacturerId { get; set; } /// /// 商品名称 /// [Column(TypeName = "varchar(255)")] public string Title { get; set; } = string.Empty; /// /// 商品封面图 /// [Column(TypeName = "varchar(256)")] public string Image { get; set; } = string.Empty; /// /// 购买数量 /// public int Quantity { get; set; } /// /// 是否允许退货 /// public bool AllowReturn { get; set; } /// /// 是否允许换货 /// public bool AllowExchange { get; set; } /// /// SKU数据 JSON信息 /// [Column(TypeName = "text")] public string AttributesJson { get; set; } = string.Empty; /// /// 产品SKU编码 /// [Column(TypeName = "varchar(20)")] public string SkuNumber { get; set; } = string.Empty; /// /// 运费模板ID,0表示全国免费包邮 /// public long ShippingId { get; set; } /// /// 发货省份 /// public long ProvinceId { get; set; } /// /// 发货城市 /// public long CityId { get; set; } /// /// 市场价 /// [Column(TypeName = "decimal(18,4)")] public decimal MarketPrice { get; set; } /// /// 成本价单价 /// [Column(TypeName = "decimal(18,4)")] public decimal? ProductCost { get; set; } /// /// 销售价 /// [Column(TypeName = "decimal(18,4)")] public decimal Price { get; set; } /// /// 分摊优惠金额单价 /// [Column(TypeName = "decimal(18,4)")] public decimal DiscountAmount { get; set; } /// /// 卖家利润 /// [Column(TypeName = "decimal(8,4)")] public decimal StoreProfit { get; set; } /// /// 售后状态 /// public int AfterSalesStatus { get; set; } /// /// 售后退款金额 /// [Column(TypeName = "decimal(18,4)")] public decimal RefundAmount { get; set; } /// /// 是否已晒单 /// public bool Reviewed { get; set; } /// /// 商品留言 /// [Column(TypeName = "varchar(100)")] public string? Message { get; set; } = string.Empty; /// /// 创建时间 /// [Column(TypeName = "timestamptz")] public DateTime CreateTime { get; set; } } }