37 lines
1000 B
Go
37 lines
1000 B
Go
package controller
|
|
|
|
import (
|
|
"context"
|
|
|
|
"36wisdom/biz/model/dto"
|
|
"36wisdom/biz/service"
|
|
)
|
|
|
|
type badge struct{}
|
|
|
|
var Badge = &badge{}
|
|
|
|
type adminBadge struct{}
|
|
|
|
var AdminBadge = &adminBadge{}
|
|
|
|
func (c *adminBadge) List(ctx context.Context, req *dto.AdminBadgeListReq) (*dto.AdminBadgeListRes, error) {
|
|
return service.AdminBadge.List(ctx, req)
|
|
}
|
|
|
|
func (c *adminBadge) Create(ctx context.Context, req *dto.AdminBadgeCreateReq) (*dto.AdminBadgeCreateRes, error) {
|
|
return service.AdminBadge.Create(ctx, req)
|
|
}
|
|
|
|
func (c *adminBadge) Update(ctx context.Context, req *dto.AdminBadgeUpdateReq) (*dto.AdminBadgeUpdateRes, error) {
|
|
return service.AdminBadge.Update(ctx, req)
|
|
}
|
|
|
|
func (c *adminBadge) Disable(ctx context.Context, req *dto.AdminBadgeDisableReq) (*dto.AdminBadgeDisableRes, error) {
|
|
return service.AdminBadge.Disable(ctx, req)
|
|
}
|
|
|
|
func (c *adminBadge) Enable(ctx context.Context, req *dto.AdminBadgeEnableReq) (*dto.AdminBadgeEnableRes, error) {
|
|
return service.AdminBadge.Enable(ctx, req)
|
|
}
|