forked from all_user/stat_center
Initial commit
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
package proto
|
||||
|
||||
import (
|
||||
"stat/common"
|
||||
"stat/models/applicationmod"
|
||||
"time"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
// DelAppReq
|
||||
type DelAppReq struct {
|
||||
Id primitive.ObjectID `json:"id"`
|
||||
}
|
||||
|
||||
type GetApplicationsReq struct {
|
||||
Id *string `json:"id" bson:"_id"`
|
||||
ParentAppId *int64 `json:"parentAppId" bson:"parentAppId"` //所属appId
|
||||
Name *string `json:"name" bson:"name"` //应用名
|
||||
DaoLiangTitle *string `bson:"daoLiangTitle"` // 广告导量标题
|
||||
//Tag *common.AppReqType `json:"tag" bson:"tag"` //标签
|
||||
Status *bool `json:"status" bson:"status"` //状态
|
||||
Category *int64 `json:"category" bson:"category"` //分类ID
|
||||
PageNum int64 `json:"pageNum"` // 分页参数
|
||||
PageSize int64 `json:"pageSize" binding:"required"` // 分页参数
|
||||
LocIds []int32 `json:"locIds"` // 位置id
|
||||
|
||||
DownloadUrl *string `json:"download_url"` //下载地址
|
||||
IosUrl *string `json:"iosUrl"` //ios链接
|
||||
AndroidUrl *string `json:"androidUrl"` //安卓链接
|
||||
IsHighQuality *bool `json:"isHighQuality"` // 是否是优质APP推荐
|
||||
}
|
||||
|
||||
type GetApplicationsResp struct {
|
||||
List applicationmod.ApplicationList `json:"list"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
type AppCategoryInfo struct {
|
||||
Id int64 `json:"id"` // 分类ID
|
||||
Name string `json:"name" bson:"name"` // 名称
|
||||
Applications CenterApplicationList `json:"applications" bson:"applications"` // 分类app列表
|
||||
}
|
||||
|
||||
type ApplicationClickReq struct {
|
||||
Id string `from:"id" json:"id" binding:"required"` // applicationid
|
||||
}
|
||||
|
||||
// 应用中心
|
||||
type CenterApplication struct {
|
||||
Id primitive.ObjectID `json:"id" bson:"_id"`
|
||||
AppId int64 `json:"appId" bson:"appId"` //appId
|
||||
ParentAppId int64 `json:"parentAppId" bson:"parentAppId"` //所属appId
|
||||
Name string `json:"name" bson:"name"` //应用名
|
||||
Tag int32 `json:"tag" bson:"tag"` //标签
|
||||
Internal bool `json:"internal" bson:"internal"` //是否内部应用
|
||||
Categories []*common.CategoryRank `json:"categories" bson:"categories"` //分类排序
|
||||
Desc string `json:"desc" bson:"desc"` //描述
|
||||
DownloadUrl string `json:"download_url" bson:"download_url"` //下载地址
|
||||
IosUrl string `json:"iosUrl" bson:"iosUrl"` //ios链接
|
||||
AndroidUrl string `json:"androidUrl" bson:"androidUrl"` //安卓链接
|
||||
Avatar string `json:"avatar" bson:"avatar"` //头像图片
|
||||
Status bool `json:"status" bson:"status"` //状态
|
||||
Rank int64 `json:"rank" bson:"rank"` //默认排序
|
||||
Total int64 `json:"total" bson:"total"` //总点击
|
||||
CreatedId int64 `json:"created_id" bson:"created_id"` //创建人
|
||||
UpdatedId int64 `json:"updated_id" bson:"updated_id"` //最后更新人
|
||||
CreatedAt time.Time `json:"createdAt" bson:"createdAt"` //创建时间
|
||||
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` //更新时间
|
||||
NineShow bool `json:"nineShow" bson:"nineShow"` //是否九宫格
|
||||
RecreationShow bool `json:"recreationShow" bson:"recreationShow"` //是否娱乐中心显示
|
||||
IsRecommend bool `json:"isRecommend" bson:"isRecommend"` //是否推荐
|
||||
IsGame bool `json:"isGame" bson:"isGame"` //是否游戏
|
||||
HomeShow bool `json:"homeShow" bson:"homeShow"` //是否首页展示
|
||||
LocIds []int64 `json:"locIds" bson:"locIds"` //位置id
|
||||
SmallImg string `json:"smallImg" bson:"smallImg"` // 小图标
|
||||
BigImg string `json:"bigImg" bson:"bigImg"` // 大图标
|
||||
IsHighQuality bool `json:"isHighQuality" bson:"isHighQuality"` // 是否是优质APP推荐
|
||||
HighQualityType int64 `json:"highQualityType" bson:"highQualityType"` // 优质APP推荐展示方式 0:应用图标 1:展示描述文字
|
||||
}
|
||||
|
||||
type CenterApplicationList []*CenterApplication
|
||||
|
||||
// 外部获取app
|
||||
type CenterApplicationReq struct {
|
||||
ParentAppId int64 `json:"parentAppId" binding:"required"` // 所属应用appId
|
||||
LocId *int32 `json:"locId"` // 位置id
|
||||
UserId *uint64 `json:"userId"` // 用户ID
|
||||
}
|
||||
|
||||
type CenterAppCategory struct {
|
||||
Id int64 `json:"id" bson:"_id,omitempty"`
|
||||
ParentAppId int64 `json:"parentAppId" bson:"parentAppId"`
|
||||
Name string `json:"name" bson:"name"` // 名称
|
||||
Desc string `json:"desc" bson:"desc"` // 描述
|
||||
Status bool `json:"status" bson:"status"` // 状态
|
||||
Rank int64 `json:"rank" bson:"rank"` // 应用排序
|
||||
CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间
|
||||
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间
|
||||
ImgType int64 `json:"imgType" bson:"imgType"` // 图片展示类型 0:应用图标 1.小图标 2.大图标
|
||||
}
|
||||
|
||||
type CenterAppCategoryList []*CenterAppCategory
|
||||
|
||||
type CenterApplicationRes struct {
|
||||
List CenterApplicationList `json:"list"` // 应用列表
|
||||
AppCategoryList CenterAppCategoryList `json:"appCategoryList"` // 列表
|
||||
}
|
||||
Reference in New Issue
Block a user