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" }