37 lines
928 B
Go
37 lines
928 B
Go
package controller
|
|
|
|
import (
|
|
"context"
|
|
|
|
"36wisdom/biz/model/dto"
|
|
"36wisdom/biz/service"
|
|
)
|
|
|
|
type child struct{}
|
|
|
|
var Child = &child{}
|
|
|
|
func (c *child) Create(ctx context.Context, req *dto.ChildCreateReq) (*dto.ChildCreateRes, error) {
|
|
return service.Child.Create(ctx, req)
|
|
}
|
|
|
|
func (c *child) Update(ctx context.Context, req *dto.ChildUpdateReq) (*dto.ChildUpdateRes, error) {
|
|
return service.Child.Update(ctx, req)
|
|
}
|
|
|
|
func (c *child) List(ctx context.Context, req *dto.ChildListReq) (*dto.ChildListRes, error) {
|
|
return service.Child.List(ctx, req)
|
|
}
|
|
|
|
type adminChild struct{}
|
|
|
|
var AdminChild = &adminChild{}
|
|
|
|
func (c *adminChild) List(ctx context.Context, req *dto.AdminChildListReq) (*dto.AdminChildListRes, error) {
|
|
return service.AdminChild.List(ctx, req)
|
|
}
|
|
|
|
func (c *adminChild) Detail(ctx context.Context, req *dto.AdminChildDetailReq) (*dto.AdminChildDetailRes, error) {
|
|
return service.AdminChild.Detail(ctx, req)
|
|
}
|