1234567891011121314151617181920212223242526272829303132333435 |
- package entity
- // UserRetentionResp 用于存储用户的留存数据
- type UserRetentionResp struct {
- ID string `bson:"_id"` // 用户唯一标识符
- RegistrationDate int64 `bson:"registration_date"` // 注册日期
- RetentionData Retention `bson:"retention_data"`
- }
- type UserRetentionReq struct {
- StartTime int64 `json:"start_time"` // 开始时间
- EndTime int64 `json:"end_time"` // 结束时间
- Page int `json:"page"` // 页码
- Size int `json:"size"` // 每页数量
- Total int64 `json:"total"`
- }
- // UserRetentionData 用于存储用户的留存数据
- type UserRetentionData struct {
- }
- // DayRetention 用于存储单一天数的留存数据
- type DayRetention struct {
- LoggedIn interface{} `bson:"logged_in"` // 是否在指定天数内登录
- LoginDate int64 `bson:"login_date"` // 登录日期
- }
- // Retention 用于存储不同天数的留存数据
- type Retention struct {
- Day1 DayRetention `bson:"day_1"`
- Day3 DayRetention `bson:"day_3"`
- Day7 DayRetention `bson:"day_7"`
- Day14 DayRetention `bson:"day_14"`
- Day30 DayRetention `bson:"day_30"`
- }
|