2023-12-25 17:08:19 +00:00
|
|
|
package adminkindboxreqservice
|
2023-12-20 08:27:13 +00:00
|
|
|
|
2023-12-22 21:42:57 +00:00
|
|
|
import (
|
|
|
|
"context"
|
2024-01-22 14:07:51 +00:00
|
|
|
|
2024-01-22 08:14:57 +00:00
|
|
|
"git.gocasts.ir/ebhomengo/niki/entity"
|
2024-04-28 11:27:23 +00:00
|
|
|
paginationparam "git.gocasts.ir/ebhomengo/niki/param"
|
2023-12-22 21:42:57 +00:00
|
|
|
)
|
2023-12-20 08:27:13 +00:00
|
|
|
|
|
|
|
type Repository interface {
|
2024-01-22 10:43:16 +00:00
|
|
|
AcceptKindBoxReq(ctx context.Context, kindBoxReqID uint, countAccepted uint) error
|
2024-01-22 14:07:51 +00:00
|
|
|
GetByID(ctx context.Context, id uint) (entity.KindBoxReq, error)
|
2024-01-22 15:21:13 +00:00
|
|
|
RejectKindBoxReq(ctx context.Context, kindBoxReqID uint, description string) error
|
2024-01-25 15:15:53 +00:00
|
|
|
RollbackKindBoxRequestStatus(ctx context.Context, id uint) error
|
2024-04-28 11:27:23 +00:00
|
|
|
GetAllKindBoxReq(ctx context.Context, pagination paginationparam.PaginationRequest) ([]entity.KindBoxReq, paginationparam.PaginationResponse, error)
|
2023-12-20 08:27:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Service struct {
|
2024-01-23 10:21:56 +00:00
|
|
|
repo Repository
|
2023-12-20 08:27:13 +00:00
|
|
|
}
|
|
|
|
|
2024-02-12 07:56:28 +00:00
|
|
|
func New(repository Repository) Service {
|
2023-12-20 08:27:13 +00:00
|
|
|
return Service{
|
2024-02-12 07:56:28 +00:00
|
|
|
repo: repository,
|
2023-12-20 08:27:13 +00:00
|
|
|
}
|
|
|
|
}
|