midjourney.go 2.2 KB

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