excel_info.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. package response
  2. import (
  3. "github.com/rdlucklib/rdluck_tools/paging"
  4. "hongze/hz_crm_api/models/data_manage"
  5. "hongze/hz_crm_api/models/data_manage/request"
  6. "hongze/hz_crm_api/services/excel"
  7. "time"
  8. )
  9. // AddExcelInfoResp 添加excel表格的返回
  10. type AddExcelInfoResp struct {
  11. ExcelInfoId int `description:"表格id"`
  12. UniqueCode string `description:"表格唯一编码"`
  13. }
  14. // ExcelListResp 表格列表返回数据
  15. type ExcelListResp struct {
  16. Paging *paging.PagingItem
  17. List []*data_manage.MyExcelInfoList
  18. }
  19. // ExcelTableDetailResp excel表格详情
  20. type ExcelTableDetailResp struct {
  21. UniqueCode string `description:"表格唯一code"`
  22. ExcelImage string `description:"表格截图"`
  23. ExcelName string `description:"表格名称"`
  24. TableInfo excel.TableData
  25. }
  26. // TableCellResp 单元格
  27. type TableCellResp struct {
  28. DataType int `description:"数据类型,1:普通的,2:插值法,3:手动输入,4:公式计算"`
  29. DataTime string `description:"所属日期"`
  30. ShowValue string `description:"展示的值"`
  31. Value string `description:"实际值(计算公式)"`
  32. }
  33. type TableDataItem struct {
  34. EdbInfoId int `description:"指标id"`
  35. Data []request.ManualDataReq `description:"数据列表"`
  36. }
  37. // TableDetailResp excel表格详情
  38. type TableDetailResp struct {
  39. ExcelInfo data_manage.ExcelInfo `description:"表格基础信息"`
  40. TableData request.TableDataReq `description:"表格内容"`
  41. }
  42. // ExcelInfoDetail excel表格详情(前端使用)
  43. type ExcelInfoDetail struct {
  44. ExcelInfoId int `orm:"column(excel_info_id);pk"`
  45. Source int `description:"表格来源,1:excel插件的表格,2:自定义表格,默认:1"`
  46. ExcelType int `description:"表格类型,1:指标列,2:日期列,默认:1"`
  47. ExcelName string `description:"表格名称"`
  48. UniqueCode string `description:"表格唯一编码"`
  49. ExcelClassifyId int `description:"表格分类id"`
  50. SysUserId int `description:"操作人id"`
  51. SysUserRealName string `description:"操作人真实姓名"`
  52. Content string `description:"表格内容"`
  53. ExcelImage string `description:"表格图片"`
  54. FileUrl string `description:"表格下载地址"`
  55. Sort int `description:"排序字段,数字越小越排前面"`
  56. IsDelete int `description:"是否删除,0:未删除,1:已删除"`
  57. ModifyTime time.Time `description:"最近修改日期"`
  58. CreateTime time.Time `description:"创建日期"`
  59. TableData interface{} `description:"表格内容"`
  60. Button ExcelInfoDetailButton `description:"操作权限"`
  61. }
  62. // ExcelInfoDetailButton 操作按钮
  63. type ExcelInfoDetailButton struct {
  64. RefreshButton bool `description:"是否可编辑"`
  65. CopyButton bool `description:"是否可另存为"`
  66. DownloadButton bool `description:"是否可下载"`
  67. OpButton bool `description:"是否可编辑"`
  68. DeleteButton bool `description:"是否可删除"`
  69. }