Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct { ID uint `gorm:"primaryKey"` Name string `gorm:"type:varchar(255)"` Type AccountType `gorm:"type:tinyint"` }
Account ...
type AccountType ¶
type AccountType int
AccountType ...
const ( ATBank AccountType ATCreditCard ATCash ATInvestment )
Account types
type Category ¶
type Category struct { ID uint `gorm:"primaryKey"` Category string `gorm:"type:varchar(128)"` SubCategory string `gorm:"type:varchar(128)"` TxType TransactionType `gorm:"type:tinyint"` }
Category ...
type Ledger ¶
type Ledger struct { ID uint `gorm:"primaryKey"` AccountID uint `gorm:"uniqueIndex:idx_account_version,priority:1"` Version uint `gorm:"uniqueIndex:idx_account_version,priority:2"` Balance float64 `gorm:"type:decimal(18,3)"` SubCategory string `gorm:"type:varchar(128)"` Amount float64 `gorm:"type:decimal(18,3)"` TxTime time.Time }
Ledger ...
type TransactionType ¶
type TransactionType int
TransactionType ...
const ( TTExpense TransactionType TTIncome TTTransfer TTInvestment )
Transaction types
func (TransactionType) String ¶
func (t TransactionType) String() string
func (*TransactionType) UnmarshalJSON ¶
func (t *TransactionType) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.