midjourney.go 2.6 KB

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