niki/service/admin/kind_box/service.go

28 lines
836 B
Go
Raw Normal View History

2023-12-25 17:08:19 +00:00
package adminkindboxservice
import (
"context"
2024-07-09 17:17:04 +00:00
"git.gocasts.ir/ebhomengo/niki/entity"
params "git.gocasts.ir/ebhomengo/niki/param"
)
type Repository interface {
2024-01-27 07:05:56 +00:00
AddBatchKindBox(ctx context.Context, kindBoxes []entity.KindBox) error
AddKindBox(ctx context.Context, kindBox entity.KindBox) error
2024-07-01 17:13:28 +00:00
GetKindBox(ctx context.Context, kindBoxID uint) (entity.KindBox, error)
AssignReceiverAgent(ctx context.Context, kindBox entity.KindBox) error
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)
GetAwaitingReturnByAgent(ctx context.Context, kindBoxID uint, agentID uint) (entity.KindBox, error)
}
type Service struct {
repo Repository
}
func New(repository Repository) Service {
return Service{
repo: repository,
}
}