dao.go 480 字节
package factory

import (
	"github.com/linmadan/egglib-go/transaction/pg"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/dao"
)

func CreateCooperationModeDao(options map[string]interface{}) (*dao.CooperationModeDao, error) {
	var transactionContext *pg.TransactionContext
	if value, ok := options["transactionContext"]; ok {
		transactionContext = value.(*pg.TransactionContext)
	}
	return dao.NewCooperationModeDao(transactionContext)
}