2024-07-27 14:58:37 +00:00
|
|
|
package notification
|
|
|
|
|
2024-07-27 16:17:13 +00:00
|
|
|
import (
|
|
|
|
"context"
|
2024-07-30 14:20:49 +00:00
|
|
|
|
2024-08-01 10:20:18 +00:00
|
|
|
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"
|
2024-07-27 16:17:13 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type KindBoxReqSvc interface {
|
2024-08-01 10:20:18 +00:00
|
|
|
Get(ctx context.Context, request adminkindboxreqparam.GetKindBoxReqRequest) (adminkindboxreqparam.GetKindBoxReqResponse, error)
|
2024-07-27 16:17:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type BenefactorSvc interface {
|
2024-08-01 10:20:18 +00:00
|
|
|
GetByID(ctx context.Context, req adminbenefactorparam.GetBenefactorByIDRequest) (adminbenefactorparam.GetBenefactorByIDResponse, error)
|
2024-07-27 16:17:13 +00:00
|
|
|
}
|
|
|
|
|
2024-07-27 14:58:37 +00:00
|
|
|
type Service struct {
|
2024-08-01 10:20:18 +00:00
|
|
|
smsAdapter smscontract.SmsAdapter
|
2024-07-27 16:17:13 +00:00
|
|
|
KindBoxReqSvc KindBoxReqSvc
|
|
|
|
BenefactorSvc BenefactorSvc
|
2024-07-27 14:58:37 +00:00
|
|
|
}
|
|
|
|
|
2024-08-01 10:20:18 +00:00
|
|
|
func New(smsAdapter smscontract.SmsAdapter, kindBoxReqSvc KindBoxReqSvc, benefactorSvc BenefactorSvc) Service {
|
2024-07-27 14:58:37 +00:00
|
|
|
return Service{
|
2024-07-27 16:17:13 +00:00
|
|
|
smsAdapter: smsAdapter,
|
|
|
|
KindBoxReqSvc: kindBoxReqSvc,
|
|
|
|
BenefactorSvc: benefactorSvc,
|
2024-07-27 14:58:37 +00:00
|
|
|
}
|
|
|
|
}
|