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

26 lines
707 B
Go
Raw Normal View History

package adminbenefactorservice
import (
"context"
"git.gocasts.ir/ebhomengo/niki/entity"
params "git.gocasts.ir/ebhomengo/niki/param/admin/benefactor"
)
type Repository interface {
IsExistBenefactorByID(ctx context.Context, id uint) (bool, error)
GetAddressByID(ctx context.Context, id uint) (*entity.Address, error)
}
type BenefactorService interface {
GetByID(ctx context.Context, req params.GetBenefactorByIDRequest) (params.GetBenefactorByIDResponse, error)
}
type Service struct {
repo Repository
benefactorService BenefactorService
}
func New(repo Repository, benefactorService BenefactorService) Service {
return Service{repo: repo, benefactorService: benefactorService}
}