table

package
v0.0.0-...-b55247b Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID               int64
	CompanyID        *int64
	Name             string
	Description      *string
	AccountNo        *string
	Type             string
	Closed           YesNo
	CurrencyID       int64
	Version          int64
	Balance          string
	TransactionCount int64
	Audited
}

Account with a financial instutition.

func (*Account) PtrTo

func (a *Account) PtrTo(column string) interface{}

type Asset

type Asset struct {
	ID      int64
	Name    string
	Type    string
	Scale   int
	Symbol  *string
	Version int
	Audited
}

Asset represents a type of financial asset.

func (*Asset) PtrTo

func (a *Asset) PtrTo(column string) interface{}

type Audited

type Audited struct {
	ChangeUser string
	ChangeDate *time.Time
}

Audited contains audit information for a database record.

type Category

type Category struct {
	ID               int64
	Code             string
	Description      *string
	AmountType       string
	ParentID         *int64
	Security         *YesNo
	Income           *YesNo
	AssetExchange    *YesNo
	Version          int64
	TransactionCount int64
	Audited
}

Category categorizes a transaction detail.

func (*Category) PtrTo

func (tc *Category) PtrTo(column string) interface{}

type Company

type Company struct {
	ID      int64
	Name    string
	Version int
	Audited
}

Company contains information about a financial institution.

func (*Company) PtrTo

func (c *Company) PtrTo(column string) interface{}

PtrTo returns a pointer to the field for the database column.

type Group

type Group struct {
	ID               int64
	Name             string
	Description      *string
	Version          int
	TransactionCount int64
	Audited
}

Group represents an alternate categorization for a transaction detail.

func (*Group) PtrTo

func (g *Group) PtrTo(column string) interface{}

type Payee

type Payee struct {
	ID               int64
	Name             string
	Version          int
	TransactionCount int64
	Audited
}

Payee represents the other party party in a financial transaction.

func (*Payee) PtrTo

func (p *Payee) PtrTo(column string) interface{}

type Security

type Security struct {
	AssetID          int64
	Type             string
	Shares           float64
	FirstAcquired    *time.Time
	CostBasis        *float64
	Dividends        *float64
	TransactionCount int64
	Asset
}

Security represents an investment security.

func (*Security) PtrTo

func (s *Security) PtrTo(column string) interface{}

type Transaction

type Transaction struct {
	ID              int64
	Date            time.Time
	Memo            *string
	ReferenceNumber *string
	Cleared         *YesNo
	AccountID       int64
	PayeeID         *int64
	SecurityID      *int64
	Details         []TransactionDetail
	Version         int
	Audited
}

Transaction represents a financial transaction.

func (*Transaction) PtrTo

func (t *Transaction) PtrTo(column string) interface{}

type TransactionDetail

type TransactionDetail struct {
	ID                    int64
	TransactionID         int64
	TransactionCategoryID *int64
	TransactionGroupID    *int64
	Memo                  *string
	Amount                float64
	AssetQuantity         *float64
	ExchangeAssetID       *int64
	RelatedDetailID       *int64
	Version               int
	Audited
}

TransactionDetail represents a line item of a financial transaction.

func (*TransactionDetail) PtrTo

func (d *TransactionDetail) PtrTo(column string) interface{}

type YesNo

type YesNo byte

YesNo maps a boolean value to a char column containing Y or N.

func (*YesNo) Get

func (yn *YesNo) Get() bool

Get returns the boolean value

func (*YesNo) Scan

func (yn *YesNo) Scan(value interface{}) error

Scan implements the sql.Scanner interface.

func (*YesNo) Set

func (yn *YesNo) Set(value bool)

Set sets the boolean value

func (*YesNo) Value

func (yn *YesNo) Value() (driver.Value, error)

Value implements the sql.Valuer interface.

Jump to

Keyboard shortcuts

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