调整新增奖励
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
package model
|
||||
|
||||
import "github.com/gogf/gf/v2/os/gtime"
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
type GetUserClaimListIn struct {
|
||||
UserId int64
|
||||
@ -9,18 +12,9 @@ type GetUserClaimListIn struct {
|
||||
NetbarAccount string
|
||||
StoreId int64
|
||||
}
|
||||
type UserTaskReward struct {
|
||||
RewardName string `json:"rewardName" orm:"reward_name"` // 奖励名称冗余字段
|
||||
Source int `json:"source" orm:"source"` // 奖励来源,1是系统奖励统一调用, 2是门店奖励
|
||||
RewardType int `json:"rewardType" orm:"reward_type"` // 奖励类型, 实现不同的领取操作
|
||||
Status int `json:"status" orm:"status"` // 状态:1=待用户完成任务,2=待领取,3=已领取, 待兑换,4=已过期,5=发放失败, 6=结束、
|
||||
ExpireType int `json:"expireType" orm:"expire_type"` // 过期方式:1=时间段过期,2=领取后过期
|
||||
ValidFrom *gtime.Time `json:"validFrom" orm:"valid_from" ` // 有效期开始时间(expire_type=1时)
|
||||
ValidTo *gtime.Time `json:"validTo" orm:"valid_to"` // 有效期结束时间(expire_type=1时)
|
||||
ExpireDays int `json:"expireDays" orm:"expire_days"` // 领取后多少天过期(expire_type=2时)
|
||||
}
|
||||
|
||||
type GetUserClaimListOut struct {
|
||||
List []Reward
|
||||
List []UserClaimReward
|
||||
Total int
|
||||
}
|
||||
|
||||
@ -38,3 +32,11 @@ type UserTaskRewards struct {
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间"` // 软删除时间
|
||||
ExpiredAt *gtime.Time `json:"expiredAt" orm:"expired_at" description:"奖励过期时间"` // 奖励过期时间
|
||||
}
|
||||
|
||||
type UserClaimReward struct {
|
||||
g.Meta `orm:"table:user_task_rewards"`
|
||||
RewardId int64 `json:"rewardId" orm:"reward_id"`
|
||||
Status int64 `json:"status" orm:"reward_status"`
|
||||
RewardName string `json:"rewardName" orm:"reward_name"`
|
||||
SimpleReward SimpleReward `json:"reward" orm:"with:id=reward_id"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user