package entity import ( "assets/consts/public" "gitea.com/red-future/common/beans" "go.mongodb.org/mongo-driver/v2/bson" ) // PurchaseOrderItem 采购订单明细实体 type PurchaseOrderItem struct { beans.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted // 关联信息 OrderId *bson.ObjectID `bson:"orderId" json:"orderId"` // 订单ID AssetId *bson.ObjectID `bson:"assetId" json:"assetId"` // 资产ID AssetSkuId *bson.ObjectID `bson:"assetSkuId" json:"assetSkuId"` // 资产SKU ID // 商品信息 ProductName string `bson:"productName" json:"productName"` // 商品名称 Specification string `bson:"specification" json:"specification"` // 规格描述 Brand string `bson:"brand" json:"brand"` // 品牌 // 数量和价格 Quantity int `bson:"quantity" json:"quantity"` // 订购数量 Unit string `bson:"unit" json:"unit"` // 单位 UnitPrice int `bson:"unitPrice" json:"unitPrice"` // 单价(分) TotalPrice int `bson:"totalPrice" json:"totalPrice"` // 总价(分) DiscountPrice int `bson:"discountPrice" json:"discountPrice"` // 折扣价(分) // 签收和入库 PassQuantity int `bson:"passQuantity" json:"passQuantity"` // 签收数量(与订购数量有差异时应生成退换单) InboundQty int `bson:"inboundQty" json:"inboundQty"` // 已入库累计数量 // 要求信息 RequirementDesc string `bson:"requirementDesc" json:"requirementDesc"` // 特殊要求描述 DeliveryAddress string `bson:"deliveryAddress" json:"deliveryAddress"` // 交付地址 } // CollectionName 获取集合名称 func (PurchaseOrderItem) CollectionName() string { return public.PurchaseOrderItemCollection }