This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
package response
|
||||
|
||||
// MiniStatisticsResponse 小程序基础统计响应
|
||||
type MiniStatisticsResponse struct {
|
||||
TotalUsers int `json:"totalUsers"` // 总用户数
|
||||
ActiveUsers int `json:"activeUsers"` // 活跃用户数
|
||||
TotalSessions int `json:"totalSessions"` // 总会话数
|
||||
TodaySessions int `json:"todaySessions"` // 今日会话数
|
||||
TotalPV int `json:"totalPV"` // 总页面访问量
|
||||
TotalUV int `json:"totalUV"` // 总独立访客数
|
||||
AvgStayTime int `json:"avgStayTime"` // 平均停留时间(秒)
|
||||
BounceRate float64 `json:"bounceRate"` // 跳出率
|
||||
}
|
||||
|
||||
// VisitTrendData 访问趋势数据
|
||||
type VisitTrendData struct {
|
||||
Date string `json:"date"` // 日期
|
||||
SessionCnt int `json:"sessionCnt"` // 会话数
|
||||
VisitPV int `json:"visitPV"` // 页面访问量
|
||||
VisitUV int `json:"visitUV"` // 独立访客数
|
||||
VisitUVNew int `json:"visitUVNew"` // 新访客数
|
||||
StayTimeUV int `json:"stayTimeUV"` // 人均停留时长
|
||||
StayTimeSession int `json:"stayTimeSession"` // 次均停留时长
|
||||
}
|
||||
|
||||
// SourceData 用户来源数据
|
||||
type SourceData struct {
|
||||
RefType string `json:"refType"` // 来源类型
|
||||
Name string `json:"name"` // 来源名称
|
||||
SessionCnt int `json:"sessionCnt"` // 会话数
|
||||
VisitPV int `json:"visitPV"` // 页面访问量
|
||||
VisitUV int `json:"visitUV"` // 独立访客数
|
||||
Percentage float64 `json:"percentage"` // 占比
|
||||
}
|
||||
|
||||
// PageData 页面访问数据
|
||||
type PageData struct {
|
||||
PagePath string `json:"pagePath"` // 页面路径
|
||||
PageName string `json:"pageName"` // 页面名称
|
||||
PagePV int `json:"pagePV"` // 页面访问量
|
||||
PageUV int `json:"pageUV"` // 页面独立访客数
|
||||
StayTimePV int `json:"stayTimePV"` // 平均停留时长
|
||||
EntryPagePV int `json:"entryPagePV"` // 入口页次数
|
||||
ExitPagePV int `json:"exitPagePV"` // 退出页次数
|
||||
SharePV int `json:"sharePV"` // 转发次数
|
||||
ShareUV int `json:"shareUV"` // 转发人数
|
||||
}
|
||||
|
||||
// RetentionData 用户留存数据
|
||||
type RetentionData struct {
|
||||
RefDate string `json:"refDate"` // 日期
|
||||
VisitUVNew int `json:"visitUVNew"` // 新增用户数
|
||||
VisitUV int `json:"visitUV"` // 活跃用户数
|
||||
Day1 float64 `json:"day1"` // 1日留存率
|
||||
Day7 float64 `json:"day7"` // 7日留存率
|
||||
Day30 float64 `json:"day30"` // 30日留存率
|
||||
}
|
||||
|
||||
// DeviceData 设备数据
|
||||
type DeviceData struct {
|
||||
DeviceType string `json:"deviceType"` // 设备类型
|
||||
SessionCnt int `json:"sessionCnt"` // 会话数
|
||||
VisitUV int `json:"visitUV"` // 独立访客数
|
||||
Percentage float64 `json:"percentage"` // 占比
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package response
|
||||
|
||||
// MiniLoginResponse 小程序登录响应
|
||||
type MiniLoginResponse struct {
|
||||
OpenID string `json:"openid"` // 用户openid
|
||||
UnionID *string `json:"unionid"` // 用户unionid
|
||||
UserID *uint `json:"userId,omitempty"` // 关联的系统用户ID
|
||||
}
|
||||
|
||||
// PageResult 分页结果
|
||||
type PageResult struct {
|
||||
List interface{} `json:"list"` // 数据列表
|
||||
Total int64 `json:"total"` // 总数
|
||||
Page int `json:"page"` // 当前页
|
||||
PageSize int `json:"pageSize"` // 每页数量
|
||||
}
|
||||
Reference in New Issue
Block a user