|
@@ -17,7 +17,7 @@ type Product struct {
|
|
|
Unit string `bson:"unit,omitempty" json:"unit"` // 型号
|
|
|
Price float64 `bson:"price,omitempty" json:"price"`
|
|
|
Cover string `bson:"cover,omitempty" json:"cover"` // 封面图
|
|
|
- Color []string `bson:"color,omitempty" json:"color"`
|
|
|
+ Color []*ColorObj `bson:"color,omitempty" json:"color"`
|
|
|
Size []int `bson:"size,omitempty" json:"size"` // 尺寸
|
|
|
Thumbnail []string `bson:"thumbnail,omitempty" json:"thumbnail"` // 缩略图集合
|
|
|
Status int `bson:"status,omitempty" json:"status"` // -1:下架 1:上架
|
|
@@ -25,3 +25,9 @@ type Product struct {
|
|
|
CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
|
|
|
UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
|
|
|
}
|
|
|
+
|
|
|
+type ColorObj struct {
|
|
|
+ ColorStr string `bson:"colorStr,omitempty" json:"colorStr"`
|
|
|
+ DevLink string `bson:"devLink,omitempty" json:"devLink"`
|
|
|
+ ProdLink string `bson:"prodLink,omitempty" json:"prodLink"`
|
|
|
+}
|