From b9abe45f791bea70a059e37186907190afcec350 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 08 十二月 2023 17:05:39 +0800
Subject: [PATCH] debug

---
 model/model.go |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/model/model.go b/model/model.go
index aa1f864..0efbd52 100644
--- a/model/model.go
+++ b/model/model.go
@@ -11,7 +11,8 @@
 type BigID uint
 
 type CommonModel struct {
-	ID        BigID `gorm:"primary_key"`
+	ID        uint  `gorm:"primary_key" json:"-"`
+	BigInt    BigID `json:"ID"`
 	CreatedAt time.Time
 	UpdatedAt time.Time
 	DeletedAt *time.Time `sql:"index"`
@@ -24,7 +25,7 @@
 			// 澶勭悊 ID 涓鸿礋鏁扮殑鎯呭喌锛堝彲閫夛級
 			id = snowflake.GenerateID()
 		}
-		c.ID = BigID(id)
+		c.ID = uint(id)
 	}
 }
 

--
Gitblit v1.8.0