You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

149 lines
4.7 KiB

package v1
// GetQuestionsReq 获取题目请求
type GetQuestionsReq struct {
Page int `json:"page"`
PageSize int `json:"page_size"`
}
// GetQuestionsRes 获取题目响应
type GetQuestionsRes struct {
Id int `json:"id"`
Stem string `json:"stem"`
A string `json:"A"`
B string `json:"B"`
C string `json:"C"`
D string `json:"D"`
}
// SubmitAnswersReq 提交答案请求
type SubmitAnswersReq struct {
Jwcode int `v:"required" dc:"精网号"`
Answers []*AnswerItem `v:"required" dc:"答案列表"`
}
// AnswerItem 答案项
type AnswerItem struct {
QuestionId int `json:"questionId" dc:"题目ID"`
UserAnswer string `json:"userAnswer" dc:"用户答案"`
}
// SubmitAnswersRes 提交答案响应
type SubmitAnswersRes struct {
Score int `json:"score" dc:"得分"`
Total int `json:"total" dc:"总分"`
}
// GetWrongQuestionsReq 获取错题请求
type GetWrongQuestionsReq struct {
Jwcode int `v:"required" dc:"精网号(查询参数传递)"`
Page int `json:"page"`
PageSize int `json:"page_size"`
}
// GetUserScoresReq 获取用户成绩请求
type GetUserScoresReq struct {
Jwcode int `v:"required" dc:"精网号"`
}
// GetUserScoresRes 获取用户成绩响应
type GetUserScoresRes struct {
Score int `json:"score"`
}
// GetCourseReq 获取用户课程请求
type GetCourseReq struct {
Jwcode int `v:"required" dc:"精网号"`
}
// GetCourseRes 获取用户课程响应
type GetCourseRes struct {
CrName []string `json:"cr_name"`
}
// GetWrongQuestionsRes 错题详情
type GetWrongQuestionsRes struct {
GetQuestionsRes `json:"question"`
UserAnswer string `json:"userAnswer" dc:"用户答案"`
CorrectAnswer string `json:"correctAnswer" dc:"正确答案"`
}
//------------------------------------------------------------------------------------------------------------
// QuestionOutputReq 获取题目列表请求
type QuestionOutputReq struct {
Stem string `json:"stem"`
QuestionTypeId string `json:"question_type_id"`
CourseRecommendationId string `json:"course+recommendation_id"`
Page int `json:"page"`
PageSize int `json:"page_size"`
SortField string `json:"sort_field"` // 排序字段:error_count, error_rate, id
SortOrder string `json:"sort_order"` // 排序方向:asc, desc
}
// QuestionOutputRes 题目输出
type QuestionOutputRes struct {
Id int `json:"id"`
Stem string `json:"stem"`
A string `json:"A"`
B string `json:"B"`
C string `json:"C"`
D string `json:"D"`
CorrectAnswer string `json:"correctAnswer"`
QuestionTypeName string `json:"questionTypeName"`
CrName string `json:"CrName"`
CitationCount int `json:"citationCount"`
ErrorCount int `json:"errorCount"`
ErrorRate int `json:"errorRate"`
}
// QuestionUpdateReq 修改题目请求
type QuestionUpdateReq struct {
Id int `json:"id"`
Stem string `json:"stem"`
A string `json:"A"`
B string `json:"B"`
C string `json:"C"`
D string `json:"D"`
CorrectAnswer string `json:"correct_answer"`
QuestionTypeId string `json:"question_type_id"`
CourseRecommendationId string `json:"course+recommendation_id"`
}
// QuestionDelReq 删除题目请求
type QuestionDelReq struct {
Id int `json:"id"`
}
// UserScoreOutputRes 获取用户成绩列表响应
type UserScoreOutputRes struct {
Id int `json:"id"`
UserName string `json:"user_name"`
UserIdentity string `json:"user_identity"`
Jwcode int `json:"jwcode"`
Score int `json:"score"`
CreatedAt string `json:"createdAt"`
}
// UserScoreOutputReq 获取用户成绩列表请求
type UserScoreOutputReq struct {
UserName string `json:"user_name"` // 用户名(精准查询)
UserIdentity string `json:"user_identity"` // 用户身份(过滤)
Jwcode int `json:"jwcode"` // 精网号(精准查询)
StartTime string `json:"start_time"` // 开始时间(提交时间范围)
EndTime string `json:"end_time"` // 结束时间(提交时间范围)
Page int `json:"page"`
PageSize int `json:"page_size"`
SortField string `json:"sort_field"` // 排序字段:score, created_at
SortOrder string `json:"sort_order"` // 排序方向:asc, desc
}
// ErrorOutPutUserReq 获取错题用户列表请求
type ErrorOutPutUserReq struct {
Id int `json:"id"`
}
type ErrorOutPutUserRes struct {
UserName string `json:"user_name"`
UserIdentity string `json:"user_identity"`
ErrorCount int `json:"error_count"`
}