dataplatform.go 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. package model
  2. // DPTask data platform task
  3. type DPTask struct {
  4. Task
  5. DPParams
  6. }
  7. // DPParams data platform params
  8. type DPParams struct {
  9. Age int `form:"age" json:"age"`
  10. Sex int `form:"sex" json:"sex"`
  11. IsUp int `form:"is_up" json:"is_up"`
  12. IsFormalMember int `form:"is_formal_member" json:"is_formal_member"`
  13. UserActiveDay int `form:"user_active_day" json:"user_active_day"`
  14. UserNewDay int `form:"user_new_day" json:"user_new_day"`
  15. UserSilentDay int `form:"user_silent_day" json:"user_silent_day"`
  16. Area []int `form:"area,split" json:"-"`
  17. AreaStr string `json:"area"`
  18. Level []int `form:"level,split" json:"-"`
  19. LevelStr string `json:"level"`
  20. Platforms []int `form:"platforms,split" json:"-"`
  21. PlatformStr string `json:"platforms"`
  22. Like []int `form:"like,split" json:"-"`
  23. LikeStr string `json:"like"`
  24. Channel []string `form:"channel,split" json:"-"`
  25. ChannelStr string `json:"channel"`
  26. VipExpireStr string `form:"vip_expire" json:"-"`
  27. VipExpires []*VipExpire `json:"vip_expire"`
  28. AttentionStr string `form:"self_attention" json:"-"`
  29. Attentions []*SelfAttention `json:"self_attention"`
  30. AttentionsType int `form:"self_attention_type" json:"self_attention_type"`
  31. ActivePeriodStr string `form:"active" json:"-"`
  32. ActivePeriods []*ActivePeriod `json:"active"`
  33. ActivePeriod int
  34. }
  35. // SelfAttention 自选关注
  36. type SelfAttention struct {
  37. Type int `json:"type"`
  38. Include string `json:"include"`
  39. Exclude string `json:"exclude"`
  40. }
  41. // VipExpire 大会员过期时间
  42. type VipExpire struct {
  43. Begin string `json:"begin"`
  44. End string `json:"end"`
  45. }
  46. // ActivePeriod 活跃时间段
  47. type ActivePeriod struct {
  48. Period int `json:"period"`
  49. PushTime string `json:"push_time"`
  50. ExpireTime string `json:"expire_time"`
  51. }
  52. // DPCondition data platform condition
  53. type DPCondition struct {
  54. ID int64
  55. Task int64
  56. Job string
  57. Type int
  58. Condition string
  59. SQL string
  60. Status int
  61. StatusURL string
  62. File string
  63. }
  64. // TableName .
  65. func (c *DPCondition) TableName() string {
  66. return "push_dataplatform_conditions"
  67. }