From bb10f842f3bdc5ce4b85bf728774cfcc8ae4c202 Mon Sep 17 00:00:00 2001 From: timerzz Date: Tue, 27 Aug 2024 13:57:04 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8Dprovider=E7=9A=84id?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E8=BF=94=E5=9B=9E=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- structs/v2/provider.go | 2 +- structs/v2/seller.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/structs/v2/provider.go b/structs/v2/provider.go index 7875488..49e07ab 100644 --- a/structs/v2/provider.go +++ b/structs/v2/provider.go @@ -9,7 +9,7 @@ import ( type ProviderId string type Provider struct { - ID uint `gorm:"primary_key" json:"-"` + ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt gorm.DeletedAt `gorm:"index"` diff --git a/structs/v2/seller.go b/structs/v2/seller.go index d5a4cb0..f0eeeca 100644 --- a/structs/v2/seller.go +++ b/structs/v2/seller.go @@ -10,7 +10,7 @@ type SellerId string // Seller 出货商 type Seller struct { - ID uint `gorm:"primary_key" json:"-"` + ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt gorm.DeletedAt `gorm:"index"`