learning_material.go 3.2 KB

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