request_params.go 4.1 KB

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