dao.go
1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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)
}
func CreateCooperationProjectDao(options map[string]interface{}) (*dao.CooperationProjectDao, error) {
var transactionContext *pg.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pg.TransactionContext)
}
return dao.NewCooperationProjectDao(transactionContext)
}
func CreateCooperationContractDao(options map[string]interface{}) (*dao.CooperationContractDao, error) {
var transactionContext *pg.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pg.TransactionContext)
}
return dao.NewCooperationContractDao(transactionContext)
}
func CreateDividendsOrderDao(options map[string]interface{}) (*dao.DividendsOrderDao, error) {
var transactionContext *pg.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pg.TransactionContext)
}
return dao.NewDividendsOrderDao(transactionContext)
}
func CreateDividendsReturnedOrderDao(options map[string]interface{}) (*dao.DividendsReturnedOrderDao, error) {
var transactionContext *pg.TransactionContext
if value, ok := options["transactionContext"]; ok {
transactionContext = value.(*pg.TransactionContext)
}
return dao.NewDividendsReturnedOrderDao(transactionContext)
}