修改奖励配置新增过期类型和时间

This commit is contained in:
chy
2025-06-23 20:48:22 +08:00
parent 2c59949e87
commit 3166edc3dd
8 changed files with 94 additions and 26 deletions

View File

@ -10,17 +10,21 @@ import (
// Rewards is the golang structure for table rewards.
type Rewards struct {
Id int64 `json:"id" orm:"id" description:"奖励ID"` // 奖励ID
RewardTypeId int64 `json:"rewardTypeId" orm:"reward_type_id" description:"奖励类型ID"` // 奖励类型ID
Name string `json:"name" orm:"name" description:"奖励名称如100积分、5元优惠券"` // 奖励名称如100积分、5元优惠券
Description string `json:"description" orm:"description" description:"奖励描述"` // 奖励描述
Source int `json:"source" orm:"source" description:"来源1=系统内置2=门店自定义"` // 来源1=系统内置2=门店自定义
StoreId int64 `json:"storeId" orm:"store_id" description:"门店ID系统内置奖励为NULL"` // 门店ID系统内置奖励为NULL
Value uint64 `json:"value" orm:"value" description:"奖励值(如积分数额、优惠金额)"` // 奖励值(如积分数额、优惠金额)
Status int `json:"status" orm:"status" description:"状态1=正常2=禁用"` // 状态1=正常2=禁用
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:"软删除时间戳"` // 软删除时间戳
TotalNum uint64 `json:"totalNum" orm:"total_num" description:"奖励总数量NULL表示不限量"` // 奖励总数量NULL表示不限量
UsedNum uint64 `json:"usedNum" orm:"used_num" description:"已使用数量"` // 已使用数量
Id int64 `json:"id" orm:"id" description:"奖励ID"` // 奖励ID
RewardTypeId int64 `json:"rewardTypeId" orm:"reward_type_id" description:"奖励类型ID"` // 奖励类型ID
Name string `json:"name" orm:"name" description:"奖励名称如100积分、5元优惠券"` // 奖励名称如100积分、5元优惠券
Description string `json:"description" orm:"description" description:"奖励描述"` // 奖励描述
Source int `json:"source" orm:"source" description:"来源1=系统内置2=门店自定义"` // 来源1=系统内置2=门店自定义
StoreId int64 `json:"storeId" orm:"store_id" description:"门店ID系统内置奖励为NULL"` // 门店ID系统内置奖励为NULL
Value uint64 `json:"value" orm:"value" description:"奖励值(如积分数额、优惠金额)"` // 奖励值(如积分数额、优惠金额)
Status int `json:"status" orm:"status" description:"状态1=正常2=禁用"` // 状态1=正常2=禁用
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:"软删除时间戳"` // 软删除时间戳
TotalNum uint64 `json:"totalNum" orm:"total_num" description:"奖励总数量NULL表示不限量"` // 奖励总数量NULL表示不限量
UsedNum uint64 `json:"usedNum" orm:"used_num" description:"已使用数量"` // 已使用数量
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 时使用)
}