midjourney.go 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. }
  40. type MidjourneyStatus struct {
  41. Status int `json:"status"`
  42. }
  43. type MidjourneyWithoutStatus struct {
  44. Id int `json:"id"`
  45. Code int `json:"code"`
  46. UserId int `json:"user_id" gorm:"index"`
  47. Action string `json:"action"`
  48. MjId string `json:"mj_id" gorm:"index"`
  49. Prompt string `json:"prompt"`
  50. PromptEn string `json:"prompt_en"`
  51. Description string `json:"description"`
  52. State string `json:"state"`
  53. SubmitTime int64 `json:"submit_time"`
  54. StartTime int64 `json:"start_time"`
  55. FinishTime int64 `json:"finish_time"`
  56. ImageUrl string `json:"image_url"`
  57. Progress string `json:"progress"`
  58. FailReason string `json:"fail_reason"`
  59. ChannelId int `json:"channel_id"`
  60. }
  61. type ActionButton struct {
  62. CustomId any `json:"customId"`
  63. Emoji any `json:"emoji"`
  64. Label any `json:"label"`
  65. Type any `json:"type"`
  66. Style any `json:"style"`
  67. }