From 6f81fc7614cb8cbf321d8109231b521cc2ff51de Mon Sep 17 00:00:00 2001 From: timerzz Date: Mon, 9 Sep 2024 17:18:36 +0800 Subject: [PATCH] =?UTF-8?q?feat=20json=E8=BF=94=E5=9B=9Eid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- structs/v2/provider.go | 4 ++-- structs/v2/seller.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/structs/v2/provider.go b/structs/v2/provider.go index f420b73..e556ba1 100644 --- a/structs/v2/provider.go +++ b/structs/v2/provider.go @@ -48,7 +48,7 @@ type ProviderOption struct { // ProviderArticle 供应商商品信息 type ProviderArticle struct { - ID uint `gorm:"primary_key" json:"-"` + ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` @@ -78,7 +78,7 @@ type ProviderArticle struct { // ProviderPrice 供应商成本价格 type ProviderPrice struct { - ID uint `gorm:"primary_key" json:"-"` + ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"createdAt"` ProviderArticleID uint `gorm:"index"` diff --git a/structs/v2/seller.go b/structs/v2/seller.go index b5e8d07..3df3973 100644 --- a/structs/v2/seller.go +++ b/structs/v2/seller.go @@ -47,7 +47,7 @@ type SellerOption struct { // SellerArticle 销售商商品信息 type SellerArticle struct { - ID uint `gorm:"primary_key" json:"-"` + ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` // 商品的ID @@ -76,7 +76,7 @@ type SellerArticle struct { // SellerPrice 供应商成本价格 type SellerPrice struct { - ID uint `gorm:"primary_key" json:"-"` + ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"createdAt"` SellerArticleID uint `gorm:"index"` // 出售最低价