实现用户领取任务接口、用户任务记录接口
This commit is contained in:
@ -10,7 +10,7 @@ type UserTask struct {
|
||||
Id int64 `json:"id" orm:"id" description:"用户任务唯一标识符"` // 用户任务唯一标识符
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
TaskId string `json:"taskId" orm:"task_id" description:"腾讯任务ID"` // 腾讯任务ID
|
||||
Status int `json:"status" orm:"status" description:"任务状态:1=进行中,2=已完成中,3=未完成"` // 任务状态:1=进行中,2=已完成中,3=未完成
|
||||
Status int `json:"status" orm:"status" description:"任务状态:1=进行中,2=已完成中,3=未完成"` // 任务状态:1=进行中(显示领取按钮),2=已完成
|
||||
SerialNumber string `json:"serialNumber" orm:"serial_number" description:"流水号,确保用户任务唯一性"` // 流水号,确保用户任务唯一性
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
@ -19,11 +19,34 @@ type UserTask struct {
|
||||
StoreId int64 `json:"storeId" orm:"store_id" description:"门店 id"` // 门店 id
|
||||
TaskName string `json:"taskName" orm:"task_name" description:"任务名称"` // 任务名称
|
||||
GameId int64 `json:"gameId" orm:"game_id" description:"游戏 id"` // 游戏 id
|
||||
User User `json:"user" orm:"with:id=user_id"`
|
||||
Game Game `json:"game" orm:"with:game_id=game_id"`
|
||||
User User `json:"user,omitempty" orm:"with:id=user_id"`
|
||||
Game Game `json:"game,omitempty" orm:"with:game_id=game_id"`
|
||||
// Store Store `json:"store" orm:"with:id=store_id"`
|
||||
}
|
||||
|
||||
type TaskReward struct {
|
||||
g.Meta `orm:"table:task_rewards"`
|
||||
TaskId string `json:"-" orm:"task_id"`
|
||||
RewardId int64 `json:"-" orm:"reward_id"`
|
||||
Rewards Reward `json:"reward" orm:"with:id=reward_id"`
|
||||
}
|
||||
|
||||
type UserTask2 struct {
|
||||
Id int64 `json:"id" orm:"id" description:"用户任务唯一标识符"` // 用户任务唯一标识符
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
TaskId string `json:"taskId" orm:"task_id" description:"腾讯任务ID"` // 腾讯任务ID
|
||||
Status int `json:"status" orm:"status" description:"任务状态:1=进行中,2=已完成中,3=未完成"` // 任务状态:1=进行中(显示领取按钮),2=已完成
|
||||
SerialNumber string `json:"serialNumber" orm:"serial_number" description:"流水号,确保用户任务唯一性"` // 流水号,确保用户任务唯一性
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
CompletedAt *gtime.Time `json:"completedAt" orm:"completed_at" description:"任务完成时间"` // 任务完成时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
StoreId int64 `json:"storeId" orm:"store_id" description:"门店 id"` // 门店 id
|
||||
TaskName string `json:"taskName" orm:"task_name" description:"任务名称"` // 任务名称
|
||||
GameId int64 `json:"gameId" orm:"game_id" description:"游戏 id"` // 游戏 id
|
||||
TaskRewards []TaskReward `json:"taskRewards" orm:"with:task_id=task_id"`
|
||||
}
|
||||
|
||||
// UserTaskRankingIn 任务排行榜入参
|
||||
type UserTaskRankingIn struct {
|
||||
Page int
|
||||
@ -80,6 +103,6 @@ type UserTaskRecordsListIn struct {
|
||||
}
|
||||
|
||||
type UserTaskRecordsListOut struct {
|
||||
List []UserTask
|
||||
List []UserTask2
|
||||
Total int
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user