forked from ebhomengo/niki
1
0
Fork 0
niki/service/notification/service.go

32 lines
942 B
Go

package notification
import (
"context"
smscontract "git.gocasts.ir/ebhomengo/niki/contract/sms"
adminbenefactorparam "git.gocasts.ir/ebhomengo/niki/param/admin/benefactor"
adminkindboxreqparam "git.gocasts.ir/ebhomengo/niki/param/admin/kind_box_req"
)
type KindBoxReqSvc interface {
Get(ctx context.Context, request adminkindboxreqparam.GetKindBoxReqRequest) (adminkindboxreqparam.GetKindBoxReqResponse, error)
}
type BenefactorSvc interface {
GetByID(ctx context.Context, req adminbenefactorparam.GetBenefactorByIDRequest) (adminbenefactorparam.GetBenefactorByIDResponse, error)
}
type Service struct {
smsAdapter smscontract.SmsAdapter
KindBoxReqSvc KindBoxReqSvc
BenefactorSvc BenefactorSvc
}
func New(smsAdapter smscontract.SmsAdapter, kindBoxReqSvc KindBoxReqSvc, benefactorSvc BenefactorSvc) Service {
return Service{
smsAdapter: smsAdapter,
KindBoxReqSvc: kindBoxReqSvc,
BenefactorSvc: benefactorSvc,
}
}