19 lines
475 B
Go
19 lines
475 B
Go
package repository
|
|
|
|
import (
|
|
"code.30cm.net/digimon/app-cloudep-wallet-service/pkg/domain/entity"
|
|
"github.com/shopspring/decimal"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
func NewUserWallet(db *gorm.DB, uid, crypto string) repository.UserWallet {
|
|
return &userWallet{
|
|
db: db,
|
|
uid: uid,
|
|
crypto: crypto,
|
|
|
|
localWalletBalance: make(map[domain.WalletType]entity.Wallet, len(domain.WalletAllType)),
|
|
localOrderBalance: make(map[int64]decimal.Decimal, len(domain.WalletAllType)),
|
|
}
|
|
}
|