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

30 lines
939 B
Go
Raw Normal View History

package benefactorkindboxreqservice
2023-12-25 17:08:19 +00:00
import (
"context"
entity "git.gocasts.ir/ebhomengo/niki/entity"
params "git.gocasts.ir/ebhomengo/niki/param"
validator "git.gocasts.ir/ebhomengo/niki/validator/benefactor/kind_box_req"
2023-12-25 17:08:19 +00:00
)
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
2023-12-25 17:08:19 +00:00
}
type Service struct {
repo Repository
vld validator.Validator
2023-12-25 17:08:19 +00:00
}
func New(repository Repository, vld validator.Validator) Service {
2023-12-25 17:08:19 +00:00
return Service{
repo: repository,
vld: vld,
2023-12-25 17:08:19 +00:00
}
}