probo/models/quiz.go

11 lines
296 B
Go

package models
type Quiz struct {
Meta
Hash string `json:"hash"`
Question *Question `json:"question" gorm:"foreignKey:ID"`
Answers []*Answer `json:"answers" gorm:"many2many:quiz_answers"`
Correct *Answer `json:"correct" gorm:"foreignKey:ID"`
Type int `json:"type"`
}