contest.go 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package model
  2. // Contest .
  3. type Contest struct {
  4. ID int64 `json:"id" form:"id"`
  5. GameStage string `json:"game_stage" form:"game_stage" validate:"required"`
  6. Stime int64 `json:"stime" form:"stime"`
  7. Etime int64 `json:"etime" form:"etime"`
  8. HomeID int64 `json:"home_id" form:"home_id"`
  9. AwayID int64 `json:"away_id" form:"away_id"`
  10. HomeScore int64 `json:"home_score" form:"home_score"`
  11. AwayScore int64 `json:"away_score" form:"away_score"`
  12. LiveRoom int64 `json:"live_room" form:"live_room"`
  13. Aid int64 `json:"aid" form:"aid"`
  14. Collection int64 `json:"collection" form:"collection"`
  15. GameState int `json:"game_state" form:"game_state"`
  16. Dic string `json:"dic" form:"dic"`
  17. Status int `json:"status" form:"status"`
  18. Sid int64 `json:"sid" form:"sid" validate:"required"`
  19. Mid int64 `json:"mid" form:"mid" validate:"required"`
  20. Special int `json:"special" form:"special"`
  21. SuccessTeam int64 `json:"success_team" form:"success_team"`
  22. SpecialName string `json:"special_name" form:"special_name"`
  23. SpecialTips string `json:"special_tips" form:"special_tips"`
  24. SpecialImage string `json:"special_image" form:"special_image"`
  25. Playback string `json:"playback" form:"playback"`
  26. CollectionURL string `json:"collection_url" form:"collection_url"`
  27. LiveURL string `json:"live_url" form:"live_url"`
  28. DataType int64 `json:"data_type" form:"data_type"`
  29. Data string `json:"-" form:"data" gorm:"-"`
  30. Adid int64 `json:"-" form:"adid" gorm:"-" validate:"required"`
  31. MatchID int64 `json:"match_id" form:"match_id"`
  32. }
  33. // ContestInfo .
  34. type ContestInfo struct {
  35. *Contest
  36. Games []*Game `json:"games"`
  37. HomeName string `json:"home_name"`
  38. AwayName string `json:"away_name"`
  39. SuccessName string `json:"success_name" form:"success_name"`
  40. Data []*ContestData `json:"data"`
  41. }
  42. // TableName es_contests
  43. func (c Contest) TableName() string {
  44. return "es_contests"
  45. }