修改错题的字段

This commit is contained in:
燕陇琪 2025-11-13 03:34:24 +08:00
parent e651910e74
commit 61e32ef970

View File

@ -30,8 +30,8 @@ type WrongQuestion struct {
type WrongQuestionHistory struct { type WrongQuestionHistory struct {
ID int64 `gorm:"primarykey" json:"id"` ID int64 `gorm:"primarykey" json:"id"`
WrongQuestionID int64 `gorm:"index;not null" json:"wrong_question_id"` WrongQuestionID int64 `gorm:"index;not null" json:"wrong_question_id"`
UserAnswer string `gorm:"type:text;not null" json:"user_answer"` // JSON 存储 UserAnswer string `gorm:"type:jsonb;not null" json:"user_answer"` // JSON 存储
CorrectAnswer string `gorm:"type:text;not null" json:"correct_answer"` // JSON 存储 CorrectAnswer string `gorm:"type:jsonb;not null" json:"correct_answer"` // JSON 存储
AnsweredAt time.Time `gorm:"index" json:"answered_at"` AnsweredAt time.Time `gorm:"index" json:"answered_at"`
TimeSpent int `json:"time_spent"` // 答题用时(秒) TimeSpent int `json:"time_spent"` // 答题用时(秒)
IsCorrect bool `json:"is_correct"` IsCorrect bool `json:"is_correct"`