调整奖励接口
This commit is contained in:
@ -1,70 +1,86 @@
|
||||
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:reward"`
|
||||
Id int64 `json:"id" dc:"奖励ID" orm:"id,primary"`
|
||||
RewardTypeId int64 `json:"rewardTypeId" dc:"奖励类型ID" orm:"reward_type_id"`
|
||||
RewardTypeName string `json:"rewardTypeName" dc:"奖励类型名称" orm:"reward_type_name"`
|
||||
Name string `json:"name" dc:"奖励名称(如100积分、5元优惠券)" orm:"name"`
|
||||
Description string `json:"description" dc:"奖励描述" orm:"description"`
|
||||
Source int `json:"source" dc:"来源:1=系统内置,2=门店自定义" orm:"source"`
|
||||
StoreId int64 `json:"storeId" dc:"门店ID,系统内置奖励为NULL" orm:"store_id"`
|
||||
Value int64 `json:"value" dc:"奖励值(如积分数额、优惠金额)" orm:"value"`
|
||||
Status int `json:"status" dc:"状态:1=正常,0=禁用" orm:"status"`
|
||||
TotalNum int64 `json:"totalNum" dc:"奖励数量" orm:"total_num"`
|
||||
UseNum int64 `json:"useNum" dc:"已使用数量" orm:"use_num"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间" orm:"created_at"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间" orm:"updated_at"`
|
||||
DeletedAt *gtime.Time `json:"deletedAt" dc:"软删除时间戳" orm:"deleted_at"`
|
||||
ExpireType int `json:"expireType"` // 过期类型:1=时间段过期,2=领取后多少天过期
|
||||
ValidFrom *gtime.Time `json:"validFrom"` // 有效开始时间(expire_type=1 时使用)
|
||||
ValidTo *gtime.Time `json:"validTo"` // 有效结束时间(expire_type=1 时使用)
|
||||
ExpireDays int `json:"expireDays"` // 领取后多少天过期(expire_type=2 时使用)
|
||||
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 表
|
||||
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:"删除时间(软删除)"` // 删除时间(软删除)
|
||||
}
|
||||
|
||||
// RewardCreateIn 创建奖励入参
|
||||
type RewardCreateIn struct {
|
||||
OperatorId int64
|
||||
OperatorRole string
|
||||
RewardTypeId int64
|
||||
Name string
|
||||
Description string
|
||||
Source int
|
||||
StoreId int64
|
||||
Value int64
|
||||
Status int
|
||||
ExpireType int
|
||||
ExpireDays int
|
||||
ValidFrom *gtime.Time
|
||||
ValidTo *gtime.Time
|
||||
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 {
|
||||
Id int64
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
|
||||
// RewardUpdateIn 更新奖励入参
|
||||
type RewardUpdateIn struct {
|
||||
OperatorId int64
|
||||
OperatorRole string
|
||||
Id int64
|
||||
RewardTypeId int64
|
||||
Name string
|
||||
Description string
|
||||
StoreId int64
|
||||
Value int64
|
||||
Status int
|
||||
ExpireType int
|
||||
ExpireDays int
|
||||
ValidFrom *gtime.Time
|
||||
ValidTo *gtime.Time
|
||||
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 更新奖励出参
|
||||
@ -77,6 +93,7 @@ type RewardDeleteIn struct {
|
||||
Id int64
|
||||
OperatorId int64
|
||||
OperatorRole string
|
||||
Source int
|
||||
}
|
||||
|
||||
// RewardDeleteOut 删除奖励出参
|
||||
@ -94,7 +111,6 @@ type RewardListIn struct {
|
||||
StoreId int64
|
||||
RewardTypeId int64
|
||||
Status int
|
||||
Source int
|
||||
}
|
||||
|
||||
// RewardListOut 奖励列表查询出参
|
||||
|
||||
Reference in New Issue
Block a user