实现奖励类型的增删改查

This commit is contained in:
2025-06-17 16:25:04 +08:00
parent 3dceeeddb7
commit 427e70f94e
29 changed files with 1175 additions and 1 deletions

View File

@ -0,0 +1,79 @@
package model
import (
"github.com/gogf/gf/v2/os/gtime"
)
// RewardType 奖励类型表
type RewardType struct {
Id int64 `json:"id" dc:"奖励类型ID" orm:"id,primary"`
Name string `json:"name" dc:"奖励类型名称(如积分、优惠券)" 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"`
Status int `json:"status" dc:"状态1=正常2=禁用" orm:"status"`
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"`
}
// RewardTypeCreateIn 创建奖励类型入参
type RewardTypeCreateIn struct {
OperatorId int64
OperatorRole string
Name string
Description string
Source int
StoreId int64
Status int
}
// RewardTypeCreateOut 创建奖励类型出参
type RewardTypeCreateOut struct {
Id int64
}
// RewardTypeUpdateIn 更新奖励类型入参
type RewardTypeUpdateIn struct {
OperatorId int64
OperatorRole string
Id int64
Name string
Description string
StoreId int64
Status int
}
// RewardTypeUpdateOut 更新奖励类型出参
type RewardTypeUpdateOut struct {
Success bool
}
// RewardTypeDeleteIn 删除奖励类型入参
type RewardTypeDeleteIn struct {
Id int64
OperatorId int64
OperatorRole string
}
// RewardTypeDeleteOut 删除奖励类型出参
type RewardTypeDeleteOut struct {
Success bool
}
// RewardTypeListIn 获取奖励类型列表入参
type RewardTypeListIn struct {
OperatorId int64
OperatorRole string
Page int
Size int
Name string
StoreId int64
Status int
}
// RewardTypeListOut 获取奖励类型列表出参
type RewardTypeListOut struct {
List []RewardType
Total int
}