mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 06:08:16 +00:00
implemented wallet headers
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Transaction struct {
|
||||
tableName struct{} `pg:"transactions,alias:transactions"`
|
||||
@@ -15,8 +18,9 @@ type Transaction struct {
|
||||
}
|
||||
|
||||
type NewTransactionBody struct {
|
||||
WalletID string `json:"walletId" form:"walletId"`
|
||||
TransactionTypeID string `json:"transactionTypeId" form:"transactionTypeId"`
|
||||
TransactionDate time.Time `json:"transactionDate" form:"transactionDate"`
|
||||
Description string `json:"description" form:"description"`
|
||||
WalletID string `json:"walletId" form:"walletId"`
|
||||
TransactionTypeID string `json:"transactionTypeId" form:"transactionTypeId"`
|
||||
TransactionDate time.Time `json:"transactionDate" form:"transactionDate"`
|
||||
Description string `json:"description" form:"description"`
|
||||
Amount json.Number `json:"amount" form:"amount"`
|
||||
}
|
||||
|
||||
@@ -12,3 +12,11 @@ type NewWalletBody struct {
|
||||
Name string `json:"name" form:"name"`
|
||||
UserID string `json:"userId" form:"userId"`
|
||||
}
|
||||
|
||||
type WalletHeader struct {
|
||||
WalletId string `json:"walletId"`
|
||||
CurrentBalance int `json:"currentBalance"`
|
||||
LastMonth int `json:"lastMonth"`
|
||||
NextMonth int `json:"nextMonth"`
|
||||
Currency string `json:"currency"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user