request_params.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. package mini_page_component
  2. import (
  3. "ecos/application/domain/oss"
  4. "git.sxidc.com/go-framework/baize/framework/core/api/request"
  5. )
  6. type (
  7. CreateMiniPageComponentJsonBody struct {
  8. PageID string `json:"pageId" assign:"toField:PageID"`
  9. ComponentTypeID string `json:"componentTypeId" binding:"required" assign:"toField:ComponentTypeID"`
  10. TypeName string `json:"typeName" binding:"required" assign:"toField:TypeName"`
  11. ComponentConfig string `json:"componentConfig" binding:"required" assign:"toField:ComponentConfig"`
  12. SortOrder int `json:"sortOrder" binding:"required" assign:"toField:SortOrder"`
  13. IsEnabled string `json:"isEnabled" binding:"required" assign:"toField:IsEnabled"`
  14. request.TenantIDJsonBody
  15. request.CreateUserIDJsonBody
  16. request.OperatorUserNameJsonBody
  17. }
  18. DeleteMiniPageComponentQueryParams struct {
  19. request.IDQueryParam
  20. request.DeleteUserIDQueryParams
  21. request.OperatorUserNameQueryParams
  22. }
  23. UpdateMiniPageComponentJsonBody struct {
  24. request.IDJsonBody
  25. PageID string `json:"pageId" assign:"toField:PageID"`
  26. ComponentTypeID string `json:"componentTypeId" assign:"toField:ComponentTypeID"`
  27. TypeName string `json:"typeName" assign:"toField:TypeName"`
  28. ComponentConfig string `json:"componentConfig" assign:"toField:ComponentConfig"`
  29. SortOrder int `json:"sortOrder" assign:"toField:SortOrder"`
  30. IsEnabled string `json:"isEnabled" assign:"toField:IsEnabled"`
  31. request.UpdateUserIDJsonBody
  32. request.OperatorUserNameJsonBody
  33. }
  34. GetMiniPageComponentsQueryParams struct {
  35. PageID string `form:"pageId" assign:"toField:PageID"`
  36. ComponentTypeID string `form:"componentTypeId" assign:"toField:ComponentTypeID"`
  37. TypeName string `form:"typeName" assign:"toField:TypeName"`
  38. IsEnabled string `form:"isEnabled" assign:"toField:IsEnabled"`
  39. request.BaseQueryParams
  40. request.TenantIDQueryParam
  41. }
  42. GetMiniPageComponentQueryParams struct {
  43. request.IDQueryParam
  44. }
  45. EnabledOrDisableJsonBody struct {
  46. request.IDJsonBody
  47. ComponentTypeID string `json:"componentTypeId" assign:"toField:ComponentTypeID"`
  48. IsEnabled string `json:"isEnabled" assign:"toField:IsEnabled"`
  49. }
  50. SortOrderJsonBody struct {
  51. SortOrders []SortOrder `json:"sortOrders"`
  52. }
  53. SortOrder struct {
  54. request.IDJsonBody
  55. SortOrder int `json:"sortOrder" assign:"toField:SortOrder"`
  56. }
  57. // CarouselConfig 轮播组件的整体配置
  58. CarouselConfig struct {
  59. Autoplay string `json:"autoplay"` // 自动播放,"1"表示开启,"0"表示关闭
  60. Interval int `json:"interval"` // 轮播间隔时间,单位毫秒
  61. Height int `json:"height"` // 轮播高度
  62. Items []CarouselItem `json:"items"` // 轮播项列表
  63. }
  64. // CarouselItem 轮播项的具体信息
  65. CarouselItem struct {
  66. ImageUrl string `json:"imageUrl"`
  67. ImageUrls []oss.FileObject `json:"attachments"`
  68. ImageAlt string `json:"imageAlt"`
  69. LinkType int `json:"linkType"`
  70. LinkUrl string `json:"linkUrl"`
  71. LinkParams string `json:"linkParams"`
  72. SortOrder int `json:"sortOrder"`
  73. IsEnabled string `json:"isEnabled"`
  74. }
  75. VideoComponentConfig struct {
  76. VideoTitle string `json:"videoTitle"`
  77. VideoUrlStr string `json:"videoUrl"`
  78. VideoUrlFile []oss.FileObject `json:"videoUrlFile"`
  79. VideoCoverStr string `json:"videoCover"`
  80. VideoCoverFile []oss.FileObject `json:"videoCoverFile"`
  81. AutoPlay string `json:"autoPlay"`
  82. ShowControls string `json:"showControls"`
  83. }
  84. // LiveWindowConfig 直播窗口组件的详细配置
  85. LiveWindowConfig struct {
  86. LiveTitle string `json:"liveTitle"`
  87. LiveCoverUrl string `json:"liveCoverUrl"`
  88. LiveCoverUrlFile []oss.FileObject `json:"liveCoverUrlFile"`
  89. LiveRoomId string `json:"liveRoomId"`
  90. LiveStatus int `json:"liveStatus"`
  91. PlaceholderImage string `json:"placeholderImage"`
  92. PlaceholderText string `json:"placeholderText"`
  93. }
  94. /* HAC: HTTP RELATION REQUEST PARAMS */
  95. /* HAC: END HTTP RELATION REQUEST PARAMS */
  96. )