2024-07-13 12:33:07 +00:00
|
|
|
package agentkindboxservice
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2024-07-24 23:45:04 +00:00
|
|
|
|
2024-07-13 12:33:07 +00:00
|
|
|
"git.gocasts.ir/ebhomengo/niki/entity"
|
2024-07-14 08:58:37 +00:00
|
|
|
params "git.gocasts.ir/ebhomengo/niki/param"
|
2024-07-13 12:33:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Repository interface {
|
|
|
|
GetAwaitingReturnByAgent(ctx context.Context, kindBoxID uint, agentID uint) (entity.KindBox, error)
|
2024-07-14 08:58:37 +00:00
|
|
|
GetAllKindBox(ctx context.Context, filter params.FilterRequest, pagination params.PaginationRequest, sort params.SortRequest) ([]entity.KindBox, uint, error)
|
2024-07-16 11:47:09 +00:00
|
|
|
ReturnKindBox(ctx context.Context, kindBoxID uint, serialNumber string) error
|
2024-07-13 12:33:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Service struct {
|
|
|
|
repo Repository
|
|
|
|
}
|
|
|
|
|
|
|
|
func New(repository Repository) Service {
|
|
|
|
return Service{
|
|
|
|
repo: repository,
|
|
|
|
}
|
|
|
|
}
|