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.

26 lines
728 B

package model
import "shop-api/global"
type OrderGoods struct {
global.MG_MODEL
OrderID string `gorm:"size:50" json:"orderID"` // 订单id
SpuNo string `gorm:"type:varchar(60);" json:"spu_no"` // 商品编号
SkuNo string `gorm:"type:varchar(60);" json:"sku_no"` // 商品规格编号
Specs string `gorm:"type:text;" json:"specs"` // 规格
TbGoodsBase
}
type OrderGoodsDetail struct {
OrderGoods
Attributes []TbAttributeWithValues `gorm:"-" json:"attributes"` // 规格详情
GoodsSpecs []TbOrderGoodsSpecsDetail `gorm:"-" json:"goods_specs"` // 规格
}
func (OrderGoods) TableName() string {
return "order_goods"
}
func (OrderGoodsDetail) TableName() string {
return "order_goods"
}