49 lines
1.7 KiB
Go
49 lines
1.7 KiB
Go
package request
|
|
|
|
import (
|
|
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
|
"github.com/flipped-aurora/gin-vue-admin/server/model/learning"
|
|
)
|
|
|
|
type QuestionSearch struct {
|
|
learning.Question
|
|
request.PageInfo
|
|
StartCreatedAt *string `json:"startCreatedAt" form:"startCreatedAt"`
|
|
EndCreatedAt *string `json:"endCreatedAt" form:"endCreatedAt"`
|
|
}
|
|
|
|
type QuestionCreate struct {
|
|
KnowledgePointId uint `json:"knowledgePointId" binding:"required"`
|
|
Title string `json:"title" binding:"required"`
|
|
Content string `json:"content"`
|
|
Type string `json:"type" binding:"required"`
|
|
Options string `json:"options"`
|
|
Answer string `json:"answer" binding:"required"`
|
|
Explanation string `json:"explanation"`
|
|
Difficulty string `json:"difficulty"`
|
|
Score int `json:"score"`
|
|
}
|
|
|
|
type QuestionUpdate struct {
|
|
ID uint `json:"id" binding:"required"`
|
|
KnowledgePointId uint `json:"knowledgePointId" binding:"required"`
|
|
Title string `json:"title" binding:"required"`
|
|
Content string `json:"content"`
|
|
Type string `json:"type" binding:"required"`
|
|
Options string `json:"options"`
|
|
Answer string `json:"answer" binding:"required"`
|
|
Explanation string `json:"explanation"`
|
|
Difficulty string `json:"difficulty"`
|
|
Score int `json:"score"`
|
|
}
|
|
|
|
type QuestionsByKnowledgePointRequest struct {
|
|
KnowledgePointId uint `json:"knowledgePointId" form:"knowledgePointId" binding:"required"`
|
|
}
|
|
|
|
// QuestionOption 题目选项结构
|
|
type QuestionOption struct {
|
|
Key string `json:"key"` // 选项标识 A、B、C、D
|
|
Value string `json:"value"` // 选项内容
|
|
}
|