实现奖励类型的增删改查
This commit is contained in:
32
internal/service/reward.go
Normal file
32
internal/service/reward.go
Normal file
@ -0,0 +1,32 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
)
|
||||
|
||||
type (
|
||||
IReward interface {
|
||||
List(ctx context.Context, in *model.RewardListIn) (out *model.RewardListOut, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localReward IReward
|
||||
)
|
||||
|
||||
func Reward() IReward {
|
||||
if localReward == nil {
|
||||
panic("implement not found for interface IReward, forgot register?")
|
||||
}
|
||||
return localReward
|
||||
}
|
||||
|
||||
func RegisterReward(i IReward) {
|
||||
localReward = i
|
||||
}
|
||||
39
internal/service/reward_type.go
Normal file
39
internal/service/reward_type.go
Normal file
@ -0,0 +1,39 @@
|
||||
// ================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// You can delete these comments if you wish manually maintain this interface file.
|
||||
// ================================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
)
|
||||
|
||||
type (
|
||||
IRewardType interface {
|
||||
// Create 创建奖励类型
|
||||
Create(ctx context.Context, in *model.RewardTypeCreateIn) (out *model.RewardTypeCreateOut, err error)
|
||||
// Update 更新奖励类型
|
||||
Update(ctx context.Context, in *model.RewardTypeUpdateIn) (out *model.RewardTypeUpdateOut, err error)
|
||||
// Delete 删除奖励类型
|
||||
Delete(ctx context.Context, in *model.RewardTypeDeleteIn) (out *model.RewardTypeDeleteOut, err error)
|
||||
// List 获取奖励类型列表
|
||||
List(ctx context.Context, in *model.RewardTypeListIn) (out *model.RewardTypeListOut, err error)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localRewardType IRewardType
|
||||
)
|
||||
|
||||
func RewardType() IRewardType {
|
||||
if localRewardType == nil {
|
||||
panic("implement not found for interface IRewardType, forgot register?")
|
||||
}
|
||||
return localRewardType
|
||||
}
|
||||
|
||||
func RegisterRewardType(i IRewardType) {
|
||||
localRewardType = i
|
||||
}
|
||||
Reference in New Issue
Block a user