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

26 lines
673 B
Go

package adminbenefactorservice
import (
"context"
"git.gocasts.ir/ebhomengo/niki/entity"
adminaddressparam "git.gocasts.ir/ebhomengo/niki/param/admin/address"
)
type Repository interface {
IsExistBenefactorByID(ctx context.Context, id uint) (bool, error)
GetByID(ctx context.Context, id uint) (entity.Benefactor, error)
}
type AddressSvc interface {
GetAddressByID(ctx context.Context, request adminaddressparam.AddressGetRequest) (adminaddressparam.AddressGetResponse, error)
}
type Service struct {
repo Repository
AddressSvc AddressSvc
}
func New(repo Repository, addressSvc AddressSvc) Service {
return Service{repo: repo, AddressSvc: addressSvc}
}