From daf0be491540d2f945db6e09d48d77201329ae02 Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Mon, 8 Jan 2024 11:25:22 +0800 Subject: [PATCH] fix: fix JSON tag in Log struct --- model/log.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/log.go b/model/log.go index 3df5c2c..3641814 100644 --- a/model/log.go +++ b/model/log.go @@ -9,7 +9,7 @@ import ( ) type Log struct { - Id int `json:"id;index:idx_created_at_id,priority:1"` + Id int `json:"id" gorm:"index:idx_created_at_id,priority:1"` UserId int `json:"user_id" gorm:"index"` CreatedAt int64 `json:"created_at" gorm:"bigint;index:idx_created_at_id,priority:2;index:idx_created_at_type"` Type int `json:"type" gorm:"index:idx_created_at_type"`