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"
|
2024-08-06 21:41:09 +00:00
|
|
|
param "git.gocasts.ir/ebhomengo/niki/param/admin/admin"
|
2024-08-01 10:20:18 +00:00
|
|
|
adminbenefactorparam "git.gocasts.ir/ebhomengo/niki/param/admin/benefactor"
|
2024-08-06 21:41:09 +00:00
|
|
|
kbp "git.gocasts.ir/ebhomengo/niki/param/admin/kind_box"
|
2024-08-01 10:20:18 +00:00
|
|
|
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-08-06 21:41:09 +00:00
|
|
|
type AdminSvc interface {
|
|
|
|
AdminExistByID(ctx context.Context, req param.AdminExistByIDRequest) (param.AdminExistByIDResponse, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type KindBoxSvc interface {
|
|
|
|
Get(ctx context.Context, req kbp.KindBoxGetRequest) (kbp.KindBoxGetResponse, error)
|
|
|
|
}
|
|
|
|
|
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-08-06 21:41:09 +00:00
|
|
|
AdminSvc AdminSvc
|
|
|
|
KindBoxSvc KindBoxSvc
|
2024-07-27 14:58:37 +00:00
|
|
|
}
|
|
|
|
|
2024-08-06 21:41:09 +00:00
|
|
|
func New(smsAdapter smscontract.SmsAdapter, kindBoxReqSvc KindBoxReqSvc, benefactorSvc BenefactorSvc,
|
|
|
|
adminSvc AdminSvc, kindBoxSvc KindBoxSvc,
|
|
|
|
) 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-08-06 21:41:09 +00:00
|
|
|
AdminSvc: adminSvc,
|
|
|
|
KindBoxSvc: kindBoxSvc,
|
2024-07-27 14:58:37 +00:00
|
|
|
}
|
|
|
|
}
|