package srv_applicationstat import ( "stat/common" "time" "go.mongodb.org/mongo-driver/bson/primitive" ) type AppStatSummary struct { TotalClick int64 `json:"totalClick"` // 总点击 } type AppStatInfo struct { Id primitive.ObjectID `json:"id" bson:"_id,omitempty"` ApplicationDbId primitive.ObjectID `json:"applicationDbId" bson:"applicationDbId"` //应用ID ParentAppId int64 `json:"parentAppId" bson:"parentAppId"` //所属应用ID AppName string `json:"appName" bson:"appName"` //应用名称 SumDate time.Time `json:"sumDate" bson:"sumDate"` //记录时间 Total int64 `json:"total" bson:"total"` //当日点击 HourData []int64 `json:"hourData" bson:"hourData"` //小时数据 CreatedAt time.Time `json:"createdAt" bson:"createdAt"` //创建时间 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` //更新时间 } // GetApplicationStatReq 获取app点击统计请求 type GetApplicationStatReq struct { common.Page Start *time.Time `json:"start"` // 开始时间 End *time.Time `json:"end"` // 结束时间 ParentAppId *[]int64 `json:"parentAppId"` // 所属应用ID ApplicationId *primitive.ObjectID `json:"applicationId"` // 应用ID ApplicationName *string `json:"applicationName"` // 应用名称 } type GetApplicationStatResp struct { Total int64 `json:"total"` List []*AppStatInfo `json:"list"` Summary AppStatSummary `json:"summary"` } // GetApplicationStatReq 获取app点击统计请求 type GetApplicationStatTotalReq struct { common.Page Start *time.Time `json:"start"` // 开始时间 End *time.Time `json:"end"` // 结束时间 ParentAppId *[]int64 `json:"parentAppId"` // 所属应用ID ApplicationId *primitive.ObjectID `json:"applicationId"` // 应用ID ApplicationName *string `json:"applicationName"` // 应用名称 } type AppStatTotalInfo struct { Id primitive.ObjectID `json:"id" bson:"id"` //应用ID ParentAppId int64 `json:"parentAppId" bson:"parentAppId"` //所属应用ID AppName string `json:"appName" bson:"appName"` //应用名称 Total int64 `json:"total" bson:"total"` //总次数 } type StatTotalInfo struct { Id primitive.ObjectID `json:"id" bson:"_id,omitempty"` //应用ID Total int64 `json:"total"` //总次数 } type GetApplicationStatTotalResp struct { Total int64 `json:"total"` List []*AppStatTotalInfo `json:"list"` Summary AppStatSummary `json:"summary"` }