feat json返回id

This commit is contained in:
timerzz 2024-09-09 17:18:36 +08:00
parent b2d0293648
commit 6f81fc7614
2 changed files with 4 additions and 4 deletions

View File

@ -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"`

View File

@ -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"`
// 出售最低价