entity

package
v0.0.0-...-e754585 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 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 Transaction

type Transaction struct {
	ID uuid.UUID
	// AccountID is the ID of the account that the transaction belongs to.
	AccountID uuid.UUID
	// Amount is the amount of the transaction.
	Amount float64
	// Operation is the operation of the transaction.
	Operation string
	// Date is the date of the transaction.
	Date time.Time
	// CreatedAt is the date and time when the transaction was created.
	CreatedAt time.Time
	// Origin is the origin of the transaction.
	Origin string
}

Transaction struct defines the transaction entity.

func NewTransaction

func NewTransaction(accountID uuid.UUID, amount float64, dateTx time.Time, origin string) (tx *Transaction, err error)

NewTransaction returns a new Transaction instance.

Jump to

Keyboard shortcuts

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