learning_question.go 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. Image string `json:"image"`
  18. Content string `json:"content"`
  19. IsCorrect bool `json:"isCorrect"`
  20. }
  21. type LearningQuestionGetRsp struct {
  22. LearningQuestion
  23. Content interface{} `json:"content"`
  24. }
  25. type LearningQuestionListReq struct {
  26. Page *model.Page `json:"page"`
  27. OrderBy *model.OrderBy `json:"orderBy"`
  28. SkillId int `json:"skillId"`
  29. Name string `json:"name"`
  30. }
  31. type LearningQuestionAddReq struct {
  32. SkillId int `json:"skillId" v:"required#请输入技能Id"` // 技能 Id
  33. Name string `json:"name"` // 题目
  34. NameImage string `json:"nameImage"` // 题目图片
  35. Type int `json:"type" v:"required|int-in:1,2,3#请输入题型|请输入正确的题型"` // 题型 1 单选 2 多选 3 判断
  36. Enable int `json:"enable"` // 是否启用
  37. Content []LearningQuestionOption `json:"content" v:"required#请输入题目内容"` // 题目内容
  38. Explanation string `json:"explanation"` // 题目解析
  39. ExplanationImage string `json:"explanationImage"` // 题目解析图片
  40. }
  41. type LearningQuestionUpdateReq struct {
  42. Id int `json:"id" v:"required#请输入题目Id"` // Id
  43. SkillId int `json:"skillId"` // 技能 Id
  44. Name *string `json:"name"` // 题目
  45. NameImage *string `json:"nameImage"` // 题目图片
  46. Type *int `json:"type" v:"int-in:1,2,3#请输入正确的题型"` // 题型 1 单选 2 多选 3 判断
  47. Enable *int `json:"enable"` // 是否启用 0 未启用 1 启用
  48. Content []LearningQuestionOption `json:"content"` // 题目内容
  49. Explanation *string `json:"explanation"` // 题目解析
  50. ExplanationImage *string `json:"explanationImage"` // 题目解析图片
  51. }
  52. type LearningQuestionDeleteReq struct {
  53. Id []int `json:"id" v:"required#请输入题目Id"`
  54. }
  55. type LearningQuestionBatchUploadReq struct {
  56. SkillId int `json:"skillId"` // 技能 Id
  57. ExcelUrl string `json:"excelUrl" v:"required#请输入excel地址"` // excel 文件地址
  58. }