midjourney.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. package dto
  2. //type SimpleMjRequest struct {
  3. // Prompt string `json:"prompt"`
  4. // CustomId string `json:"customId"`
  5. // Action string `json:"action"`
  6. // Content string `json:"content"`
  7. //}
  8. type SwapFaceRequest struct {
  9. SourceBase64 string `json:"sourceBase64"`
  10. TargetBase64 string `json:"targetBase64"`
  11. }
  12. type MidjourneyRequest struct {
  13. Prompt string `json:"prompt"`
  14. CustomId string `json:"customId"`
  15. BotType string `json:"botType"`
  16. NotifyHook string `json:"notifyHook"`
  17. Action string `json:"action"`
  18. Index int `json:"index"`
  19. State string `json:"state"`
  20. TaskId string `json:"taskId"`
  21. Base64Array []string `json:"base64Array"`
  22. Content string `json:"content"`
  23. MaskBase64 string `json:"maskBase64"`
  24. }
  25. type MidjourneyResponse struct {
  26. Code int `json:"code"`
  27. Description string `json:"description"`
  28. Properties interface{} `json:"properties"`
  29. Result string `json:"result"`
  30. }
  31. type MidjourneyUploadResponse struct {
  32. Code int `json:"code"`
  33. Description string `json:"description"`
  34. Result []string `json:"result"`
  35. }
  36. type MidjourneyResponseWithStatusCode struct {
  37. StatusCode int `json:"statusCode"`
  38. Response MidjourneyResponse
  39. }
  40. type MidjourneyDto struct {
  41. MjId string `json:"id"`
  42. Action string `json:"action"`
  43. CustomId string `json:"customId"`
  44. BotType string `json:"botType"`
  45. Prompt string `json:"prompt"`
  46. PromptEn string `json:"promptEn"`
  47. Description string `json:"description"`
  48. State string `json:"state"`
  49. SubmitTime int64 `json:"submitTime"`
  50. StartTime int64 `json:"startTime"`
  51. FinishTime int64 `json:"finishTime"`
  52. ImageUrl string `json:"imageUrl"`
  53. VideoUrl string `json:"videoUrl"`
  54. VideoUrls []ImgUrls `json:"videoUrls"`
  55. Status string `json:"status"`
  56. Progress string `json:"progress"`
  57. FailReason string `json:"failReason"`
  58. Buttons any `json:"buttons"`
  59. MaskBase64 string `json:"maskBase64"`
  60. Properties *Properties `json:"properties"`
  61. }
  62. type ImgUrls struct {
  63. Url string `json:"url"`
  64. }
  65. type MidjourneyStatus struct {
  66. Status int `json:"status"`
  67. }
  68. type MidjourneyWithoutStatus struct {
  69. Id int `json:"id"`
  70. Code int `json:"code"`
  71. UserId int `json:"user_id" gorm:"index"`
  72. Action string `json:"action"`
  73. MjId string `json:"mj_id" gorm:"index"`
  74. Prompt string `json:"prompt"`
  75. PromptEn string `json:"prompt_en"`
  76. Description string `json:"description"`
  77. State string `json:"state"`
  78. SubmitTime int64 `json:"submit_time"`
  79. StartTime int64 `json:"start_time"`
  80. FinishTime int64 `json:"finish_time"`
  81. ImageUrl string `json:"image_url"`
  82. Progress string `json:"progress"`
  83. FailReason string `json:"fail_reason"`
  84. ChannelId int `json:"channel_id"`
  85. }
  86. type ActionButton struct {
  87. CustomId any `json:"customId"`
  88. Emoji any `json:"emoji"`
  89. Label any `json:"label"`
  90. Type any `json:"type"`
  91. Style any `json:"style"`
  92. }
  93. type Properties struct {
  94. FinalPrompt string `json:"finalPrompt"`
  95. FinalZhPrompt string `json:"finalZhPrompt"`
  96. }