From 7fcd14a70b6dc27735b67f3c3f35acedfc489ed6 Mon Sep 17 00:00:00 2001
From: jiangshuai <291802688@qq.com>
Date: 星期四, 14 十二月 2023 11:26:43 +0800
Subject: [PATCH] id的bug

---
 model/purchase/request/purchase.go |    2 +-
 global/model.go                    |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/global/model.go b/global/model.go
index b4594ee..0880609 100644
--- a/global/model.go
+++ b/global/model.go
@@ -7,10 +7,10 @@
 )
 
 type GVA_MODEL struct {
-	ID        uint           `gorm:"primarykey"`     // 涓婚敭ID
-	CreatedAt *time.Time     `json:"-"`              // 鍒涘缓鏃堕棿
-	UpdatedAt *time.Time     `json:"-"`              // 鏇存柊鏃堕棿
-	DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` // 鍒犻櫎鏃堕棿
+	ID        uint           `json:"id,string" gorm:"primarykey"` // 涓婚敭ID
+	CreatedAt *time.Time     `json:"-"`                           // 鍒涘缓鏃堕棿
+	UpdatedAt *time.Time     `json:"-"`                           // 鏇存柊鏃堕棿
+	DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`              // 鍒犻櫎鏃堕棿
 
 	FormattedCreatedAt string `gorm:"-" json:"created_at"`
 	FormattedUpdatedAt string `gorm:"-" json:"updated_at"`
diff --git a/model/purchase/request/purchase.go b/model/purchase/request/purchase.go
index 673dcbe..32a2b4f 100644
--- a/model/purchase/request/purchase.go
+++ b/model/purchase/request/purchase.go
@@ -27,7 +27,7 @@
 }
 
 type Purchase struct {
-	ID                  uint                         `gorm:"primarykey"`                                                                                                 // 涓婚敭ID
+	ID                  uint                         `json:"id,string" gorm:"primarykey"`                                                                                // 涓婚敭ID
 	PurchaseTypeId      int                          `json:"purchaseTypeId" form:"purchaseType" gorm:"type:int(11);not null;default 0;comment:閲囪喘绫诲瀷id"`                   // 閲囪喘绫诲瀷id
 	SupplierId          int                          `json:"supplierId" form:"supplierId" gorm:"type:int(11);not null;default 0;comment:渚涘簲鍟唅d"`                          // 渚涘簲鍟唅d
 	OrderSource         string                       `json:"orderSource" gorm:"type:varchar(255);not null;default '';comment:鍗曟嵁鏉ユ簮"`                                      // 鍗曟嵁鏉ユ簮

--
Gitblit v1.8.0