models

package
v0.0.0-...-88500ae Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Customer

type Customer struct {
	Id           uint8 `json:"id"`
	Balance      int32 `json:"balance"`
	Limit        int32 `json:"limit"`
	Transactions []Transaction
}

func (*Customer) ReverseTransactions

func (c *Customer) ReverseTransactions()

func (*Customer) Transact

func (c *Customer) Transact(transaction Transaction) error

type Transaction

type Transaction struct {
	Value           int32           `json:"valor"`
	TransactionType TransactionType `json:"tipo"`
	Description     string          `json:"descricao"`
}

type TransactionType

type TransactionType string
const (
	Credit TransactionType = "c"
	Debit  TransactionType = "d"
)

Jump to

Keyboard shortcuts

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