forked from ebhomengo/niki
26 lines
675 B
Go
26 lines
675 B
Go
package kindboxreqservice
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.gocasts.ir/ebhomengo/niki/entity"
|
|
)
|
|
|
|
type Repository interface {
|
|
AddKindBoxReq(ctx context.Context, kindBoxReq entity.KindBoxReq) (entity.KindBoxReq, error)
|
|
EditKindBoxReq(ctx context.Context, kindBoxReqID uint, kindBoxReqInput entity.KindBoxReq) (entity.KindBoxReq, error)
|
|
DeleteKindBoxReq(ctx context.Context, kindBoxReqID uint) error
|
|
GetAllKindBoxReq(ctx context.Context) ([]entity.KindBoxReq, error)
|
|
GetKindBoxReqByID(ctx context.Context, kindBoxReq uint) (entity.KindBoxReq, error)
|
|
}
|
|
|
|
type Service struct {
|
|
repo Repository
|
|
}
|
|
|
|
func New(repository Repository) Service {
|
|
return Service{
|
|
repo: repository,
|
|
}
|
|
}
|