From 1bcba4c5af82cd476f1cbb268c3d1cf79598b34d Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Mon, 8 Jan 2024 11:18:34 +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 3d3ffae3..6ebdc837 100644 --- a/model/log.go +++ b/model/log.go @@ -8,7 +8,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"`