user_reg_count.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. package entity
  2. // UserRetentionResp 用于存储用户的留存数据
  3. type UserRetentionResp struct {
  4. ID string `bson:"_id"` // 用户唯一标识符
  5. RegistrationDate int64 `bson:"registration_date"` // 注册日期
  6. RetentionData Retention `bson:"retention_data"`
  7. }
  8. type UserRetentionReq struct {
  9. StartTime int64 `json:"start_time"` // 开始时间
  10. EndTime int64 `json:"end_time"` // 结束时间
  11. Page int `json:"page"` // 页码
  12. Size int `json:"size"` // 每页数量
  13. }
  14. // UserRetentionData 用于存储用户的留存数据
  15. type UserRetentionData struct {
  16. }
  17. // DayRetention 用于存储单一天数的留存数据
  18. type DayRetention struct {
  19. LoggedIn interface{} `bson:"logged_in"` // 是否在指定天数内登录
  20. LoginDate int64 `bson:"login_date"` // 登录日期
  21. }
  22. // Retention 用于存储不同天数的留存数据
  23. type Retention struct {
  24. Day1 DayRetention `bson:"day_1"`
  25. Day3 DayRetention `bson:"day_3"`
  26. Day7 DayRetention `bson:"day_7"`
  27. Day14 DayRetention `bson:"day_14"`
  28. Day30 DayRetention `bson:"day_30"`
  29. }