2024-01-02 14:04:16 +00:00
|
|
|
package benefactorkindboxservice
|
2023-12-26 17:53:25 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
entity "git.gocasts.ir/ebhomengo/niki/entity"
|
2024-07-09 17:17:04 +00:00
|
|
|
params "git.gocasts.ir/ebhomengo/niki/param"
|
2023-12-26 17:53:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Repository interface {
|
2024-07-09 17:17:04 +00:00
|
|
|
GetAllKindBox(ctx context.Context, filter params.FilterRequest, pagination params.PaginationRequest, sort params.SortRequest) ([]entity.KindBox, uint, error)
|
2023-12-26 17:53:25 +00:00
|
|
|
GetKindBox(ctx context.Context, kindBoxID uint) (entity.KindBox, error)
|
2024-06-25 21:58:11 +00:00
|
|
|
RegisterEmptyingRequestForKindBox(ctx context.Context, kindBox entity.KindBox) error
|
2023-12-26 17:53:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Service struct {
|
|
|
|
repo Repository
|
|
|
|
}
|
|
|
|
|
|
|
|
func New(repository Repository) Service {
|
|
|
|
return Service{
|
|
|
|
repo: repository,
|
|
|
|
}
|
|
|
|
}
|