6
0

learning_question.go 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // ==========================================================================
  2. // This is auto-generated by gf cli tool. Fill this file as you wish.
  3. // ==========================================================================
  4. package learning
  5. import (
  6. "lims_adapter/model"
  7. "lims_adapter/model/learning/internal"
  8. )
  9. // LearningQuestion is the golang structure for table learning_question.
  10. type LearningQuestion internal.LearningQuestion
  11. // Fill with you ideas below.
  12. type LearningQuestionGetReq struct {
  13. Id int `json:"id" v:"required#请输入题目Id"` // 题目 ID
  14. }
  15. type LearningQuestionOption struct {
  16. Name string `json:"name"`
  17. Content string `json:"content"`
  18. IsCorrect bool `json:"isCorrect"`
  19. }
  20. type LearningQuestionGetRsp struct {
  21. LearningQuestion
  22. Content interface{} `json:"content"`
  23. }
  24. type LearningQuestionListReq struct {
  25. Page *model.Page `json:"page"`
  26. OrderBy *model.OrderBy `json:"orderBy"`
  27. SkillId int `json:"skillId"`
  28. Name string `json:"name"`
  29. }
  30. type LearningQuestionAddReq struct {
  31. SkillId int `json:"skillId" v:"required#请输入技能Id"` // 技能 Id
  32. Name string `json:"name" v:"required#请输入题目内容"` // 题目内容
  33. Type int `json:"type" v:"required#请输入题型 in:1,2,3#请输入正确的题型"` // 题型 1 单选 2 多选 3 判断
  34. Enable int `json:"enable"` // 是否启用
  35. Content []LearningQuestionOption `json:"content" v:"required#请输入题目内容"` // 题目内容
  36. Explanation string `json:"explanation"` // 题目解析
  37. }
  38. type LearningQuestionUpdateReq struct {
  39. Id int `json:"id" v:"required#请输入题目Id"` // Id
  40. SkillId int `json:"skillId"` // 技能 Id
  41. Name string `json:"name"` // 题目内容
  42. Type int `json:"type" v:"in:1,2,3#请输入正确的题型"` // 题型 1 单选 2 多选 3 判断
  43. Enable *int `json:"enable"` // 是否启用 0 未启用 1 启用
  44. Content []LearningQuestionOption `json:"content"` // 题目内容
  45. Explanation string `json:"explanation"` // 题目解析
  46. }
  47. type LearningQuestionDeleteReq struct {
  48. Id int `json:"id" v:"required#请输入题目Id"`
  49. }