act_img_name.go 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package model
  2. type ActImgNameConfBasic struct {
  3. Id int64 `db:"id" json:"id"`
  4. Name string `db:"name" json:"name"`
  5. AddTime int64 `db:"add_time" json:"add_time"`
  6. Show int64 `db:"show" json:"show"` // 是否在后台显示(1:显示,2:隐藏)
  7. }
  8. type ActImgContent struct {
  9. Id int64 `json:"id"`
  10. Name string `json:"name"`
  11. Type string `json:"type"`
  12. }
  13. // ActThemeConf 返回给后台的结构
  14. type ActThemeConf struct {
  15. ActImgNameConfBasic
  16. Content []ActImgContent `db:"content" json:"content"`
  17. }
  18. // TActiveImgNameConfigCache 缓存中存的的结构
  19. type TActiveImgNameConfigCache struct {
  20. ActImgNameConfBasic
  21. Content string `db:"content" json:"content"`
  22. }
  23. // TActiveImgNameConfig 数据库存的结构
  24. type TActiveImgNameConfig struct {
  25. ActImgNameConfBasic
  26. Content map[int64]ActImgContent `db:"content" json:"content"`
  27. }
  28. func (TActiveImgNameConfig) TableName() string {
  29. return "crazygod_api_config.t_active_img_name_config"
  30. }
  31. type ActImgNameInfo struct {
  32. Cid int64 `json:"cid"`
  33. ImgName string `json:"imgName"`
  34. }
  35. type TActiveImgExtraConfig struct {
  36. Id string `json:"id" db:"id"`
  37. Type string `json:"type" db:"type"`
  38. Skin string `json:"skin" db:"skin"`
  39. Key string `json:"key" db:"key"`
  40. Val string `json:"val" db:"val"`
  41. Msg string `json:"msg" db:"msg"`
  42. }
  43. func (TActiveImgExtraConfig) TableName() string {
  44. return "crazygod_api_config.t_active_img_extra_config"
  45. }
  46. type ImgExtraConfReq struct {
  47. Type string `form:"type" json:"type"`
  48. Skin string `form:"skin" json:"skin"`
  49. }
  50. type ImgExtraConfUpdateReq struct {
  51. ImgExtraConfReq
  52. Conf []TActiveImgExtraConfig `json:"conf"`
  53. }