Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OperationType ¶
type OperationType int
const ( NormalPurchase OperationType = 1 PurchaseWithInstallment OperationType = 2 Withdrawal OperationType = 3 CreditVoucher OperationType = 4 )
func (*OperationType) GetAmount ¶
func (op *OperationType) GetAmount(amount float64) float64
func (*OperationType) IsValid ¶
func (op *OperationType) IsValid() bool
type Transaction ¶
type Transaction struct { ID string `db:"id"` AccountID string `db:"account_id"` OperationTypeID int `db:"operation_type_id"` Amount float64 `db:"amount"` }
func (*Transaction) SetTxnAmount ¶
func (txn *Transaction) SetTxnAmount()
func (*Transaction) Validate ¶
func (txn *Transaction) Validate() error
Click to show internal directories.
Click to hide internal directories.