data

package
v0.0.0-...-370980d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewGormDB

func NewGormDB(conf *conf.Data) (*gorm.DB, func(), error)

func NewTranscationRepo

func NewTranscationRepo(data *Data) biz.TranscationRepo

func NewVirtualWalletRepo

func NewVirtualWalletRepo(data *Data) biz.WalletRepo

Types

type Data

type Data struct {
	// contains filtered or unexported fields
}

func NewData

func NewData(db *gorm.DB) *Data

type Transcation

type Transcation struct {
	gorm.Model
	UserID          uint            `json:"user_id,omitempty"`
	FromWalletID    uint            `json:"from_wallet_id,omitempty"`
	ToWalletID      uint            `json:"to_wallet_id,omitempty"`
	Amount          decimal.Decimal `json:"amount,omitempty"`
	TranscationType uint            `gorm:"type:tinyint(4)"`
}

type VirtualWallet

type VirtualWallet struct {
	gorm.Model
	UserID  uint            `json:"user_id,omitempty"`
	Balance decimal.Decimal `json:"balance,omitempty" gorm:"type:decimal(20,8)"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL