forked from ebhomengo/niki
1
0
Fork 0
niki/service/benefactor/kind_box_req/service.go

27 lines
798 B
Go

package benefactorkindboxreqservice
import (
"context"
params "git.gocasts.ir/ebhomengo/niki/param"
entity "git.gocasts.ir/ebhomengo/niki/entity"
)
type Repository interface {
AddKindBoxReq(ctx context.Context, kindBoxReq entity.KindBoxReq) (entity.KindBoxReq, error)
GetKindBoxReqByID(ctx context.Context, kindBoxReqID uint) (entity.KindBoxReq, error)
DeleteKindBoxReqByID(ctx context.Context, kindBoxReqID uint) error
GetAllKindBoxReq(ctx context.Context, filter params.FilterRequest, pagination params.PaginationRequest, sort params.SortRequest) ([]entity.KindBoxReq, uint, error)
UpdateKindBoxReq(ctx context.Context, kindBoxReq entity.KindBoxReq) error
}
type Service struct {
repo Repository
}
func New(repository Repository) Service {
return Service{
repo: repository,
}
}