package proto import ( "stat/common" "stat/models/activitymod" "time" "go.mongodb.org/mongo-driver/bson/primitive" ) // 活动列表 请求数据 type ActivityListReq struct { common.Page Enable *bool `json:"enable" form:"enable"` // 开关 Name *string `json:"name" form:"name"` // 活动名称 } // 活动列表 返回数据 type ActivityListResp struct { Total int64 `json:"total" bson:"total"` // 数量 List []*ActivityInfo `json:"list" bson:"list"` // 活动信息列表 } type ActivityInfo struct { Id primitive.ObjectID `json:"id" bson:"_id"` // 唯一ID Name string `json:"name" bson:"name"` // 活动名称 Desc string `json:"desc" bson:"desc"` // 活动说明 SortCode int `json:"sortCode" bson:"sortCode"` // 排序号 H5Domain string `json:"h5Domain" bson:"h5Domain"` // 活动H5地址 GiftDesc string `json:"giftDesc" bson:"giftDesc"` // 奖励说明 Enable bool `json:"enable" bson:"enable"` // 活动开关 Background string `json:"background" bson:"background"` // 背景图 StartTime time.Time `json:"startTime" bson:"startTime"` // 活动开始时间 EndTime time.Time `json:"endTime" bson:"endTime"` // 活动结束时间 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` CreatedAt time.Time `json:"createdAt" bson:"createdAt"` Banner []activitymod.BannerInfo `json:"banner" bson:"banner"` // banner列表 LotteryCodeNum int64 `json:"lotteryCodeNum" bson:"lotteryCodeNum"` // 抽奖码总数量 UsedLotteryCodeNum int64 `json:"usedLotteryCodeNum" bson:"usedLotteryCodeNum"` // 抽奖码已使用数量 GiftCodeNum int64 `json:"giftCodeNum" bson:"giftCodeNum"` // 奖品兑换码总数量 GiftCodeGivedNum int64 `json:"giftCodeGivedNum" bson:"giftCodeGivedNum"` // 奖品兑换码已发放数量 GiftCodeUsedNum int64 `json:"giftCodeUsedNum" bson:"giftCodeUsedNum"` // 奖品兑换码已使用数量 } // 新增活动 请求数据 type AddActivityReq struct { Name string `json:"name" bson:"name"` // 活动名称 Desc string `json:"desc" bson:"desc"` // 活动描述 SortCode int32 `json:"sortCode" bson:"sortCode"` // 排序号 H5Domain string `json:"h5Domain" bson:"h5Domain"` // 活动H5地址 GiftDesc string `json:"giftDesc" bson:"giftDesc"` // 奖励说明 Enable bool `json:"enable" bson:"enable"` // 活动开关 Background string `json:"background" bson:"background"` // 背景图 StartTime time.Time `json:"startTime" bson:"startTime"` // 活动开始时间 EndTime time.Time `json:"endTime" bson:"endTime"` // 活动结束时间 Banner []activitymod.BannerInfo `json:"banner" bson:"banner"` // banner列表 } // 修改活动 请求数据 type UpdateActivityReq struct { Id primitive.ObjectID `json:"id" bson:"_id,omitempty" binding:"required"` // 唯一ID Name *string `json:"name" bson:"name,omitempty"` // 活动名称 Desc *string `json:"desc" bson:"desc,omitempty"` // 活动描述 SortCode *int `json:"sortCode" bson:"sortCode,omitempty"` // 排序号 H5Domain *string `json:"h5Domain" bson:"h5Domain,omitempty"` // 活动H5地址 GiftDesc *string `json:"giftDesc" bson:"giftDesc,omitempty"` // 奖励说明 Enable *bool `json:"enable" bson:"enable,omitempty"` // 活动开关 Background *string `json:"background" bson:"background,omitempty"` // 背景图 StartTime *time.Time `json:"startTime" bson:"startTime,omitempty"` // 活动开始时间 EndTime *time.Time `json:"endTime" bson:"endTime,omitempty"` // 活动结束时间 Banner *[]activitymod.BannerInfo `json:"banner" bson:"banner"` // banner列表 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt,omitempty"` } // 删除活动 请求数据 type DelActivityReq struct { Id primitive.ObjectID `json:"id" binding:"required"` // 唯一ID } // 生成抽奖码 请求数据 type GenLotteryCodeReq struct { CodeNum int32 `json:"codeNum" bson:"codeNum" binding:"required,gt=0"` // 生产的抽奖码个数 ActId primitive.ObjectID `json:"actId" bson:"actId" binding:"required"` // 所属活动的ID CodeLen int32 `json:"codeLen" bson:"codeLen" binding:"required,gt=0"` // 抽奖码长度 } // 修改抽奖码 请求数据 type UpdateLotteryCodeReq struct { LotteryCodeId primitive.ObjectID `json:"lotteryCodeId" bson:"lotteryCodeId" binding:"required"` // 抽奖码Id Mark string `json:"mark" bson:"mark"` // 备注 } // 删除活动抽奖码 请求数据 type DelLotteryCodeReq struct { LotteryCodeId primitive.ObjectID `json:"lotteryCodeId" binding:"required"` // 唯一ID } // 活动抽奖码列表 请求数据 type LotteryCodeListReq struct { common.Page LotteryCode *string `json:"lotteryCode" form:"lotteryCode"` // 抽奖码 ActId *string `json:"actId" form:"actId"` // 所属活动的ID ActName *string `json:"actName" form:"actName"` // 活动名称 UserIp *string `json:"userIp" form:"userIp"` // 抽奖者IP IsUsed *bool `json:"isUsed" form:"isUsed"` // 抽奖码是否已使用 GiftCode *string `json:"giftCode" form:"giftCode"` // 奖品兑换码 } // 活动抽奖码列表 返回数据 type LotteryCodeListResp struct { Total int64 `json:"total" bson:"total"` // 数量 List activitymod.LottertyCodeInfoList `json:"list" bson:"list"` // 活动抽奖码列表 } // 活动奖品列表 请求数据 type GiftListReq struct { common.Page ActId *string `json:"actId" form:"actId"` // 所属活动的ID GiftName *string `json:"giftName" form:"giftName"` // 奖品名称 GiftDesc *string `json:"giftDesc" form:"giftDesc"` // 奖品描述 Rate *int32 `json:"rate" form:"rate"` // 备注 } // 活动奖品列表 返回数据 type GiftListResp struct { Total int64 `json:"total" bson:"total"` // 数量 List []*GiftInfo `json:"list" bson:"list"` } type GiftInfo struct { Id primitive.ObjectID `json:"id" bson:"_id"` // 唯一ID ActId string `json:"actId" bson:"actId"` // 所属活动的ID ActName string `json:"actName" bson:"actName"` // 所属活动的名称 GiftName string `json:"giftName" bson:"giftName"` // 奖品名称 GiftDesc string `json:"giftDesc" bson:"giftDesc"` // 奖品描述 Rate int32 `json:"rate" bson:"rate"` // 备注 Sort int32 `json:"sort" bson:"sort"` // 排序 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` CreatedAt time.Time `json:"createdAt" bson:"createdAt"` GiftNum int64 `json:"giftNum" bson:"giftNum"` // 抽奖码总数量 ReceivedGiftNum int64 `json:"receivedGiftNum" bson:"receivedGiftNum"` // 抽奖码已使用数量 } // 添加活动奖品 请求数据 type AddGiftReq struct { ActId primitive.ObjectID `json:"actId" bson:"actId" binding:"required"` // 所属活动的ID GiftName string `json:"giftName" bson:"giftName"` // 奖品名称 GiftDesc string `json:"giftDesc" bson:"giftDesc"` // 奖品描述 Sort int32 `json:"sort" bson:"sort"` // 排序 Rate int32 `json:"rate" bson:"rate"` // 中奖率 } // 更新活动奖品 请求数据 type UpdateGiftReq struct { Id primitive.ObjectID `json:"id" bson:"_id" binding:"required"` // 奖品唯一ID ActId *string `json:"actId" bson:"actId,omitempty" binding:"required"` // 所属活动的ID ActName *string `json:"actName" bson:"actName,omitempty"` // 所属活动的名称 GiftName *string `json:"giftName" bson:"giftName,omitempty"` // 奖品名称 GiftDesc *string `json:"giftDesc" bson:"giftDesc,omitempty"` // 奖品描述 Rate *int32 `json:"rate" bson:"rate,omitempty"` // 中奖率 Sort *int32 `json:"sort" bson:"sort,omitempty"` // 排序 UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` } // 删除活动奖品 请求数据 type DelGiftReq struct { Id primitive.ObjectID `json:"id" binding:"required"` // 奖品唯一ID } // 生成奖品兑换码 请求数据 type GenGiftCodeRes struct { GiftId primitive.ObjectID `json:"giftId" bson:"giftId"` // 奖品唯一ID CodeNum int32 `json:"codeNum" bson:"codeNum"` // 生成奖品兑换码的数量 CodeLen int32 `json:"codeLen" bson:"codeLen"` // 生成奖品兑换码的长度 } // 奖品兑换详情列表 请求数据 type GetGiftInfoReq struct { common.Page LotteryCode *string `json:"lotteryCode" form:"lotteryCode"` // 抽奖码 ActId *string `json:"actId" form:"actId"` // 所属活动的ID ActName *string `json:"actName" form:"actName"` // 所属活动的名称 GiftId *string `json:"giftId" form:"giftId"` // 所属活动奖品的ID GiftName *string `json:"giftName" form:"giftName"` // 奖品名称 UserId *string `json:"userId" form:"userId"` // 兑换者Id AppName *string `json:"appName" form:"appName"` // 所属app的名字 IsGaveOut *bool `json:"isGaveOut" form:"isGaveOut"` // 兑换码是否已发放 IsUsed *bool `json:"isUsed" form:"isUsed"` // 奖品兑换码是否已使用 GiftCode *string `json:"giftCode" form:"giftCode"` // 奖品兑换码 } // 奖品兑换详情列表 返回数据 type GetGiftInfoResp struct { Total int64 `json:"total" bson:"total"` // 数量 List activitymod.LotteryGetGiftList `json:"list" bson:"list"` } // 删除兑换详情 请求数据 type DelGetGiftReq struct { Id primitive.ObjectID `json:"id" binding:"required"` // 兑换详情唯一ID } // 更新活动奖品兑换详情 请求数据 type UpdateGetGiftReq struct { Id primitive.ObjectID `json:"id" binding:"required"` // 奖品唯一ID UserId *string `json:"userId"` // 兑换者Id AppName *string `json:"appName"` // 所属app的名字 Remark *string `json:"remark"` // 备注 GiftCode string `json:"giftCode" binding:"required"` // 奖品兑换码 } // h5活动信息 请求数据 type ActivityInfoReq struct { ActId primitive.ObjectID `json:"actId" bson:"actId"` // 活动ID } type ActivityInfoResp struct { Id primitive.ObjectID `json:"id" bson:"_id"` // 唯一ID Name string `json:"name" bson:"name"` // 活动名称 Desc string `json:"desc" bson:"desc"` // 活动说明 H5Domain string `json:"h5Domain" bson:"h5Domain"` // 活动H5地址 GiftDesc string `json:"giftDesc" bson:"giftDesc"` // 奖励说明 Enable bool `json:"enable" bson:"enable"` // 活动开关 StartTime time.Time `json:"startTime" bson:"startTime"` // 活动开始时间 EndTime time.Time `json:"endTime" bson:"endTime"` // 活动结束时间 Banner []activitymod.BannerInfo `json:"banner" bson:"banner"` // banner列表 } // h5活动奖品信息 请求数据 type ActivityGiftInfoReq struct { ActId string `json:"actId" binding:"required"` // 活动ID } // h5活动奖品信息 返回数据 type ActivityGiftInfoResp struct { Count int64 `json:"count" bson:"count"` // 奖品总数 List []*H5GiftInfo `json:"list" bson:"list"` } type H5GiftInfo struct { Id string `json:"id" bson:"_id"` // 奖品ID GiftName string `json:"giftName" bson:"giftName"` // 奖品名称 } // h5抽奖 请求数据 type DrawReq struct { Ip string `json:"ip" binding:"required"` // 用户IP ActId primitive.ObjectID `json:"actId" binding:"required"` // 活动ID LotteryCode string `json:"lotteryCode" binding:"required"` // 抽奖码 } // h5抽奖 返回数据 type DrawResp struct { GiftCode string `json:"giftCode" bson:"giftCode"` // 奖品兑换码 GiftId string `json:"giftId" bson:"giftId"` // 奖品ID GiftName string `json:"giftName" bson:"giftName"` // 奖品名称 } type ActivityVisitCountReq struct { AppId int32 `from:"appId" json:"appId"` //AppID Ip string `from:"ip" json:"ip"` //ip Domain string `from:"domain" json:"domain"` //落地页域名 CH string `from:"ch" json:"ch"` //渠道号 ActivityId primitive.ObjectID `json:"activityId"` //活动ID ActivityName string `json:"activityName"` //活动名字 } type ActivityVisitCountListReq struct { common.Page ActivityId *string `json:"activityId" form:"activityId"` // 活动ID AppId *int32 `json:"appId" form:"appId"` // AppID CH *string `json:"ch" form:"ch"` // 渠道名字 } type ActivityVisitListResp struct { Total int64 `json:"total" bson:"total"` // 数量 List []*ActivityVisitInfo `json:"list" bson:"list"` // 活动信息列表 } type ActivityVisitInfo struct { AppId int32 `json:"appId"` // appId CH string `json:"ch"` // 商区序列 IP string `json:"ip"` // 用户IP DevType string `json:"devType"` // 设备类型 SysType string `json:"sysType"` // 系统类型 PeerIP string `json:"peerIP"` // 网站IP ActivityId string `json:"activityId"` // 活动Id ActivityName string `json:"activityName"` // 活动名字 CreatedAt time.Time `json:"createdAt"` // 创建时间 UpdatedAt time.Time `json:"updatedAt"` // 更新时间 }