sidebar.go 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package sidebar
  2. import (
  3. resource "go-common/app/service/main/resource/model"
  4. "go-common/library/time"
  5. )
  6. type SideBar struct {
  7. ID int64 `json:"id,omitempty"`
  8. Tip int `json:"tip,omitempty"`
  9. Rank int `json:"rank,omitempty"`
  10. Logo string `json:"logo,omitempty"`
  11. LogoWhite string `json:"logo_white,omitempty"`
  12. Name string `json:"name,omitempty"`
  13. Param string `json:"param,omitempty"`
  14. Module int `json:"module,omitempty"`
  15. Plat int8 `json:"-"`
  16. Build int `json:"-"`
  17. Conditions string `json:"-"`
  18. OnlineTime time.Time `json:"online_time"`
  19. NeedLogin int8 `json:"-"`
  20. WhiteURL string `json:"-"`
  21. Language string `json:"-"`
  22. }
  23. type Limit struct {
  24. ID int64 `json:"-"`
  25. Build int `json:"-"`
  26. Condition string `json:"-"`
  27. }
  28. func (s *SideBar) Change(rsb *resource.SideBar) {
  29. s.ID = rsb.ID
  30. s.Tip = rsb.Tip
  31. s.Rank = rsb.Rank
  32. s.Logo = rsb.Logo
  33. s.LogoWhite = rsb.LogoWhite
  34. s.Name = rsb.Name
  35. s.Param = rsb.Param
  36. s.Module = rsb.Module
  37. s.Plat = rsb.Plat
  38. s.Build = rsb.Build
  39. s.Conditions = rsb.Conditions
  40. s.OnlineTime = rsb.OnlineTime
  41. s.NeedLogin = rsb.NeedLogin
  42. s.WhiteURL = rsb.WhiteURL
  43. s.Language = rsb.Language
  44. }