gamelife 自定义客户端集成游戏任务接口
This commit is contained in:
62
internal/model/gamelife.go
Normal file
62
internal/model/gamelife.go
Normal file
@ -0,0 +1,62 @@
|
||||
package model
|
||||
|
||||
type Goods struct {
|
||||
GoodsType int `json:"goodstype"`
|
||||
GoodsName string `json:"goodsname"`
|
||||
GoodsIcon string `json:"goodsicon"`
|
||||
Num int `json:"num"`
|
||||
}
|
||||
|
||||
type Prize struct {
|
||||
Pic string `json:"pic"`
|
||||
PrizeName string `json:"prize_name"`
|
||||
GoodsList []Goods `json:"goods_list"`
|
||||
}
|
||||
|
||||
type GameTaskConfig struct {
|
||||
GameType int `json:"game_type"`
|
||||
LimitQueue []string `json:"limit_queue"`
|
||||
LimitMode []string `json:"limit_mode"`
|
||||
Target int `json:"target"`
|
||||
TimeType int `json:"time_type"`
|
||||
LimitUserType []string `json:"limit_user_type"`
|
||||
}
|
||||
|
||||
type GameTaskConfigParse struct {
|
||||
Target string `json:"target"`
|
||||
}
|
||||
|
||||
type QQNetbarTask struct {
|
||||
RuleDesc string `json:"rule_desc"`
|
||||
TaskDesc string `json:"task_desc"`
|
||||
LimitPrize int `json:"limit_prize"`
|
||||
LimitNum int `json:"limit_num"`
|
||||
PrizeList []Prize `json:"prize_list"`
|
||||
TaskID string `json:"task_id"`
|
||||
Title string `json:"title"`
|
||||
CycleStart int64 `json:"cycle_start"`
|
||||
CycleEnd int64 `json:"cycle_end"`
|
||||
TargetName string `json:"target_name"`
|
||||
TargetTimes int `json:"target_times"`
|
||||
GameTaskConfig GameTaskConfig `json:"game_task_config"`
|
||||
GameTaskConfigParse GameTaskConfigParse `json:"game_task_config_parse"`
|
||||
}
|
||||
|
||||
type QQNetbarTaskNoLoginResponse struct {
|
||||
PageIdx string `json:"pageidx"`
|
||||
TaskList []QQNetbarTask `json:"task_list"`
|
||||
}
|
||||
|
||||
type TaskParam struct {
|
||||
NetbarAccount string `json:"netbar_account"`
|
||||
PageIds string `json:"pageidx"`
|
||||
Num int `json:"num"`
|
||||
Gid int `json:"gid"`
|
||||
BrandId string `json:"brand_id"`
|
||||
Source string `json:"source"`
|
||||
}
|
||||
|
||||
type QQNetbarActivityIn struct {
|
||||
ServiceName string // 服务名称
|
||||
TaskParam TaskParam
|
||||
}
|
||||
40
internal/model/storeTaskReward.go
Normal file
40
internal/model/storeTaskReward.go
Normal file
@ -0,0 +1,40 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// StoreTaskReward 门店任务奖励关联表
|
||||
type StoreTaskReward struct {
|
||||
g.Meta `orm:"table:store_task_rewards"`
|
||||
Id int64 `json:"id" dc:"任务奖励关联ID" orm:"id,primary"`
|
||||
TaskId int64 `json:"taskId" dc:"门店任务ID" orm:"task_id"`
|
||||
RewardId int64 `json:"rewardId" dc:"奖励ID" orm:"reward_id"`
|
||||
StoreId int64 `json:"storeId" dc:"门店ID" orm:"store_id"`
|
||||
}
|
||||
|
||||
// StoreTaskRewardCreateIn 创建任务奖励关联入参
|
||||
type StoreTaskRewardCreateIn struct {
|
||||
OperatorId int64
|
||||
OperatorRole string
|
||||
TaskId int64 // 门店任务ID
|
||||
RewardId int64 // 奖励ID
|
||||
StoreId int64 // 门店ID
|
||||
}
|
||||
|
||||
// StoreTaskRewardCreateOut 创建任务奖励关联出参
|
||||
type StoreTaskRewardCreateOut struct {
|
||||
Id int64 // 创建成功后返回的ID
|
||||
}
|
||||
|
||||
// StoreTaskRewardDeleteIn 删除任务奖励关联入参
|
||||
type StoreTaskRewardDeleteIn struct {
|
||||
Id int64 // 任务奖励关联ID
|
||||
OperatorId int64
|
||||
OperatorRole string
|
||||
}
|
||||
|
||||
// StoreTaskRewardDeleteOut 删除任务奖励关联出参
|
||||
type StoreTaskRewardDeleteOut struct {
|
||||
Success bool // 是否删除成功
|
||||
}
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
type Tasks struct {
|
||||
type Task struct {
|
||||
Id int64 `json:"id" orm:"id" description:"任务唯一标识符"` // 任务唯一标识符
|
||||
QqNetbarTaskId string `json:"qqNetbarTaskId" orm:"qq_netbar_task_id" description:"QQ网吧任务ID"` // QQ网吧任务ID
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
@ -18,6 +18,7 @@ type Tasks struct {
|
||||
StoreId int64 `json:"storeId" orm:"store_id" description:"门店 id"` // 门店 id
|
||||
Status int `json:"status" orm:"status" description:"状态"` // 状态
|
||||
QQNetBarReward string `json:"qqNetbarReward" orm:"qq_netbar_reward" description:"qq网吧奖励名称"` // 任务奖励
|
||||
NetbarRewards []Reward `json:"netbarRewards" orm:"-"`
|
||||
}
|
||||
|
||||
type GetNonLoginTaskListIn struct {
|
||||
|
||||
Reference in New Issue
Block a user