flow.go 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. package archive
  2. import (
  3. "encoding/json"
  4. "time"
  5. )
  6. const (
  7. //FlowPoolRecheck 回查pool(含热门回查、频道回查)
  8. FlowPoolRecheck = 4
  9. //FLowGroupIDChannel 频道回查的流量控制分组id
  10. FLowGroupIDChannel = 23
  11. //FlowGroupIDHot 热门回查的流量控制分组id
  12. FlowGroupIDHot = 24
  13. //FlowOpen 开启
  14. FlowOpen = int8(0)
  15. //FlowDelete 取消
  16. FlowDelete = int8(1)
  17. //FlowLogAdd 流量添加日志
  18. FlowLogAdd = int8(1)
  19. //FlowLogUpdate 流量更新日志
  20. FlowLogUpdate = int8(2)
  21. //FlowLogDel 流量删除日志
  22. FlowLogDel = int8(3)
  23. //PoolArc 稿件流量
  24. PoolArc = int8(0)
  25. //PoolUp up主流量
  26. PoolUp = int8(1)
  27. //PoolPrivateOrder 私单流量
  28. PoolPrivateOrder = int8(2)
  29. //PoolArticle 专栏流量
  30. PoolArticle = int8(3)
  31. //PoolArcForbid 稿件禁止流量
  32. PoolArcForbid = int8(4)
  33. )
  34. // Flow info
  35. type Flow struct {
  36. ID int64 `json:"id"`
  37. Remark string `json:"remark"`
  38. Rank int64 `json:"rank"`
  39. Type int8 `json:"type"`
  40. Value json.RawMessage `json:"value"`
  41. CTime time.Time `json:"ctime"`
  42. Pool int8 `json:"pool"`
  43. State int8 `json:"state"`
  44. }
  45. //FlowData Flow data
  46. type FlowData struct {
  47. ID int64 `json:"id"`
  48. Pool int8 `json:"pool"`
  49. OID int64 `json:"oid"`
  50. UID int64 `json:"uid"`
  51. Parent int8 `json:"parent"`
  52. GroupID int64 `json:"group_id"`
  53. Remark string `json:"remark"`
  54. State int8 `json:"state"`
  55. CTime time.Time `json:"ctime"`
  56. MTime time.Time `json:"mtime"`
  57. GroupValue []byte `json:"group_value"`
  58. }