forked from ebhomengo/niki
28 lines
751 B
Go
28 lines
751 B
Go
package benefactorkindboxservice
|
|
|
|
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"
|
|
)
|
|
|
|
type Repository interface {
|
|
GetAllKindBox(ctx context.Context, filter params.FilterRequest, pagination params.PaginationRequest, sort params.SortRequest) ([]entity.KindBox, uint, error)
|
|
GetKindBox(ctx context.Context, kindBoxID uint) (entity.KindBox, error)
|
|
RegisterEmptyingRequestForKindBox(ctx context.Context, kindBox entity.KindBox) error
|
|
}
|
|
|
|
type Service struct {
|
|
repo Repository
|
|
vld validator.Validator
|
|
}
|
|
|
|
func New(repo Repository, vld validator.Validator) Service {
|
|
return Service{
|
|
repo: repo,
|
|
vld: vld,
|
|
}
|
|
}
|