midjourney.go 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 MidjourneyRequest struct {
  9. Prompt string `json:"prompt"`
  10. CustomId string `json:"customId"`
  11. BotType string `json:"botType"`
  12. NotifyHook string `json:"notifyHook"`
  13. Action string `json:"action"`
  14. Index int `json:"index"`
  15. State string `json:"state"`
  16. TaskId string `json:"taskId"`
  17. Base64Array []string `json:"base64Array"`
  18. Content string `json:"content"`
  19. MaskBase64 string `json:"maskBase64"`
  20. }
  21. type MidjourneyResponse struct {
  22. Code int `json:"code"`
  23. Description string `json:"description"`
  24. Properties interface{} `json:"properties"`
  25. Result string `json:"result"`
  26. }
  27. type MidjourneyResponseWithStatusCode struct {
  28. StatusCode int `json:"statusCode"`
  29. Response MidjourneyResponse
  30. }
  31. type MidjourneyDto struct {
  32. MjId string `json:"id"`
  33. Action string `json:"action"`
  34. CustomId string `json:"customId"`
  35. BotType string `json:"botType"`
  36. Prompt string `json:"prompt"`
  37. PromptEn string `json:"promptEn"`
  38. Description string `json:"description"`
  39. State string `json:"state"`
  40. SubmitTime int64 `json:"submitTime"`
  41. StartTime int64 `json:"startTime"`
  42. FinishTime int64 `json:"finishTime"`
  43. ImageUrl string `json:"imageUrl"`
  44. Status string `json:"status"`
  45. Progress string `json:"progress"`
  46. FailReason string `json:"failReason"`
  47. Buttons any `json:"buttons"`
  48. MaskBase64 string `json:"maskBase64"`
  49. Properties *Properties `json:"properties"`
  50. }
  51. type MidjourneyStatus struct {
  52. Status int `json:"status"`
  53. }
  54. type MidjourneyWithoutStatus struct {
  55. Id int `json:"id"`
  56. Code int `json:"code"`
  57. UserId int `json:"user_id" gorm:"index"`
  58. Action string `json:"action"`
  59. MjId string `json:"mj_id" gorm:"index"`
  60. Prompt string `json:"prompt"`
  61. PromptEn string `json:"prompt_en"`
  62. Description string `json:"description"`
  63. State string `json:"state"`
  64. SubmitTime int64 `json:"submit_time"`
  65. StartTime int64 `json:"start_time"`
  66. FinishTime int64 `json:"finish_time"`
  67. ImageUrl string `json:"image_url"`
  68. Progress string `json:"progress"`
  69. FailReason string `json:"fail_reason"`
  70. ChannelId int `json:"channel_id"`
  71. }
  72. type ActionButton struct {
  73. CustomId any `json:"customId"`
  74. Emoji any `json:"emoji"`
  75. Label any `json:"label"`
  76. Type any `json:"type"`
  77. Style any `json:"style"`
  78. }
  79. type Properties struct {
  80. FinalPrompt string `json:"finalPrompt"`
  81. FinalZhPrompt string `json:"finalZhPrompt"`
  82. }