models

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Expense

type Expense struct {
	ID            uint
	TransactionID uint
	CategoryID    uint
	CreatedAt     time.Time
	UpdatedAt     time.Time
	Transaction   *Transaction     `gorm:"foreignKey:TransactionID;references:ID"`
	Category      *ExpenseCategory `gorm:"foreignKey:CategoryID;references:ID"`
}

type ExpenseCategory

type ExpenseCategory struct {
	ID               uint
	Name             string
	Description      *string
	Amount           float64
	AmountCurrencyID string
	AmountCurrency   coremodels.Currency `gorm:"foreignKey:AmountCurrencyID;references:Code"`
	CreatedAt        time.Time
	UpdatedAt        time.Time
}

type MoneyAccount

type MoneyAccount struct {
	ID                uint
	Name              string
	AccountNumber     string
	Description       string
	Balance           float64
	BalanceCurrencyID string
	Currency          *coremodels.Currency `gorm:"foreignKey:BalanceCurrencyID;references:Code"`
	CreatedAt         time.Time
	UpdatedAt         time.Time
}

type Payment

type Payment struct {
	ID             uint
	TransactionID  uint
	CounterpartyID uint
	Transaction    *Transaction `gorm:"foreignKey:TransactionID;references:ID"`
	CreatedAt      time.Time
	UpdatedAt      time.Time
}

type Transaction

type Transaction struct {
	ID                   uint
	Amount               float64
	OriginAccountID      *uint
	DestinationAccountID *uint
	TransactionDate      time.Time
	AccountingPeriod     time.Time
	TransactionType      string
	Comment              string
	CreatedAt            time.Time
}

Jump to

Keyboard shortcuts

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