midjourney.go 2.5 KB

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