game.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package model
  2. // game play and type
  3. const (
  4. PlatPc = 1
  5. PlatMobile = 2
  6. TypeMOBA = 1
  7. TypeACT = 2
  8. TypeFPS = 3
  9. TypeFTG = 4
  10. TypeRTS = 5
  11. TypeRPG = 6
  12. )
  13. // game plat map and type map
  14. var (
  15. PlatMap = map[int]int{
  16. PlatPc: PlatPc,
  17. PlatMobile: PlatMobile,
  18. }
  19. TypeMap = map[int]int{
  20. TypeMOBA: TypeMOBA,
  21. TypeACT: TypeACT,
  22. TypeFPS: TypeFPS,
  23. TypeFTG: TypeFTG,
  24. TypeRTS: TypeRTS,
  25. TypeRPG: TypeRPG,
  26. }
  27. )
  28. // Game .
  29. type Game struct {
  30. ID int64 `json:"id" form:"id"`
  31. Title string `json:"title" form:"title" validate:"required"`
  32. SubTitle string `json:"sub_title" form:"sub_title"`
  33. ETitle string `json:"e_title" form:"e_title"`
  34. Plat int `json:"plat" form:"plat"`
  35. Type int `json:"type" form:"type"`
  36. Logo string `json:"logo" form:"logo" validate:"required"`
  37. Publisher string `json:"publisher" form:"publisher"`
  38. Operations string `json:"operations" form:"operations"`
  39. PbTime int64 `json:"pb_time" form:"pb_time"`
  40. Dic string `json:"dic" form:"dic"`
  41. Status int `json:"status" form:"status"`
  42. }
  43. // TableName es_game
  44. func (g Game) TableName() string {
  45. return "es_games"
  46. }