models

package
v0.0.0-...-cb4cf2c Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func Connect

func Connect()

Types

type Transaction

type Transaction struct {
	ID                  []byte       `gorm:"primaryKey"`
	MadeAt              time.Time    `gorm:"type:date not null"`
	ProcessedAt         time.Time    `gorm:"type:date not null"`
	Description         string       `gorm:"type:text not null"`
	Paid                float64      `gorm:"type:numeric(15,2) not null"`
	Received            float64      `gorm:"type:numeric(15,2) not null"`
	Balance             float64      `gorm:"type:numeric(15,2) not null"`
	PersonalDescription string       `gorm:"type:text"`
	OrderNumber         int          ``
	Link                *Transaction `gorm:"-"`
}

func SortTransactions

func SortTransactions(transactions []Transaction) ([]Transaction, error)

func (*Transaction) GenerateHash

func (t *Transaction) GenerateHash()

func (Transaction) String

func (t Transaction) String() string

Jump to

Keyboard shortcuts

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