From 9339cab328e4bf339a99274cb4377c2b867fb88b Mon Sep 17 00:00:00 2001 From: Sakurasan <1173092237@qq.com> Date: Sun, 7 May 2023 22:40:47 +0800 Subject: [PATCH] up --- store/userdb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/userdb.go b/store/userdb.go index 1b25c6d..b621e7e 100644 --- a/store/userdb.go +++ b/store/userdb.go @@ -6,7 +6,7 @@ import ( type User struct { IsDelete bool `gorm:"default:false" json:"IsDelete"` - ID uint `gorm:"primarykey" json:"id,omitempty"` + ID uint `gorm:"primaryKey;autoIncrement" json:"id,omitempty"` Name string `gorm:"unique;not null" json:"name,omitempty"` Token string `gorm:"unique;not null" json:"token,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty"`