forked from ebhomengo/niki
27 lines
758 B
Go
27 lines
758 B
Go
package adminkindboxreqservice
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.gocasts.ir/ebhomengo/niki/entity"
|
|
paginationparam "git.gocasts.ir/ebhomengo/niki/param"
|
|
)
|
|
|
|
type Repository interface {
|
|
AcceptKindBoxReq(ctx context.Context, kindBoxReqID uint, countAccepted uint) error
|
|
GetByID(ctx context.Context, id uint) (entity.KindBoxReq, error)
|
|
RejectKindBoxReq(ctx context.Context, kindBoxReqID uint, description string) error
|
|
RollbackKindBoxRequestStatus(ctx context.Context, id uint) error
|
|
GetAllKindBoxReq(ctx context.Context, pagination paginationparam.PaginationRequest) ([]entity.KindBoxReq, paginationparam.PaginationResponse, error)
|
|
}
|
|
|
|
type Service struct {
|
|
repo Repository
|
|
}
|
|
|
|
func New(repository Repository) Service {
|
|
return Service{
|
|
repo: repository,
|
|
}
|
|
}
|