forked from ebhomengo/niki
27 lines
735 B
Go
27 lines
735 B
Go
package adminkindboxservice
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.gocasts.ir/ebhomengo/niki/entity"
|
|
params "git.gocasts.ir/ebhomengo/niki/param"
|
|
)
|
|
|
|
type Repository interface {
|
|
AddBatchKindBox(ctx context.Context, kindBoxes []entity.KindBox) error
|
|
AddKindBox(ctx context.Context, kindBox entity.KindBox) error
|
|
GetKindBox(ctx context.Context, kindBoxID uint) (entity.KindBox, error)
|
|
AssignReceiverAgent(ctx context.Context, kindBox entity.KindBox) error
|
|
GetAllKindBox(ctx context.Context, filter params.FilterRequest, pagination params.PaginationRequest, sort params.SortRequest) ([]entity.KindBox, uint, error)
|
|
}
|
|
|
|
type Service struct {
|
|
repo Repository
|
|
}
|
|
|
|
func New(repository Repository) Service {
|
|
return Service{
|
|
repo: repository,
|
|
}
|
|
}
|