package model import "shop-api/global" type TbAttributeValue struct { // 规格属性取值 AttributeId uint `gorm:"type:int(11);not null;" json:"attribute_id"` // attribute_id Name string `gorm:"type:varchar(255);not null;" json:"name"` // 属性取值 Status int `gorm:"type:tinyint(1);comment:状态 1:正常" json:"status"` global.MG_MODEL } type TbAttributeValueItem struct { Id uint `json:"id"` // id Name string `json:"name"` // 规格属性值 Image string `json:"image"` // 图片 } type TbAttributeValueJson struct { Str string `json:"str"` Items []TbAttributeValueItem `json:"names"` } func (TbAttributeValue) TableName() string { return "tb_attribute_value" }