sysconf.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. package model
  2. // TAnnouncement [...]
  3. type TAnnouncement struct {
  4. AnnouncementCache
  5. Isvalid int64 `db:"isvalid" json:"isvalid"`
  6. AnnounceType int64 `db:"announce_type" json:"announce_type"`
  7. }
  8. // TableName get sql table name.获取数据库表名
  9. func (TAnnouncement) TableName() string {
  10. return "crazygod_api_config.t_announcement"
  11. }
  12. type AnnouncementShow struct {
  13. Id int64 `json:"id"`
  14. Title string `json:"title"`
  15. Content Lang `json:"content"`
  16. DateRange []int64 `json:"dateRange"`
  17. Device int64 `json:"device"`
  18. Usertype int64 `json:"usertype"`
  19. Whitelist []int64 `json:"whitelist"`
  20. Blacklist []int64 `json:"blacklist"`
  21. }
  22. type AnnouncementCache struct {
  23. Id int64 `db:"id" redis:"id" json:"id"`
  24. Title string `db:"title" redis:"title" json:"title"`
  25. Content Lang `db:"content" redis:"content" json:"content"`
  26. Stime int64 `db:"stime" redis:"stime" json:"stime"`
  27. Etime int64 `db:"etime" redis:"etime" json:"etime"`
  28. Device int64 `db:"device" redis:"device" json:"device"` // 0全部,1安卓,2fb
  29. Usertype int64 `db:"usertype" redis:"usertype" json:"usertype"` // 0全部,1安卓,2fb
  30. Type int64 `db:"type" redis:"type" json:"type"` // 0不停服1停服
  31. Wlist string `db:"wlist" redis:"wlist" json:"wlist"` // 白名单
  32. Blist string `db:"blist" redis:"blist" json:"blist"` // 黑名单
  33. }
  34. type StopServerConf struct {
  35. Id int64 `json:"id"`
  36. Type int64 `json:"type"`
  37. AnnouncementId int64 `json:"announcement_id"`
  38. Url string `json:"url"`
  39. }
  40. type StopServerShowConf struct {
  41. BasicConf StopServerConf `json:"basicConf"`
  42. NoticeOptions Options `json:"noticeOptions"`
  43. }
  44. type StopServerStatic struct {
  45. Type int64 `json:"type"`
  46. Content StopServerStaticContent `json:"content"`
  47. Url string `json:"url"`
  48. }
  49. type StopServerStaticContent struct {
  50. Title string `json:"title"`
  51. Content Lang `json:"content"`
  52. Whitelist []int64 `json:"wlist"`
  53. }