forked from ebhomengo/niki
27 lines
728 B
Go
27 lines
728 B
Go
package adminkindboxreqservice
|
|
|
|
import (
|
|
"context"
|
|
|
|
entity "git.gocasts.ir/ebhomengo/niki/entity"
|
|
)
|
|
|
|
type Repository interface {
|
|
AddKindBoxReq(ctx context.Context, kindBoxReq entity.KindBoxReq) (entity.KindBoxReq, error)
|
|
UpdateKindBoxReq(ctx context.Context, kindBoxReqID uint, kindBoxReq entity.KindBoxReq) (entity.KindBoxReq, error)
|
|
// TODO: can benefactor cancel its request ?
|
|
DeleteKindBoxReq(ctx context.Context, kindBoxReqID uint) error
|
|
GetAllKindBoxReq(ctx context.Context) ([]entity.KindBoxReq, error)
|
|
GetKindBoxReq(ctx context.Context, kindBoxReqID uint) (entity.KindBoxReq, error)
|
|
}
|
|
|
|
type Service struct {
|
|
repo Repository
|
|
}
|
|
|
|
func New(repository Repository) Service {
|
|
return Service{
|
|
repo: repository,
|
|
}
|
|
}
|