新增奖励类型的 CRUD

This commit is contained in:
chy
2025-06-05 10:11:59 +08:00
parent 1db01717fe
commit ba389a1011
16 changed files with 405 additions and 2 deletions

View File

@ -0,0 +1,55 @@
package model
import "github.com/gogf/gf/v2/frame/g"
type RewardType struct {
g.Meta `orm:"table:reward_type"`
Id int64 `json:"id" dc:"ID" orm:"id,primary"`
Name string `json:"name" dc:"名称" orm:"name"`
Sort int `json:"sort" dc:"排序" orm:"sort"`
Status int `json:"status" dc:"状态1=启用2=禁用" orm:"status"`
}
type RewardTypeIn struct {
Page int
Size int
}
type RewardTypeOut struct {
List []RewardType
Total int
}
type CreateRewardTypeIn struct {
Name string
Code string
Description string
Status int
}
type CreateRewardTypeOut struct {
Id int64
}
// UpdateRewardTypeIn 更新奖励类型传入参数
type UpdateRewardTypeIn struct {
Id int64
Name string
Code string
Description string
Status int
}
// UpdateRewardTypeOut 更新奖励类型返回参数
type UpdateRewardTypeOut struct {
Success bool
}
// DeleteRewardTypeIn 删除奖励类型传入参数
type DeleteRewardTypeIn struct {
Id int64
}
// DeleteRewardTypeOut 删除奖励类型返回参数
type DeleteRewardTypeOut struct {
Success bool
}