From 61e32ef9703cb920dd0f1ca83d52115226ecdef7 Mon Sep 17 00:00:00 2001 From: yanlongqi Date: Thu, 13 Nov 2025 03:34:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E9=A2=98=E7=9A=84?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/models/wrong_question.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/models/wrong_question.go b/internal/models/wrong_question.go index cab107f..7763563 100644 --- a/internal/models/wrong_question.go +++ b/internal/models/wrong_question.go @@ -30,8 +30,8 @@ type WrongQuestion struct { type WrongQuestionHistory struct { ID int64 `gorm:"primarykey" json:"id"` WrongQuestionID int64 `gorm:"index;not null" json:"wrong_question_id"` - UserAnswer string `gorm:"type:text;not null" json:"user_answer"` // JSON 存储 - CorrectAnswer string `gorm:"type:text;not null" json:"correct_answer"` // JSON 存储 + UserAnswer string `gorm:"type:jsonb;not null" json:"user_answer"` // JSON 存储 + CorrectAnswer string `gorm:"type:jsonb;not null" json:"correct_answer"` // JSON 存储 AnsweredAt time.Time `gorm:"index" json:"answered_at"` TimeSpent int `json:"time_spent"` // 答题用时(秒) IsCorrect bool `json:"is_correct"`