From 0ac236432543589b51613919d37cc7b7c07b9bf3 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 08 十二月 2023 17:47:55 +0800
Subject: [PATCH] debug
---
model/model.go | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/model/model.go b/model/model.go
index 46540d5..3bea624 100644
--- a/model/model.go
+++ b/model/model.go
@@ -12,7 +12,7 @@
type CommonModel struct {
ID uint `gorm:"primary_key" json:"-"`
- BigInt BigID `json:"ID"`
+ Id BigID `json:"ID"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time `sql:"index"`
@@ -27,10 +27,6 @@
}
c.ID = uint(id)
}
-}
-func (c *CommonModel) AfterFind(db *gorm.DB) error {
- c.BigInt = BigID(c.ID)
- return nil
}
func (id *BigID) UnmarshalJSON(b []byte) error {
--
Gitblit v1.8.0