feat: serve the quiz API under /_quizzes/api/v1 behind jwt.auth
This commit is contained in:
@@ -4,12 +4,14 @@ package models
|
||||
|
||||
import "time"
|
||||
|
||||
// Attempt is one user's run through a quiz. The score columns are set when
|
||||
// the attempt is finished.
|
||||
// Attempt is one user's run through a quiz, or through one category of its
|
||||
// questions when Category is set. The score columns are set when the attempt
|
||||
// is finished.
|
||||
type Attempt struct {
|
||||
ID uint `gorm:"column:id;primaryKey"`
|
||||
QuizID uint `gorm:"column:quiz_id"`
|
||||
UserID uint `gorm:"column:user_id"`
|
||||
Category *string `gorm:"column:category"`
|
||||
StartedAt time.Time `gorm:"column:started_at"`
|
||||
CompletedAt *time.Time `gorm:"column:completed_at"`
|
||||
ScorePoints float64 `gorm:"column:score_points"`
|
||||
|
||||
Reference in New Issue
Block a user