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"`