user_poster.go 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. package entity
  2. import "time"
  3. type PosterInfoRequest struct {
  4. PosterID int64 `form:"id" binding:"required"`
  5. }
  6. type UserPosterInfo struct {
  7. Code ResCode
  8. Msg string
  9. Body UserPoster
  10. }
  11. type UserPosterInfoForApi struct {
  12. Code ResCode
  13. Msg string
  14. Body struct {
  15. Poster UserPoster `json:"poster"`
  16. }
  17. }
  18. type UserPoster struct {
  19. PosterID int64 `gorm:"column:poster_id" json:"id"`
  20. Name string `gorm:"column:poster_name" json:"name"`
  21. UUID string `gorm:"column:uuid" json:"uuid"`
  22. Uid int64 `gorm:"column:uid" json:"uid"`
  23. PosterKeywords string `gorm:"column:poster_keywords" json:"poster_Keywords"`
  24. PosterJson string `gorm:"column:poster_json" json:"json"`
  25. Preview string `gorm:"column:preview" json:"preview"`
  26. Visit string `gorm:"column:visit" json:"visit"`
  27. Status string `gorm:"column:status" json:"status"`
  28. CreateAt time.Time `gorm:"column:create_at" json:"create_at"`
  29. UpdateAt time.Time `gorm:"column:update_at" json:"update_at"`
  30. }
  31. type PosterJson struct {
  32. Id string `json:"id"`
  33. Name string `json:"name"`
  34. Width uint `json:"w"`
  35. Height uint `json:"h"`
  36. Use string `json:"use"`
  37. Background string `json:"bgc"`
  38. BackgroundUrl string `json:"bgUrl"`
  39. Type string `json:"type"`
  40. Quality int `json:"quality"`
  41. Scale float64 `json:"scale"`
  42. Key string `json:"key"`
  43. Items []Items `json:"items"`
  44. }
  45. type Items struct {
  46. Type string `json:"t"`
  47. Remark string `json:"name"`
  48. UUID string `json:"uuid"`
  49. X int `json:"x"`
  50. Y int `json:"y"`
  51. Width uint `json:"w"`
  52. Height uint `json:"h"`
  53. ZIndex int `json:"z"`
  54. Angle int `json:"angle"`
  55. Size int `json:"s"`
  56. Color string `json:"c"`
  57. Background string `json:"bgc"`
  58. Value string `json:"v"`
  59. Name string `json:"vd"`
  60. Font string `json:"fn"`
  61. St int `json:"st"`
  62. Active bool `json:"active"`
  63. Lock bool `json:"lock"`
  64. AspectRatio bool `json:"aspectRatio"`
  65. P int `json:"p,omitempty"`
  66. Align *string `json:"a,omitempty"`
  67. Wrap *bool `json:"wrap,omitempty"`
  68. Bius *string `json:"bius,omitempty"`
  69. }