You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
4.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package order_preview
import (
"github.com/golangkit/formatime"
"github.com/shopspring/decimal"
)
type GoodsDetail struct {
ID uint `gorm:"column:id;primary_key" json:"goodsDetailId"`
OrderID uint `gorm:"column:order_id" json:"orderId"`
VendorID uint `gorm:"column:vendor_id" json:"vendorId"` // 供应商ID: 0表示自营
VendorName string `gorm:"column:vendor_name" json:"vendorName"`
BrandID uint `gorm:"column:brand_id" json:"brandId"` // 品牌
BrandName string `gorm:"column:brand_name" json:"brandName"` // 品牌名称
CategoryName string `gorm:"column:category_name" json:"cateName"`
GoodsID uint `gorm:"column:goods_id" json:"goodsId"` // 商品ID
GoodsName string `gorm:"column:goods_name" json:"goodsName"` // 商品名快照
IsJoinTeamPerformance uint `gorm:"column:is_join_team_performance" json:"-"` // 是否参与团队业绩计算
Hash string `gorm:"column:hash" json:"-"` // 商品哈希值如果商品信息更新了
SkuID uint `gorm:"column:sku_id" json:"skuId"` // 商品sku_id
SkuName string `gorm:"column:sku_name" json:"skuName"` // SKU名字组合起来
SkuCode string `gorm:"column:sku_code" json:"skuCode"` // 条形码或者编码
MainPhotoURL string `gorm:"column:main_photo_url" json:"mainPhotoUrl"` // 主图快照 先读sku 没有则读取主图
Quantity uint `gorm:"column:quantity" json:"quantity"` // 商品数量
FreightID uint `gorm:"column:freight_id" json:"-"` // 运费模板
Weight decimal.Decimal `gorm:"column:weight" json:"-"` // 重量
PromotionGoodsId uint `gorm:"column:promotion_goods_id" json:"-"`
PromotionSkuId uint `gorm:"column:promotion_sku_id" json:"-"` //
PromotionName string `gorm:"column:promotion_name" json:"promotionName"` // 活动名称
PromotionStartTime formatime.Second `gorm:"column:promotion_start_time" json:"-"`
PromotionEndTime formatime.Second `gorm:"column:promotion_end_time" json:"-"`
UnitPrice decimal.Decimal `gorm:"column:unit_price" json:"unitPrice"` // 单价
PurchasePrice decimal.Decimal `gorm:"column:purchase_price" json:"purchasePrice"` // 采购价
TotalCommission decimal.Decimal `gorm:"column:total_commission" json:"totalCommission"` // 提成总额
BrandCouponAmount decimal.Decimal `gorm:"column:brand_coupon_amount" json:"brandCouponAmount"` // 品牌优惠券抵扣金额
UniverseCouponAmount decimal.Decimal `gorm:"column:universe_coupon_amount" json:"universeBrandCouponAmount"` // 购物券抵扣金额
CoinAmount decimal.Decimal `gorm:"column:coin_amount" json:"coinAmount"` // 瑞币抵扣金额
GoodsAmount decimal.Decimal `gorm:"column:goods_amount" json:"goodsAmount"` // 商品总金额 单价x数量不含其他费用减除
ExpressFee decimal.Decimal `gorm:"column:express_fee" json:"expressFee"` // 快递费
ActualAmount decimal.Decimal `gorm:"column:actual_amount" json:"actualAmount"` // 实际支付的金额
IsImport int `gorm:"column:is_import" json:"isImport"` //是否进口商品
Storehouse int `gorm:"column:storehouse" json:"storehouse"` //进口商品仓库
IsFerme int `gorm:"column:is_ferme" json:"isFerme"`
IsVirtual bool `gorm:"column:is_virtual" json:"is_virtual"` // 是否虚拟订单
ExtraPrice decimal.Decimal `json:"-"`
}
// TableName sets the insert table name for this struct type
func (r *GoodsDetail) TableName() string {
return "recook_order_preview_goods_detail"
}