6
0

learning_material.go 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. // LearningMaterial is the golang structure for table learning_material.
  10. type LearningMaterial internal.LearningMaterial
  11. // Fill with you ideas below.
  12. type LearningMaterialListReq struct {
  13. Page *model.Page `json:"page"`
  14. OrderBy *model.OrderBy `json:"orderBy"`
  15. SkillId int `json:"skillId"`
  16. Name string `json:"name"`
  17. Type int `json:"type"` // 资料类型 1 资料 2 视频
  18. }
  19. type LearningMaterialListMyReq struct {
  20. SkillId int `json:"skillId" v:"required#请输入技能Id"` // 技能 Id
  21. Type int `json:"type"` // 资料类型 1 资料 2 视频
  22. }
  23. type LearningMaterialListMy struct {
  24. LearningMaterial
  25. Learnt bool `json:"learnt"` // 是否已学习
  26. }
  27. type LearningMaterialGetReq struct {
  28. Id int `json:"id"` // 资料Id
  29. Name string `json:"name"` // 资料名称
  30. }
  31. type LearningMaterialGetRsp struct {
  32. LearningMaterial
  33. File []*LearningMaterialFile `json:"file"`
  34. LearningRecord []*LearningLearningRecordGetRsp `json:"learningRecord"`
  35. }
  36. type LearningMaterialAddReqFile struct {
  37. Name string `json:"name"` // 文件名
  38. Url string `json:"url"` // 文件地址
  39. Size string `json:"size"` // 文件大小
  40. Extend string `json:"extend"` // 文件扩展名
  41. }
  42. type LearningMaterialAddReq struct {
  43. SkillId int `json:"skillId" v:"required#请输入技能Id"` // 技能 Id
  44. Name string `json:"name" v:"required#请输入资料名称"` // 资料名称
  45. Type int `json:"type" v:"required|int-in:1,2#请输入资料类型|请输入正确的资料类型"` // 资料类型 1 资料 2 视频
  46. SortNo int `json:"sortNo"` // 排序
  47. Enable int `json:"enable" v:"int-in:0,1#请输入正确的启用类型"` // 是否启用
  48. Content string `json:"content" v:"required#请输入资料内容"` // 资料内容
  49. File []*LearningMaterialAddReqFile `json:"file"` // 附件
  50. }
  51. type LearningMaterialUpdateReq struct {
  52. Id int `json:"id" v:"required#请输入资料Id"` // Id
  53. SkillId int `json:"skillId"` // 技能 Id
  54. Name string `json:"name"` // 资料名称
  55. Type *int `json:"type" v:"int-in:1,2#请输入正确的资料类型"` // 资料类型 1 资料 2 视频
  56. SortNo *int `json:"sortNo"` // 排序
  57. Enable *int `json:"enable" v:"int-in:0,1#请输入正确的启用类型"` // 是否启用
  58. Content string `json:"content"` // 资料内容
  59. File []*LearningMaterialAddReqFile `json:"file"` // 附件
  60. }
  61. type LearningMaterialDeleteReq struct {
  62. Id []int `json:"id" v:"required#请输入资料Id"`
  63. }