Files
arenax-server/internal/model/reward.go

180 lines
5.6 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 时使用)
}
// 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
}
// RewardCreateOut 创建奖励出参
type RewardCreateOut struct {
Id int64
}
// 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
}
// RewardUpdateOut 更新奖励出参
type RewardUpdateOut struct {
Success bool
}
// RewardDeleteIn 删除奖励入参
type RewardDeleteIn struct {
Id int64
OperatorId int64
OperatorRole string
}
// 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
Source int
}
// RewardListOut 奖励列表查询出参
type RewardListOut struct {
List []Reward
Total int
}
// RewardCallbackIn 任务奖励领取回调入参
type RewardCallbackIn struct {
AreaId int
GameId int
RewradTypeId []int
RoleIdx string
TaskId string
}
type RewardCallbackOut struct {
List interface{} `json:"list"`
Result int64 `json:"result"`
Water Water `json:"water"`
}
type GetRewardIn struct {
AreaId int
GameId int
RewradTypeId []int
RoleIdx string
TaskId string
PopenId string
}
type GetRewardOut struct {
List interface{} `json:"list"`
Result int64 `json:"result"`
Water Water `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:"物品详情"`
}