feat: 从黄果 NET hgdjnet-server 9bfbafe 导入 HKDJ 官网后端
来源:hgdjnet-server 9bfbafe10d417deea959bd53117bc88a10e60a83 项目身份 HKDJ / JHA-216,独立官网仓库,Jenkins 守卫键 hkdjnet 测试目录 /server/hkdj_net,App/Web API 30331/30332 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
package topicmessage
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
/* 通信协议,第一版*/
|
||||
|
||||
// 用户用户注册消息
|
||||
type UserRegisterMsg struct {
|
||||
UserId int64 `json:"userId" bson:"userId"` // 用户ID
|
||||
AppId int32 `json:"appId" bson:"appId"` // appID
|
||||
SysType string `json:"sysType" bson:"sysType"` // 操作系统类型 安卓 IOS
|
||||
PlatformId string `json:"platformId" bson:"platformId"` // 原始平台流水Id
|
||||
DevType string `json:"devType" bson:"devType"` // 设备类型
|
||||
Name string `json:"name" bson:"name"` // 名称
|
||||
IsDirect bool `json:"isDirect" bson:"isDirect"` // true:是直推用户
|
||||
DeviceId string `json:"deviceId" bson:"deviceId"` // 设备Id
|
||||
IP string `json:"ip,omitempty" bson:"ip"` // IP
|
||||
DistrictCode string `json:"districtCode" bson:"districtCode"` // 渠道码
|
||||
InviteCode string `json:"inviteCode" bson:"inviteCode"` // 被邀请码
|
||||
RegisterAt time.Time `json:"registerAt,omitempty" bson:"registerAt"` // 注册时间
|
||||
UserAgent string `json:"userAgent" bson:"userAgent"` // User-Agent识别
|
||||
}
|
||||
|
||||
// 用户第一次访问
|
||||
type UserVisitMsg struct {
|
||||
UserId int64 `bson:"userId" json:"userId"` // 用户Id
|
||||
SumDate time.Time `bson:"sumDate" json:"sumDate"` // 记录时间
|
||||
AppId int32 `json:"appId" bson:"appId"` // appID
|
||||
SysType string `json:"sysType" bson:"sysType"` // 操作系统类型 安卓 IOS
|
||||
DevType string `json:"devType" bson:"devType"` // 设备类型
|
||||
IP string `json:"ip,omitempty" bson:"ip"` // IP
|
||||
Version string `json:"version,omitempty" bson:"version"` // APP版本号
|
||||
VisitAt time.Time `json:"visitAt,omitempty" bson:"visitAt"` // 访问时间
|
||||
DistrictCode string `json:"districtCode" bson:"districtCode"` // 渠道码
|
||||
}
|
||||
|
||||
type UserOrderMsg struct {
|
||||
UserId int64 `json:"userId" bson:"userId"` // 用户ID
|
||||
AppId int32 `json:"appId" bson:"appId"` // appID
|
||||
PlatformId string `json:"platformId" bson:"platformId"` // 原始平台流水Id
|
||||
SysType string `json:"sysType" bson:"sysType"` // 操作系统类型 安卓 IOS
|
||||
DevType string `json:"devType" bson:"devType"` // 设备类型
|
||||
ChannelName string `json:"channelName" bson:"channelName"` // 支付渠道名字
|
||||
CID string `json:"cid" bson:"cid"` // 渠道id
|
||||
Type string `bson:"type" json:"type"` // 充值方式
|
||||
RchgUse int64 `json:"rchgUse" bson:"rchgUse"` // 充值用途 1:金币 2:VIP
|
||||
Repeat bool `bson:"repeat" json:"repeat"` // 复冲: true 重复充值 false 第一次
|
||||
OrderId string `json:"orderId" bson:"orderId"` // 流水id
|
||||
Money int64 `json:"money" bson:"money"` // 充值金额 订单金额
|
||||
PayMoney int64 `json:"payMoney" bson:"payMoney"` // 实际到账金额 用户实际支付金额
|
||||
Status int `json:"status" bson:"status"` // 2付款失败 3付款成功(目前只有成功才发送)
|
||||
DistrictCode string `json:"districtCode" bson:"districtCode"` // 渠道码
|
||||
Rate string `json:"rate" bson:"rate"` // 渠道费率
|
||||
SuccessAt time.Time `json:"successAt" bson:"successAt"` // 成功时间
|
||||
CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间
|
||||
}
|
||||
|
||||
type UserChannelEvent struct {
|
||||
UserId int64 `bson:"userId" json:"userId"` // 用户Id
|
||||
AppId int32 `json:"appId" bson:"appId"` // appID
|
||||
DistrictCode string `json:"districtCode" bson:"districtCode"` // 渠道码
|
||||
WatchCount int64 `json:"watchCount,omitempty" bson:"watchCount"` // 观看次数
|
||||
WatchTime int64 `json:"watchTime,omitempty" bson:"watchTime"` // 观看时长
|
||||
AdClick int64 `json:"adClick,omitempty" bson:"adClick"` // 广告点击
|
||||
AppClick int64 `json:"appClick,omitempty" bson:"appClick"` // APP点击
|
||||
RequestCount int64 `json:"requestCount,omitempty" bson:"requestCount"` // 请求次数
|
||||
}
|
||||
|
||||
type MediaPlayEvent struct {
|
||||
MediaId int64 `json:"mediaId" bson:"mediaId"` // 视频Id
|
||||
Title string `json:"title" bson:"title"` // 标题
|
||||
FileId string `json:"fileId" bson:"fileId"` // 媒资库ID
|
||||
ActionType int64 `json:"actionType" bson:"actionType"` // 类型:0:播放 1:点赞 2:购买
|
||||
UserId int64 `json:"userId" bson:"userId"` // 用户Id
|
||||
AppId int32 `json:"appId" bson:"appId"` // appID
|
||||
WatchAt time.Time `json:"watchAt" bson:"watchAt"` // 时间
|
||||
}
|
||||
Reference in New Issue
Block a user