Initial commit
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
package proto
|
||||
|
||||
import (
|
||||
"stat/common"
|
||||
"stat/models/advertiseMod"
|
||||
"time"
|
||||
)
|
||||
|
||||
// 广告位置列表请求
|
||||
type ListAdsReq struct {
|
||||
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // appId,过滤条件
|
||||
IsActive *bool `form:"isActive" json:"isActive" binding:"omitempty"` // appId,过滤条件
|
||||
LocId *int32 `json:"locId"` // 位置id
|
||||
common.Page
|
||||
Link *string `form:"link" json:"link"` // 链接地址
|
||||
Title *string `form:"title" json:"title"` // 广告标题
|
||||
DaoLiangTitle *string `json:"daoLiangTitle"` // 广告导量标题
|
||||
}
|
||||
|
||||
type ListAdsRes struct {
|
||||
Total int64 `json:"total"`
|
||||
List []AdsInfo `json:"list"`
|
||||
}
|
||||
|
||||
type LinkInfo struct {
|
||||
Link string `json:"link"` // 链接地址
|
||||
Foreign bool `json:"foreign"` // true 国外用户
|
||||
Weight int `json:"weight"` // 权重
|
||||
}
|
||||
|
||||
type AdsInfo struct {
|
||||
Id int64 `json:"id"` // 广告id
|
||||
AppId int32 `json:"appId"` // 应用id
|
||||
AppName string `json:"appName"` // 应用名称
|
||||
Title string `json:"title"` // 广告标题
|
||||
DaoLiangTitle string `json:"daoLiangTitle"` // 广告导量标题
|
||||
Tags []string `json:"tags"` // 广告标签
|
||||
CoverImg string `json:"coverImg"` // 封面
|
||||
VisibleChannels []string `json:"visibleChannels"` // 可见的渠道
|
||||
LocId int32 `json:"locId"` // 位置id
|
||||
ImgSizeDesc string `json:"imgSizeDesc"` // 图片尺寸
|
||||
LocName string `json:"locName"` // 位置名称
|
||||
Links []LinkInfo `json:"links"` // 链接地址
|
||||
Sort int64 `json:"sort"` // 排序值--优先级
|
||||
IsActive bool `json:"isActive"` // 是否激活
|
||||
StartTime time.Time `json:"startTime"` // 开始时间
|
||||
EndTime time.Time `json:"endTime"` // 结束时间
|
||||
Remark string `json:"remark"` // 备注
|
||||
ClickCount int64 `json:"clickCount"` // 点击次数
|
||||
AmbientColor string `json:"ambientColor"` // 氛围色
|
||||
CreatedAt time.Time `json:"createAt"` // 创建时间
|
||||
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
|
||||
}
|
||||
|
||||
// 添加广告请求
|
||||
type AddAdsReq struct {
|
||||
AppId int32 `form:"appId" json:"appId"` // 应用id
|
||||
Title string `form:"title" json:"title" ` // 广告标题
|
||||
Tags string `form:"tags" json:"tags" ` // 广告标签
|
||||
CoverImg string `form:"coverImg" json:"coverImg"` // 封面
|
||||
LocId int32 `form:"locId" json:"locId"` // 位置id
|
||||
Sort int64 `form:"sort" json:"sort"` // 排序值--优先级
|
||||
IsActive bool `form:"isActive" json:"isActive"` // 是否激活
|
||||
Links []LinkInfo `form:"links" json:"links"` // 链接地址
|
||||
StartTime time.Time `form:"startTime" json:"startTime" ` // 开始时间
|
||||
EndTime time.Time `form:"endTime" json:"endTime"` // 结束时间
|
||||
Remark string `form:"remark" json:"remark"` // 备注
|
||||
AmbientColor string `form:"ambientColor" json:"ambientColor"` // 氛围色
|
||||
}
|
||||
|
||||
// 更新广告请求
|
||||
type UpdateAdsReq struct {
|
||||
Id *int64 `form:"id" json:"id" binding:"omitempty"` // 广告id
|
||||
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // 应用id
|
||||
Title *string `form:"title" json:"title" binding:"omitempty"` // 广告标题
|
||||
DaoLiangTitle *string `form:"daoLiangTitle" json:"daoLiangTitle" binding:"omitempty"` // 广告导量标题
|
||||
Tags *string `form:"tags" json:"tags" binding:"omitempty"` // 广告标签
|
||||
CoverImg *string `form:"coverImg" json:"coverImg" binding:"omitempty"` // 封面
|
||||
VisibleChannels *string `form:"visibleChannels" json:"visibleChannels" binding:"omitempty"` // 可见的渠道,可输入多个渠道,用英文逗号","分隔开
|
||||
Location *int64 `form:"locId" json:"locId" binding:"omitempty"` // 位置
|
||||
JumpType *advertiseMod.JumpType `form:"jumpType" json:"jumpType" binding:"omitempty"` // 跳转方式 0:外部浏览器跳转 1:内部浏览器跳转 2:app内部跳转
|
||||
Links *[]LinkInfo `form:"links" json:"links" binding:"omitempty"` // 链接地址
|
||||
Sort *int64 `form:"sort" json:"sort" binding:"omitempty"` // 排序值--优先级
|
||||
IsActive *bool `form:"isActive" json:"isActive" binding:"omitempty"` // 是否激活
|
||||
StartTime *time.Time `form:"startTime" json:"startTime" binding:"omitempty"` // 开始时间s
|
||||
EndTime *time.Time `form:"endTime" json:"endTime" binding:"omitempty"` // 结束时间
|
||||
Remark *string `form:"remark" json:"remark" binding:"omitempty"`
|
||||
AmbientColor *string `form:"ambientColor" json:"ambientColor" binding:"omitempty"` //氛围色
|
||||
}
|
||||
|
||||
// 删除广告请求
|
||||
type DelAdsReq struct {
|
||||
Id *int64 `form:"id" json:"id" binding:"required"` // 应用id
|
||||
}
|
||||
|
||||
// 外部获取广告
|
||||
type AdvertiseReq struct {
|
||||
AppId int32 `form:"appId" json:"appId" binding:"required"` // 应用id
|
||||
LocId *int32 `form:"locId" json:"locId" binding:"omitempty"` // 位置id
|
||||
UserId *uint64 `form:"userId" json:"userId" binding:"omitempty"` // 用户ID
|
||||
IP *string `form:"ip" json:"ip" binding:"omitempty"` // 用户IP
|
||||
}
|
||||
|
||||
type AdvertiseRes struct {
|
||||
AdvertiseList []*AdvertiseInfo `json:"advertiseList"` // 广告列表
|
||||
}
|
||||
|
||||
// 外部广告信息
|
||||
type AdvertiseInfo struct {
|
||||
Id int64 `json:"id"` // 广告id
|
||||
Title string `json:"title"` // 广告标题
|
||||
CoverImg string `json:"coverImg"` // 封面
|
||||
LocId int32 `json:"locId"` // 位置id
|
||||
JumpType advertiseMod.JumpType `json:"jumpType"` // 跳转方式 0:外部浏览器跳转 1:内部浏览器跳转 2:app内部跳转
|
||||
Link string `json:"link"` // 链接地址
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
Tags string `json:"tags"` // 标签
|
||||
Remark string `json:"remark"` // 备注描述
|
||||
AmbientColor string `json:"ambientColor"` // 氛围色(逼哩漫画)
|
||||
Type int // 0:系统 1:渠道
|
||||
}
|
||||
|
||||
// 广告点击请求
|
||||
type AdsClickReq struct {
|
||||
Id *int64 `from:"id" json:"id" binding:"required"` // 广告id
|
||||
AppId *int32 `from:"appId" json:"appId" binding:"required"` // 应用id
|
||||
}
|
||||
Reference in New Issue
Block a user