database

package
v0.0.0-...-41d1bbc Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CompraAVista    = 1
	CompraParcelada = 2
	Saque           = 3
	Pagamento       = 4
)

Variables

This section is empty.

Functions

func CloseConnection

func CloseConnection()

func GetConnection

func GetConnection() *gorm.DB

func Migrate

func Migrate()

Types

type TransactionModel

type TransactionModel struct {
	Id            string `gorm:"primary_key"`
	AccountId     string
	OperationType int
	Amount        float64
	EventDate     time.Time
}

func GetTransactionsByAccountId

func GetTransactionsByAccountId(accountId string) ([]TransactionModel, error)

func (TransactionModel) TableName

func (TransactionModel) TableName() string

Jump to

Keyboard shortcuts

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