forked from ebhomengo/niki
1
0
Fork 0
niki/service/admin/kind_box_req/service.go

26 lines
621 B
Go

package adminkindboxreqservice
import (
"context"
"git.gocasts.ir/ebhomengo/niki/entity"
)
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) ([]entity.KindBoxReq, error)
}
type Service struct {
repo Repository
}
func New(repository Repository) Service {
return Service{
repo: repository,
}
}