6
0

learning_question.go 3.4 KB

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