package model import ( "github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/os/gtime" ) // Reward 奖励表 type Reward struct { g.Meta `orm:"table:rewards"` Id int64 `json:"id" orm:"id" description:"奖励ID"` // 奖励ID StoreId int64 `json:"storeId" orm:"store_id" description:"门店ID,系统奖励为NULL"` // 门店ID,系统奖励为NULL Name string `json:"name" orm:"name" description:"奖励名称"` // 奖励名称 RewardTypeId int64 `json:"rewardTypeId" orm:"reward_type_id" description:"奖励类型ID,关联 reward_types 表"` // 奖励类型ID,关联 reward_types 表 RewardTypeName string `json:"rewardTypeName" orm:"reward_type_name" description:"奖励类型名称"` // 奖励类型名称 Source int `json:"source" orm:"source" description:"奖励来源,1=系统奖励(对接腾讯),2=门店追加"` // 奖励来源,1=系统奖励(对接腾讯),2=门店追加 GameId int64 `json:"gameId" orm:"game_id" description:"游戏ID"` // 游戏ID ImageUrl string `json:"imageUrl" orm:"image_url" description:"奖励图片链接"` // 奖励图片链接 QqGoodsId string `json:"qqGoodsId" orm:"qq_goods_id" description:"QQ网吧物品ID"` // QQ网吧物品ID QqGoodsIdStr string `json:"qqGoodsIdStr" orm:"qq_goods_id_str" description:"QQ网吧物品ID字符串"` // QQ网吧物品ID字符串 Status int `json:"status" orm:"status" description:"状态:1=启用,2=禁用"` // 状态:1=启用,2=禁用 ExpireType int `json:"expireType" orm:"expire_type" description:"过期方式:1=时间段过期,2=领取后过期"` // 过期方式:1=时间段过期,2=领取后过期 ValidFrom *gtime.Time `json:"validFrom" orm:"valid_from" description:"有效期开始时间(expire_type=1时)"` // 有效期开始时间(expire_type=1时) ValidTo *gtime.Time `json:"validTo" orm:"valid_to" description:"有效期结束时间(expire_type=1时)"` // 有效期结束时间(expire_type=1时) ExpireDays int `json:"expireDays" orm:"expire_days" description:"领取后多少天过期(expire_type=2时)"` // 领取后多少天过期(expire_type=2时) DailyTotalLimit uint64 `json:"dailyTotalLimit" orm:"daily_total_limit" description:"每日发放总限(NULL表示不限制)"` // 每日发放总限(NULL表示不限制) TotalLimit uint64 `json:"totalLimit" orm:"total_limit" description:"奖励总限(NULL表示不限制)"` // 奖励总限(NULL表示不限制) UserDailyLimit uint64 `json:"userDailyLimit" orm:"user_daily_limit" description:"用户每日领取限制(NULL表示不限制)"` // 用户每日领取限制(NULL表示不限制) UserTotalLimit uint64 `json:"userTotalLimit" orm:"user_total_limit" description:"用户领取总次数限制(NULL表示不限制)"` // 用户领取总次数限制(NULL表示不限制) ReceivedNum uint64 `json:"receivedNum" orm:"received_num" description:"已领取数量"` // 已领取数量 GrantQuantity uint64 `json:"grantQuantity" orm:"grant_quantity" description:"每次发放个数"` // 每次发放个数 CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间 UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间 DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"删除时间(软删除)"` // 删除时间(软删除) } type NetfeeRewards struct { g.Meta `orm:"table:rewards"` Id int64 `json:"id" orm:"id" description:"奖励ID"` // 奖励ID RewardTypeId int64 `json:"rewardTypeId" orm:"reward_type_id" description:"奖励类型ID,关联 reward_types 表"` // 奖励类型ID,关联 reward_types 表 NetfeeUserTaskRewards []NetfeeUserTaskRewards `json:"netfeeUserTaskRewards,omitempty" orm:"with:reward_id=id"` } type NetfeeUserTaskRewards struct { g.Meta `orm:"table:user_task_rewards"` Id int64 `json:"id" orm:"id" description:"用户任务奖励记录唯一标识符"` // 用户任务奖励记录唯一标识符 UserTaskId int64 `json:"userTaskId" orm:"user_task_id" description:"关联用户任务记录ID"` // 关联用户任务记录ID RewardId int64 `json:"rewardId" orm:"reward_id" description:"奖励ID"` // 奖励ID RewardName string `json:"rewardName" orm:"reward_name" description:"奖励名称冗余字段"` // 奖励名称冗余字段 Status int `json:"status" orm:"status" description:"状态:1=待用户完成任务,2=待领取,3=已领取, 待兑换,4=已过期,5=发放失败, 6=结束"` // 状态:1=待用户完成任务,2=待领取,3=已领取, 待兑换,4=已过期,5=发放失败, 6=结束 CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间 UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间 IssueQuantity int `json:"issueQuantity" orm:"issue_quantity" description:""` // RewardTypeId int64 `json:"rewardTypeId" orm:"reward_type_id" description:"奖励类型 id"` UsetTaskRecord UserTaskRecord `json:"userTaskRecord,omitempty" orm:"with:id=user_task_id"` } type InternetChargeReward struct { g.Meta `orm:"table:rewards"` Id int64 `json:"id" orm:"id" description:"奖励ID"` // 奖励ID Name string `json:"name" orm:"name" description:"奖励名称"` // 奖励名称 GrantQuantity uint64 `json:"grantQuantity" orm:"grant_quantity" description:"每次发放个数"` // 每次发放个数 } type SimpleReward struct { g.Meta `orm:"table:rewards"` Id int64 `json:"id" orm:"id" description:"奖励ID"` // 奖励ID Name string `json:"name" orm:"name" description:"奖励名称"` // 奖励名称 RewardTypeId int64 `json:"rewardTypeId" orm:"reward_type_id" description:"奖励类型ID,关联 reward_types 表"` // 奖励类型ID,关联 reward_types 表 Source int `json:"source" orm:"source" description:"奖励来源,1=系统奖励(对接腾讯),2=门店追加"` // 奖励来源,1=系统奖励(对接腾讯),2=门店追加 GameId int64 `json:"gameId" orm:"game_id" description:"游戏ID"` // 游戏ID ImageUrl string `json:"imageUrl" orm:"image_url" description:"奖励图片链接"` // 奖励图片链接 ExpireType int `json:"expireType" orm:"expire_type" description:"过期方式:1=时间段过期,2=领取后过期"` // 过期方式:1=时间段过期,2=领取后过期 ValidFrom *gtime.Time `json:"validFrom" orm:"valid_from" description:"有效期开始时间(expire_type=1时)"` // 有效期开始时间(expire_type=1时) ValidTo *gtime.Time `json:"validTo" orm:"valid_to" description:"有效期结束时间(expire_type=1时)"` // 有效期结束时间(expire_type=1时) ExpireDays int `json:"expireDays" orm:"expire_days" description:"领取后多少天过期(expire_type=2时)"` // 领取后多少天过期(expire_type=2时) DailyTotalLimit uint64 `json:"dailyTotalLimit" orm:"daily_total_limit" description:"每日发放总限(NULL表示不限制)"` // 每日发放总限(NULL表示不限制) TotalLimit uint64 `json:"totalLimit" orm:"total_limit" description:"奖励总限(NULL表示不限制)"` // 奖励总限(NULL表示不限制) UserDailyLimit uint64 `json:"userDailyLimit" orm:"user_daily_limit" description:"用户每日领取限制(NULL表示不限制)"` // 用户每日领取限制(NULL表示不限制) UserTotalLimit uint64 `json:"userTotalLimit" orm:"user_total_limit" description:"用户领取总次数限制(NULL表示不限制)"` // 用户领取总次数限制(NULL表示不限制) ReceivedNum uint64 `json:"receivedNum" orm:"received_num" description:"已领取数量"` // 已领取数量 GrantQuantity uint64 `json:"grantQuantity" orm:"grant_quantity" description:"每次发放个数"` // 每次发放个数 } type RewardCallback struct { Id int64 `json:"id" orm:"id" description:""` // Uid string `json:"uid" orm:"uid" description:"用户账号"` // 用户账号 OrderId string `json:"orderId" orm:"order_id" description:"订单号必须保证全局唯一(保证接口幂等)"` // 订单号必须保证全局唯一(保证接口幂等) PrizeChannelId string `json:"prizeChannelId" orm:"prize_channel_id" description:"券渠道 ID"` // 券渠道 ID PrizeId string `json:"prizeId" orm:"prize_id" description:"券 ID"` // 券 ID PrizeType int `json:"prizeType" orm:"prize_type" description:"奖励类型,1 网鱼积分,2 网鱼经验值,3 网鱼兑换码"` // 奖励类型,1 网鱼积分,2 网鱼经验值,3 网鱼兑换码 PrizeSubType int `json:"prizeSubType" orm:"prize_sub_type" description:"奖励子类型,默认为 0,有多种子类型时可用,如 1,5 元网费充值券,2、满 30-5 满减券等"` // 奖励子类型,默认为 0,有多种子类型时可用,如 1,5 元网费充值券,2、满 30-5 满减券等 Num int `json:"num" orm:"num" description:"奖励个数,默认 1,比如经验值 10"` // 奖励个数,默认 1,比如经验值 10 CustomInfo string `json:"customInfo" orm:"custom_info" description:"透传字段 (json串)"` // 透传字段 (json串) AppId string `json:"appId" orm:"app_id" description:"业务 id(标识业务方,由游戏人生提供)"` // 业务 id(标识业务方,由游戏人生提供) InnerOrderId string `json:"innerOrderId" orm:"inner_order_id" description:"系统内部订单ID"` // 系统内部订单ID } // RewardCreateIn 创建奖励入参 type RewardCreateIn struct { OperatorId int64 OperatorRole string StoreId int64 Name string RewardTypeId int64 GameId int64 Img string QQGoodsId string QQGoodsIdStr string Status int ExpireType int ExpireDays int ValidFrom *gtime.Time ValidTo *gtime.Time DailyTotalLimit int64 TotalLimit int64 UserDailyLimit int64 UserTotalLimit int64 GrantQuantity int64 Source int } // RewardCreateOut 创建奖励出参 type RewardCreateOut struct { Success bool `json:"success" dc:"是否成功"` } // RewardUpdateIn 更新奖励入参 type RewardUpdateIn struct { Id int64 OperatorId int64 OperatorRole string Name string RewardTypeId int64 GameId int64 Img string QQGoodsId string QQGoodsIdStr string Status int ExpireType int ExpireDays int ValidFrom *gtime.Time ValidTo *gtime.Time DailyTotalLimit int64 TotalLimit int64 UserDailyLimit int64 UserTotalLimit int64 GrantQuantity int64 Source int } // RewardUpdateOut 更新奖励出参 type RewardUpdateOut struct { Success bool } // RewardDeleteIn 删除奖励入参 type RewardDeleteIn struct { Id int64 OperatorId int64 OperatorRole string Source int } // RewardDeleteOut 删除奖励出参 type RewardDeleteOut struct { Success bool } // RewardListIn 奖励列表查询入参 type RewardListIn struct { OperatorId int64 OperatorRole string Page int Size int Name string StoreId int64 RewardTypeId int64 Status int } // RewardListOut 奖励列表查询出参 type RewardListOut struct { List []Reward Total int } type InternetChargeRewardListOut struct { List []InternetChargeReward Total int } // RewardCallbackIn 任务奖励领取回调入参 type RewardCallbackIn struct { Uid string `json:"uid" ` // 用户账号 OrderId string `json:"orderId"` // 订单号必须保证全局唯一(保证接口幂等) PrizeChannelId string `json:"prizeChannelId"` // 券渠道 ID PrizeId string `json:"prizeId"` // 券 ID PrizeType int `json:"prizeType"` // 奖励类型,1 网鱼积分,2 网鱼经验值,3 网鱼兑换码 PrizeSubType int `json:"prizeSubType"` // 奖励子类型,默认为 0,有多种子类型时可用,如 1,5 元网费充值券,2、满 30-5 满减券等 Num int `json:"num"` // 奖励个数,默认 1,比如经验值 10 CustomInfo string `json:"customInfo"` // 透传字段 (json串) AppId string `json:"appId"` // 业务 id } type RewardCallbackOut struct { Errcode int32 `json:"errcode"` Errmsg string `json:"errmsg"` AppId string `json:"appid"` OrderId string `json:"order_id"` Datas []CallbackData `json:"data"` } type CallbackData struct { PrizeCode string `json:"prize_code"` Comment string `json:"comment"` } type GetRewardIn struct { Id int AreaId int GameId int GameCode string RewradTypeId int RewardId int RoleIdx string TaskId string PopenId string Source int BindType int UserTaskId int UserId int GrantQuantity int StoreId int } type GetRewardOut struct { //List []GetRewardNewOut `json:"list"` Result int64 `json:"result"` Url string `json:"url"` } type GetRewardNewOut struct { Result int64 `json:"result"` Water interface{} `json:"water"` } type Water struct { } type GetGoodsListIn struct { Appfilter string `json:"appfilter"` BigTime int64 `json:"bigTime"` Pageidx string `json:"pageidx"` Num int64 `json:"num"` OrderType string `json:"orderType"` OrderbyDesc int64 `json:"orderbDesc"` Goodsstatus int64 `json:"goodsstatus"` BindType int `json:"bindType"` UserId int64 `json:"userId"` } type GetGoodsListOut struct { List interface{} `json:"list"` Pageidx string `json:"pageidx"` Total int64 `json:"total"` } type GetGoodsGetIn struct { Water Water `json:"water" dc:"物品流水,从背包列表获取的water透传回来(water类型参考GetGift接口的water结构)"` AreaId int64 `json:"areaId" dc:"大区Id"` GameId int64 `json:"gid" dc:"游戏Id"` RoleIdx string `json:"roleIdx" dc:"角色索引"` PopenId string `json:"popenId" dc:"用户openId"` } type GoodsGetOut struct { Water Water `json:"water" dc:"用户领取物品流水记录"` } type GetGoodsDetailsIn struct { WinningTime int64 `json:"winningtime" dc:"用户领取礼包时间"` OrderId string `json:"orderid" dc:"用户领取流水订单id"` IsActInfo int64 `json:"isActinfo" dc:"是否需要活动相关信息 0:默认需要 1:不需要"` IsDocument int64 `json:"isDocument" dc:"是否需要文档信息 0:默认需要 1:不需要"` IsDetail int64 `json:"isDetail" dc:"是否需要物品详情 0:默认需要 1:不需要"` PopenId string `json:"popenId" dc:"用户popenId"` Gid int `json:"gid" dc:"游戏Id"` } type GetGoodsDetailsOut struct { Goods Water `json:"goods" dc:"物品详情"` } type OperateTaskRewardIn struct { OperatorId int64 OperatorRole string TaskId string RewardId int64 Type int // 1: 任务添加奖励 2: 任务删除奖励 StoreId int64 // 当前操作门店, 当操作为门店或者是商户时 } type OperateTaskRewardOut struct { Success bool } type NetfeeListIn struct { Page int Size int StoreId int64 StartTime *gtime.Time EndTime *gtime.Time } type NetfeeListOut struct { List interface{} Total int }