sys_dict_data.go 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // ==========================================================================
  2. // This is auto-generated by gf cli tool. Fill this file as you wish.
  3. // ==========================================================================
  4. package model
  5. import (
  6. "context"
  7. comModel "dashoo.cn/micro/app/common/model"
  8. "dashoo.cn/micro/app/model/internal"
  9. )
  10. // SysDictData is the golang structure for table sys_dict_data.
  11. type SysDictData internal.SysDictData
  12. // Fill with you ideas below.
  13. // SelectDictPageReq 分页请求参数
  14. type SelectDictPageReq struct {
  15. DictType string `p:"dictType"` //字典类型
  16. DictLabel string `p:"dictLabel"` //字典标签
  17. Status string `p:"status"` //状态
  18. comModel.PageReq
  19. }
  20. // GetDictReq 获取字典信息请求参数
  21. type GetDictReq struct {
  22. DictType string `p:"dictType" v:"required#字典类型不能为空"`
  23. DefaultValue string `p:"defaultValue"`
  24. Ctx context.Context
  25. }
  26. // DictRes 完整的一个字典信息
  27. type DictRes struct {
  28. Info *DictTypeRes `json:"info"`
  29. Values []*DictDataRes `json:"values"`
  30. }
  31. type DictTypeRes struct {
  32. DictName string `json:"name"`
  33. Remark string `json:"remark"`
  34. }
  35. // DictDataRes 字典数据
  36. type DictDataRes struct {
  37. DictValue string `json:"key"`
  38. DictLabel string `json:"value"`
  39. IsDefault int `json:"isDefault"`
  40. Remark string `json:"remark"`
  41. }
  42. // DictDataAddReq 新增操作请求参数
  43. type DictDataAddReq struct {
  44. DictLabel string `p:"dictLabel" v:"required#字典标签不能为空"`
  45. DictValue string `p:"dictValue" v:"required#字典键值不能为空"`
  46. DictType string `p:"dictType" v:"required#字典类型不能为空"`
  47. DictSort int `p:"dictSort" v:"integer#排序只能为整数"`
  48. CssClass string `p:"cssClass"`
  49. ListClass string `p:"listClass"`
  50. IsDefault int `p:"isDefault" v:"required|in:0,1#系统默认不能为空|默认值只能为0或1"`
  51. Status int `p:"status" v:"required|in:0,1#状态不能为空|状态只能为0或1"`
  52. Remark string `p:"remark"`
  53. CreateBy uint64
  54. }
  55. // EditDictDataReq 修改字典数据操作请求参数
  56. type EditDictDataReq struct {
  57. DictCode int `p:"dictCode" v:"required|min:1#主键ID不能为空|主键ID不能小于1"`
  58. UpdateBy uint64
  59. DictDataAddReq
  60. }