midjourney.go 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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 MidjourneyResponseWithStatusCode struct {
  32. StatusCode int `json:"statusCode"`
  33. Response MidjourneyResponse
  34. }
  35. type MidjourneyDto struct {
  36. MjId string `json:"id"`
  37. Action string `json:"action"`
  38. CustomId string `json:"customId"`
  39. BotType string `json:"botType"`
  40. Prompt string `json:"prompt"`
  41. PromptEn string `json:"promptEn"`
  42. Description string `json:"description"`
  43. State string `json:"state"`
  44. SubmitTime int64 `json:"submitTime"`
  45. StartTime int64 `json:"startTime"`
  46. FinishTime int64 `json:"finishTime"`
  47. ImageUrl string `json:"imageUrl"`
  48. Status string `json:"status"`
  49. Progress string `json:"progress"`
  50. FailReason string `json:"failReason"`
  51. Buttons any `json:"buttons"`
  52. MaskBase64 string `json:"maskBase64"`
  53. Properties *Properties `json:"properties"`
  54. }
  55. type MidjourneyStatus struct {
  56. Status int `json:"status"`
  57. }
  58. type MidjourneyWithoutStatus struct {
  59. Id int `json:"id"`
  60. Code int `json:"code"`
  61. UserId int `json:"user_id" gorm:"index"`
  62. Action string `json:"action"`
  63. MjId string `json:"mj_id" gorm:"index"`
  64. Prompt string `json:"prompt"`
  65. PromptEn string `json:"prompt_en"`
  66. Description string `json:"description"`
  67. State string `json:"state"`
  68. SubmitTime int64 `json:"submit_time"`
  69. StartTime int64 `json:"start_time"`
  70. FinishTime int64 `json:"finish_time"`
  71. ImageUrl string `json:"image_url"`
  72. Progress string `json:"progress"`
  73. FailReason string `json:"fail_reason"`
  74. ChannelId int `json:"channel_id"`
  75. }
  76. type ActionButton struct {
  77. CustomId any `json:"customId"`
  78. Emoji any `json:"emoji"`
  79. Label any `json:"label"`
  80. Type any `json:"type"`
  81. Style any `json:"style"`
  82. }
  83. type Properties struct {
  84. FinalPrompt string `json:"finalPrompt"`
  85. FinalZhPrompt string `json:"finalZhPrompt"`
  86. }