dtos

package
v0.0.0-...-ca80d37 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Credit = "c"
	Debit  = "d"
)

Functions

This section is empty.

Types

type Balance

type Balance struct {
	Total         int       `json:"total"`
	StatementDate time.Time `json:"data_extrato"`
	CreditLimit   int       `json:"limite"`
}

type LastTransactions

type LastTransactions struct {
	Value       int       `json:"valor"`
	Type        string    `json:"tipo"`
	Description string    `json:"descricao"`
	CreatedAt   time.Time `json:"realizada_em"`
}

type StatementResponse

type StatementResponse struct {
	Saldo             Balance            `json:"saldo"`
	UltimasTransacoes []LastTransactions `json:"ultimas_transacoes"`
}

type TransactionRequest

type TransactionRequest struct {
	Value       int    `` /* 145-byte string literal not displayed */
	Type        string `json:"tipo" validate:"required|string|min:1|max:1" message:"required: campo tipo é obrigatório"`
	Description string `json:"descricao" validate:"required|min:1|max:10" message:"required: campo descrição é obrigatório"`
}

func (TransactionRequest) Validate

func (tr TransactionRequest) Validate() error

type TransactionResponse

type TransactionResponse struct {
	CreditLimit int `json:"limite"`
	Balance     int `json:"saldo"`
}

Jump to

Keyboard shortcuts

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