package cmb

import (
	"voucher/internal/biz/mixrepos"
	"voucher/internal/biz/repo"
	"voucher/internal/biz/wechatrepo"
	"voucher/internal/conf"
	"voucher/internal/data"
)

// Cmb .
// @link https://open.cmbchina.com/Platform/#/resource/document/approvalAPI
// @link https://open.cmbchina.com/Platform/#/resource/document/guide
type Cmb struct {
	bc              *conf.Bootstrap
	rdb             *data.Rdb
	OrderRepo       repo.OrderRepo
	ProductRepo     repo.ProductRepo
	OrderNotifyRepo repo.OrderNotifyRepo
	WechatCpnRepo   wechatrepo.WechatCpnRepo
	CmbMixRepo      mixrepos.CmbMixRepo
}

func NewCmb(
	bc *conf.Bootstrap,
	rdb *data.Rdb,
	orderRepo repo.OrderRepo,
	ProductRepo repo.ProductRepo,
	OrderNotifyRepo repo.OrderNotifyRepo,
	WechatCpnRepo wechatrepo.WechatCpnRepo,
	CmbMixRepo mixrepos.CmbMixRepo,
) *Cmb {
	return &Cmb{
		bc:              bc,
		rdb:             rdb,
		OrderRepo:       orderRepo,
		ProductRepo:     ProductRepo,
		OrderNotifyRepo: OrderNotifyRepo,
		WechatCpnRepo:   WechatCpnRepo,
		CmbMixRepo:      CmbMixRepo,
	}
}
